transmet/templates/pages/list.html

35 lines
1.3 KiB
HTML

{{define "body"}}
<h2 class="form-add-heading">List</h2>
{{template "flashes" .}}
<form class="form-add" action="/" method="post" role="form" class="container col-form">
<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">
<input class="btn btn-lg btn-primary btn-block" type="submit" value="Export" />
</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>
</form>
<textarea class="form-control" name="template" placeholder="Template" rows="16" cols="80">{{.template}}</textarea>
{{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+'?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=570'))l.href=u;};if (/Firefox/.test(navigator.userAgent)) setTimeout(a, 0); else a();void(0)
{{end}}