Extract error rendering

This commit is contained in:
Daan Sprenkels
2019-09-15 21:34:41 +02:00
parent ddd674e88a
commit 372d7c0487
8 changed files with 54 additions and 41 deletions

View File

@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>{{block "title" .}}rushlink{{end}}</title>{{block "head-append" .}}{{end}}
</head>
<body>
{{block "body" .}}{{end}}
</body>
</html>

View File

@@ -0,0 +1,8 @@
{{define "title"}}
Error - rushlink
{{end}}
{{define "body"}}
<pre>
{{.Message}}
</pre>
{{end}}

View File

@@ -0,0 +1,14 @@
{{define "body"}}
<pre>
#RU URL SHORTENER
=================
Based on https://0x0.st/, this site allows you to easily shorten URLs using
the command line.
## USAGE
# Shorten a URL
curl -F'shorten=http://example.com/some/long/url' <a href="https://hashru.link">https://hashru.link</a>
</pre>
{{end}}