Fix formatting in partials

This commit is contained in:
vimux 2019-07-16 11:07:46 -04:00
parent 8b7b82cc4f
commit 0d5335ea31
No known key found for this signature in database
GPG key ID: 5A34FDC4EE832E34
2 changed files with 4 additions and 4 deletions

View file

@ -11,8 +11,8 @@
<ul id="menu" class="main-nav__list{{ if eq .Site.Params.mainMenuAlignment "right" }} main-nav__list--right{{ end }}">
{{- $currentNode := . }}
{{- range sort .Site.Menus.main }}
{{- if .Name}}
<li class="main-nav__item{{if or ($currentNode.IsMenuCurrent "main" .) ($currentNode.HasMenuCurrent "main" .) }} main-nav__item--active{{end}}">{{ if or ($currentNode.IsMenuCurrent "main" .) ($currentNode.HasMenuCurrent "main" .) }}{{ .Name }}{{ else }}<a class="main-nav__link" href="{{ .URL }}">{{ .Name }}</a>{{ end }}</li>
{{- if .Name }}
<li class="main-nav__item{{ if or ($currentNode.IsMenuCurrent "main" .) ($currentNode.HasMenuCurrent "main" .) }} main-nav__item--active{{ end }}">{{ if or ($currentNode.IsMenuCurrent "main" .) ($currentNode.HasMenuCurrent "main" .) }}{{ .Name }}{{ else }}<a class="main-nav__link" href="{{ .URL }}">{{ .Name }}</a>{{ end }}</li>
{{- end }}
{{- end }}
</ul>

View file

@ -1,6 +1,6 @@
{{- if not .Date.IsZero }}
<time class="post__meta-published meta-published" datetime="{{ .Date.Format "2006-01-02T15:04:05" }}">{{ .Date.Format ( .Site.Params.dateFormat | default "January 02, 2006" )}}</time>
<time class="post__meta-published meta-published" datetime="{{ .Date.Format "2006-01-02T15:04:05" }}">{{ .Date.Format ( .Site.Params.dateFormat | default "January 02, 2006" ) }}</time>
{{- end }}
{{- if ne .Date .Lastmod }}
<time class="post__meta-lastmod meta-lastmod" datetime="{{ .Lastmod.Format "2006-01-02T15:04:05" }}">{{ T "meta_lastmod" }}: {{ .Lastmod.Format ( .Site.Params.dateFormat | default "January 02, 2006" )}}</time>
<time class="post__meta-lastmod meta-lastmod" datetime="{{ .Lastmod.Format "2006-01-02T15:04:05" }}">{{ T "meta_lastmod" }}: {{ .Lastmod.Format ( .Site.Params.dateFormat | default "January 02, 2006" ) }}</time>
{{- end }}