add an about page

This commit is contained in:
Ted Unangst 2019-06-08 15:31:00 -04:00
parent 068b15e45d
commit b0b12e5a6f
3 changed files with 10 additions and 0 deletions

View File

@ -1258,6 +1258,7 @@ func serve() {
"views/honkform.html", "views/honkform.html",
"views/honk.html", "views/honk.html",
"views/account.html", "views/account.html",
"views/about.html",
"views/login.html", "views/login.html",
"views/header.html", "views/header.html",
) )
@ -1294,6 +1295,7 @@ func serve() {
getters.HandleFunc("/style.css", servecss) getters.HandleFunc("/style.css", servecss)
getters.HandleFunc("/local.css", servecss) getters.HandleFunc("/local.css", servecss)
getters.HandleFunc("/about", servehtml)
getters.HandleFunc("/login", servehtml) getters.HandleFunc("/login", servehtml)
posters.HandleFunc("/dologin", login.LoginFunc) posters.HandleFunc("/dologin", login.LoginFunc)
getters.HandleFunc("/logout", login.LogoutFunc) getters.HandleFunc("/logout", login.LogoutFunc)

7
views/about.html Normal file
View File

@ -0,0 +1,7 @@
{{ template "header.html" . }}
<main>
<div class="info">
<h3>What is honk?</h3>
<p>Honk is amazing!
</div>
</main>

View File

@ -20,6 +20,7 @@
<span><a href="/zonkzone">zonkzone</a></span> <span><a href="/zonkzone">zonkzone</a></span>
<span><a href="/account">account</a></span> <span><a href="/account">account</a></span>
{{ else }} {{ else }}
<span><a href="/about">about</a></span>
{{ if .ShowRSS }} {{ if .ShowRSS }}
<span><a href="/rss">rss</a></span> <span><a href="/rss">rss</a></span>
{{ end }} {{ end }}