transmet/templates/pages/export.html

38 lines
1.3 KiB
HTML

{{define "body"}}
<h2 class="list-heading">List</h2>
{{template "flashes" .}}
<div class="row">
<div class="col-xs-2">
<a class="btn btn-lg btn-primary btn-block" href="{{template "launch-add" .}}">Add to transmet</a>
</div>
<div class="col-xs-4"></div>
<div class="col-xs-4"></div>
<div class="col-xs-2">
<button class="confirm-export btn btn-lg btn-primary btn-block" type="submit">Export</button>
</div>
<div class="col-xs-6">
Drag this link to bookmark bar and click anywhere to add a link
</div>
<div class="col-xs-6">
Click this to mark the current queue of news items as exported (clearing them)
</div>
<div class="col-xs-12">&nbsp;</div>
</div>
<textarea class="form-control" name="template" placeholder="Template" rows="16" cols="80">{{.template}}</textarea>
<div class="ros">
<div class="col-xs-10"></div>
<div class="col-xs-2"><b>{{.count}}</b> news items</div>
</div>
{{end}}
{{define "launch-add"}}
javascript:var d=document,w=window,e=w.getSelection,k=d.getSelection,x=d.selection,s=(e?e():(k)?k():(x?x.createRange().text:0)),f='{{.url}}add',l=d.location,e=encodeURIComponent,u=f+'?popup=1&url='+e(l.href)+'&title='+e(d.title);a=function(){if(!w.open(u,'t','toolbar=0,resizable=1,scrollbars=1,status=1,width=720,height=410'))l.href=u;};if (/Firefox/.test(navigator.userAgent)) setTimeout(a, 0); else a();void(0)
{{end}}