mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-27 09:43:06 +00:00
children: remove W3C validator errors #337
if tree nesting with a depth > 1 is used, tags are in wrong order
This commit is contained in:
parent
29ef3c657a
commit
5090541ae0
1 changed files with 30 additions and 12 deletions
|
@ -50,23 +50,35 @@
|
||||||
{{- if hasPrefix $.style "h" }}
|
{{- if hasPrefix $.style "h" }}
|
||||||
{{- $num := sub ( int (trim $.style "h") ) 1 }}
|
{{- $num := sub ( int (trim $.style "h") ) 1 }}
|
||||||
{{- $numn := add $num $.count }}
|
{{- $numn := add $num $.count }}
|
||||||
|
{{ (printf "<h%d>" $numn)|safeHTML }}<a href="{{ .RelPermalink }}" >{{ .Title }}</a>{{ (printf "</h%d>" $numn)|safeHTML }}
|
||||||
{{ (printf "<h%d>" $numn)|safeHTML -}}
|
|
||||||
<a href="{{ .RelPermalink }}" >{{ .Title }}</a>
|
|
||||||
{{- (printf "</h%d>" $numn)|safeHTML }}
|
|
||||||
|
|
||||||
{{- else }}
|
|
||||||
{{ (printf "<%s>" $.style)|safeHTML -}}
|
|
||||||
<a href="{{ .RelPermalink }}" >{{ .Title }}</a>
|
|
||||||
{{- (printf "</%s>" $.style)|safeHTML }}
|
|
||||||
{{- end }}
|
|
||||||
|
|
||||||
{{- if $.description }}
|
{{- if $.description }}
|
||||||
{{- if .Description }}
|
{{- if .Description -}}
|
||||||
<p>{{ .Description }}</p>
|
<p>{{ .Description }}</p>
|
||||||
{{else}}
|
{{- else -}}
|
||||||
<p>{{ .Summary }}</p>
|
<p>{{ .Summary }}</p>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- else if eq $.style "li" }}
|
||||||
|
{{ (printf "<%s>" $.style)|safeHTML }}<a href="{{ .RelPermalink }}" >{{ .Title }}</a>
|
||||||
|
{{- if $.description }}
|
||||||
|
{{- if .Description -}}
|
||||||
|
<p>{{ .Description }}</p>
|
||||||
|
{{- else -}}
|
||||||
|
<p>{{ .Summary }}</p>
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- else }}
|
||||||
|
{{ (printf "<%s>" $.style)|safeHTML }}<a href="{{ .RelPermalink }}" >{{ .Title }}</a>{{ (printf "</%s>" $.style)|safeHTML }}
|
||||||
|
{{- if $.description }}
|
||||||
|
{{- if .Description -}}
|
||||||
|
<p>{{ .Description }}</p>
|
||||||
|
{{- else -}}
|
||||||
|
<p>{{ .Summary }}</p>
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if lt $.count $.depth }}
|
{{- if lt $.count $.depth }}
|
||||||
|
@ -102,6 +114,12 @@
|
||||||
{{- (printf "</%s>" $.containerstyle)|safeHTML }}
|
{{- (printf "</%s>" $.containerstyle)|safeHTML }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
{{- if not .IsHome }}
|
||||||
|
{{- if eq $.style "li" }}
|
||||||
|
{{- (printf "</%s>" $.style)|safeHTML -}}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
Loading…
Reference in a new issue