Use Go templates for HTML
This commit is contained in:
parent
defb2dcfdd
commit
51fb9df8b3
14 changed files with 220 additions and 255 deletions
70
templates/base.tmpl
Normal file
70
templates/base.tmpl
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
{{ define "base" }}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
{{ if .Description }}<meta name="description" content="{{ .Description }}">{{ end }}
|
||||
{{ if .Keywords }}<meta name="keywords" content="{{ .Keywords }}">{{ end }}
|
||||
{{ if .Author }}<meta name="author" content="{{ .Author }}">{{ end }}
|
||||
{{ if .CanonicalURL }}<link rel="canonical" href="{{ .CanonicalURL }}">{{ end }}
|
||||
<title>{{ .Title }}</title>
|
||||
|
||||
|
||||
<link rel="stylesheet" href="/static/style.css">
|
||||
</head>
|
||||
<body>
|
||||
<span class="title">
|
||||
<h1>
|
||||
<a href="/">FeedVault</a>
|
||||
</h1>
|
||||
</span>
|
||||
<div class="leftright">
|
||||
<div class="left">
|
||||
<small>Archive of <a href="https://en.wikipedia.org/wiki/Web_feed">web feeds</a>. {{ .FeedCount }} feeds. ~{{ .DatabaseSize }} MB.</small>
|
||||
</div>
|
||||
<div class="right">
|
||||
<!-- Search -->
|
||||
<form action="#" method="get">
|
||||
<input type="text" name="q" placeholder="Search">
|
||||
<button type="submit">Search</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<nav>
|
||||
<small>
|
||||
<div class="leftright">
|
||||
<div class="left">
|
||||
<a href="/feeds">Feeds</a> | <a href="/api">API</a> | <a href="https://github.com/TheLovinator1/FeedVault">GitHub</a> | <a href="/donate">Donate</a>
|
||||
</div>
|
||||
<div class="right">
|
||||
<a href="">Register</a> | <a href="">Login</a>
|
||||
</div>
|
||||
</div>
|
||||
</small>
|
||||
</nav>
|
||||
<hr>
|
||||
{{ block "content" . }}{{ end }}
|
||||
<hr>
|
||||
<footer>
|
||||
<small>
|
||||
<div class="leftright">
|
||||
<div class="left">
|
||||
Made by <a href="">Joakim Hellsén</a>.
|
||||
</div>
|
||||
<div class="right">No rights reserved.</div>
|
||||
</div>
|
||||
<div class="leftright">
|
||||
<div class="left">
|
||||
<a href="mailto:hello@feedvault.se">hello@feedvault.se</a>
|
||||
</div>
|
||||
<div class="right">
|
||||
<a href="">Terms of Service</a> | <a href="">Privacy Policy</a>
|
||||
</div>
|
||||
</div>
|
||||
</small>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
{{ end }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue