diff options
Diffstat (limited to 'internal/web/templates/layouts')
| -rw-r--r-- | internal/web/templates/layouts/blog.html | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/internal/web/templates/layouts/blog.html b/internal/web/templates/layouts/blog.html index 7e3128e..ac6595b 100644 --- a/internal/web/templates/layouts/blog.html +++ b/internal/web/templates/layouts/blog.html @@ -19,9 +19,11 @@ </div> {{if eq .Data.theme.NavPosition "below-header"}}{{template "blognav" .}}{{end}} <div class="wrap body-wrap"> - {{if eq .Data.theme.NavPosition "left-sidebar"}}{{template "blognav" .}}{{end}} + {{if eq .Data.theme.NavPosition "left-sidebar"}}{{template "blognav" .}}{{if .Data.sidebar}}<div class="sidebar-notices">{{template "notices" .Data.sidebar}}</div>{{end}}{{end}} <div class="content"> + {{template "notices" .Data.above}} {{template "content" .}} + {{template "notices" .Data.below}} </div> </div> <div class="site-footer"> @@ -33,6 +35,12 @@ </body> </html>{{end}} +{{define "notices"}}{{range .}}<aside class="notice notice-{{.Style}}"> + {{if .Title}}<h3 class="notice-title">{{.Title}}</h3>{{end}} + <div class="notice-body">{{html .BodyHTML}}</div> +</aside> +{{end}}{{end}} + {{define "blognav"}}<div class="site-nav"><div class="wrap nav-inner"> {{range .Data.nav}}<a href="{{if .IsHome}}/{{else}}/{{.Slug}}{{end}}"{{if and $.Data.page (eq $.Data.page.ID .ID)}} class="active"{{end}}>{{.Title}}</a> {{end}}</div></div>{{end}} |
