2017-03-13 14:16:12 +01:00
|
|
|
<html>
|
|
|
|
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<title>Golang URL Shortener</title>
|
|
|
|
<link rel="stylesheet" href="/static/css/style.css" />
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
<h2>Golang URL Shortener</h2>
|
2017-07-10 17:32:42 +02:00
|
|
|
<h3>{{ .FORM_RESULT}}</h3>
|
2017-03-14 13:54:04 +01:00
|
|
|
<form action="/shorten" method="POST">
|
2017-03-13 14:16:12 +01:00
|
|
|
<input type="text" name="url" style="width: 35em;" />
|
|
|
|
<input type="submit" value="Shorten!" />
|
|
|
|
</form>
|
2017-07-10 17:32:42 +02:00
|
|
|
{{ if IsPositive .URL_COUNT }}
|
|
|
|
<p>{{ .URL_COUNT }} URLs shortened</p>
|
2017-03-14 13:54:04 +01:00
|
|
|
{{ end }}
|
2017-07-10 17:32:42 +02:00
|
|
|
|
|
|
|
<form action="/clear_cache" method="POST">
|
|
|
|
<input type="submit" value="Clear DB" />
|
|
|
|
</form>
|
2017-03-13 14:16:12 +01:00
|
|
|
</body>
|
|
|
|
|
|
|
|
</html>
|