go-examples/photoblog/templates/home.html

14 lines
304 B
HTML
Raw Permalink Normal View History

2017-07-29 14:51:12 +00:00
{{ template "header.html" . }}
2017-07-29 11:54:23 +00:00
<h1>Photo blog</h1>
{{ if .Username }}
2017-07-29 14:51:12 +00:00
<a class="mainlink" href="upload">Add photo</a>
2017-07-29 11:54:23 +00:00
{{ end }}
2017-07-29 14:51:12 +00:00
<ul class="photos">
{{ range .Photos }}
<li><a href="{{ . }}"><img src="{{ . }}"></a></li>
{{ else }}
<li>No photos</li>
{{ end }}
2017-07-29 11:54:23 +00:00
</ul>
{{ template "footer.html" }}