mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +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" }}
|
||||
{{- $num := sub ( int (trim $.style "h") ) 1 }}
|
||||
{{- $numn := add $num $.count }}
|
||||
{{ (printf "<h%d>" $numn)|safeHTML }}<a href="{{ .RelPermalink }}" >{{ .Title }}</a>{{ (printf "</h%d>" $numn)|safeHTML }}
|
||||
{{- if $.description }}
|
||||
{{- if .Description -}}
|
||||
<p>{{ .Description }}</p>
|
||||
{{- else -}}
|
||||
<p>{{ .Summary }}</p>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{ (printf "<h%d>" $numn)|safeHTML -}}
|
||||
<a href="{{ .RelPermalink }}" >{{ .Title }}</a>
|
||||
{{- (printf "</h%d>" $numn)|safeHTML }}
|
||||
{{- 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 }}
|
||||
{{- end }}
|
||||
|
||||
{{- if $.description }}
|
||||
{{- if .Description }}
|
||||
{{ (printf "<%s>" $.style)|safeHTML }}<a href="{{ .RelPermalink }}" >{{ .Title }}</a>{{ (printf "</%s>" $.style)|safeHTML }}
|
||||
{{- if $.description }}
|
||||
{{- if .Description -}}
|
||||
<p>{{ .Description }}</p>
|
||||
{{else}}
|
||||
{{- else -}}
|
||||
<p>{{ .Summary }}</p>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if lt $.count $.depth }}
|
||||
|
@ -102,6 +114,12 @@
|
|||
{{- (printf "</%s>" $.containerstyle)|safeHTML }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- if not .IsHome }}
|
||||
{{- if eq $.style "li" }}
|
||||
{{- (printf "</%s>" $.style)|safeHTML -}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
Loading…
Reference in a new issue