Modularise templates

This commit is contained in:
Fred Boniface
2023-09-03 20:52:51 +01:00
parent dc7631ede2
commit d27625f112
3 changed files with 20 additions and 12 deletions

View File

@@ -1,12 +1,5 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>API Documentation</title>
</head>
<body>
<h1>API Requests</h1>
{{ define "title" }}API Documentation{{ end }}
{{ define "body" }}
<p>API Requests can be made by making a POST request to /generate</p>
<p>The request body should be JSON similar to the below</p>
@@ -37,5 +30,4 @@
<p><code>content</code> should be the value you wish the barcode to display. This should be a string and may not accept all characters - that is dependent on the barcode type.</p>
<p>The response will be a PNG image</p>
</body>
</html>
{{ end }}