website/layouts/partials/section.html
ROOMrepair d15383ba89 fix: try to remove contents that do not match version in hover menu
Signed-off-by: ROOMrepair <twekjz@gmail.com>
2024-10-31 17:54:32 +08:00

22 lines
586 B
HTML

<ul class="common-flex-layout">
{{ if .ver }}
{{ $sections := where .context.Sections ".Params.section1.version" "==" .ver }}
{{ range $sections }}
{{ partial "section_item" . }}
{{ end }}
{{ range $sections }}
<li style="height: 0; margin: 0; padding: 0;"></li>
{{ end }}
<!-- render all -->
{{ else }}
{{ $sections := .context.Sections.ByWeight }}
{{ range $sections }}
{{ partial "section_item" . }}
{{ end }}
{{ range $sections }}
<li style="height: 0; margin: 0; padding: 0;"></li>
{{ end }}
{{ end }}
</ul>