diff options
author | Alan Pearce | 2020-01-06 21:33:51 +0100 |
---|---|---|
committer | Alan Pearce | 2020-01-06 21:34:07 +0100 |
commit | 6365d4b5a9a28222c4b14237f53adb1bee367083 (patch) | |
tree | 8c26f0c186a842de7c3da70568ee7f7a41fdf3fc /layouts/_default | |
parent | ccbf84f5d6a14968fe1a218f344b729365f39512 (diff) | |
download | hugo-xmin-6365d4b5a9a28222c4b14237f53adb1bee367083.tar.lz hugo-xmin-6365d4b5a9a28222c4b14237f53adb1bee367083.tar.zst hugo-xmin-6365d4b5a9a28222c4b14237f53adb1bee367083.zip |
Improve semanticity
Diffstat (limited to 'layouts/_default')
-rw-r--r-- | layouts/_default/baseof.html | 2 | ||||
-rw-r--r-- | layouts/_default/single.html | 35 |
2 files changed, 21 insertions, 16 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index b525b04..3e886a9 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -12,7 +12,7 @@ <body> <nav> - <ul class="menu"> + <ul> {{ range .Site.Menus.main }} <li><a href="{{ .URL | relURL }}">{{ .Name }}</a></li> {{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index fc7edb3..9fbe403 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,19 +1,24 @@ {{ define "main" }} -<div class="article-meta"> -<h1><span class="title">{{ .Title | markdownify }}</span></h1> -{{ with .Params.author }}<h2 class="author">{{ . }}</h2>{{ end }} -{{ if (gt .Params.date 0) }}<h2 class="date">{{ .Date.Format "2006-01-02" }}</h2>{{ end }} -<p class="terms"> - {{ range $i := (slice "categories" "tags") }} - {{ with ($.Param $i) }} - {{ $i | title }}: {{ range $k := . }}<a href="{{ relURL (print "/" $i "/" $k | urlize) }}">{{$k}}</a> {{ end }} - {{ end }} - {{ end }} -</p> -</div> +<article> + <header> + <h1><span class="title">{{ .Title | markdownify }}</span></h1> + {{ with .Params.author }}<h2 class="author">{{ . }}</h2>{{ end }} + {{ if (gt .Params.date 0) }}<h2 class="date">{{ .Date.Format "2006-01-02" }}</h2>{{ end }} + <p class="terms"> + {{ range $i := (slice "categories" "tags") }} + {{ with ($.Param $i) }} + {{ $i | title }}: {{ range $k := . }}<a href="{{ relURL (print "/" $i "/" $k | urlize) }}">{{$k}}</a> {{ end }} + {{ end }} + {{ end }} + </p> + </header> -<main> -{{ .Content }} -</main> + <main> + {{ .Content }} + </main> + <footer> + + </footer> +</article> {{- end }} |