mirror of
https://github.com/Brandon-Rozek/website-theme.git
synced 2025-10-09 18:21:15 +00:00
Refactored template code
This commit is contained in:
parent
b28e531f9f
commit
c3e09727a6
20 changed files with 332 additions and 395 deletions
|
@ -1,24 +1,10 @@
|
|||
{{ define "main"}}
|
||||
{{ partial "header.html" . }}
|
||||
<main>
|
||||
{{ if not .Date.IsZero }}
|
||||
<!-- date -->
|
||||
{{ $singlePageDateFormat := .Site.Params.singlePageDateFormat | default "January 2, 2006"}}
|
||||
<p class="date">{{ .Date.Format $singlePageDateFormat }}</p>
|
||||
{{ end }}
|
||||
<!-- tags -->
|
||||
<div id="tags">
|
||||
<ul>
|
||||
{{ range .Param "tags" }}
|
||||
{{ $name := . }}
|
||||
{{ with $.Site.GetPage (printf "/tags/%s" ($name | urlize)) }}
|
||||
<li><a href="{{ .Permalink }}">{{ $name }}</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
{{ partial "date.html" . }}
|
||||
{{ partial "tags_list_page.html" . }}
|
||||
<!-- content -->
|
||||
<div id="contentBody">
|
||||
<div class="e-content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</main>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue