Files
golink/home.html
T
Will Norris 259ce77cdc cmd/golink: move home template into separate file
This sets up an embed.FS even though we only have the one file right
now, as we will have more shortly.

Change-Id: I1292e4c00602fbfc3a7bc2a5f93a8c9b9e6715c0
2022-06-07 13:49:29 -07:00

18 lines
446 B
HTML

<html>
<body>
<h1>go/</h1>
shortlink service.
<h2>create</h2>
<form method="POST" action="/">
http://go/<input name=short size=20 value="{{.Short}}"> ==&gt; <input name=long size=40> <input type=submit value="create">
</form>
<h2>recent popular links</h2>
<table>
<tr><th>short link</th><th>num clicks</th></tr>
{{range .Clicks}}
<tr><td><a href="http://go/{{.Short}}">http://go/{{.Short}}</a></td><td>{{.NumClicks}}</td></tr>
{{end}}
</table>