add styling for details docs-menu

This commit is contained in:
a 2022-12-11 18:55:00 -06:00
parent 73d11f00b8
commit 22e851dbe9
2 changed files with 5 additions and 3 deletions

View File

@ -21,7 +21,7 @@
padding: 1em 0;
.menu {
margin-top: 1em;
> li {
> li, > details {
margin-bottom: 1em;
> a {
display: block;

View File

@ -10,10 +10,12 @@
{{ $currentPage := . }}
{{ range .Site.Menus.docs }}
{{ $active := or ($currentPage.IsMenuCurrent "docs" .) (eq $currentPage.Section .Identifier)}}
<details class='section-title{{- if $active }} active{{ end -}}' {{- if $active }} open{{ end -}}>
<details {{- if $active }} open{{ end -}}>
{{ if .HasChildren }}
<summary href="{{ .URL | relLangURL }}">
<summary class='section-title{{- if $active }} active{{ end -}}'>
<a>
{{ .Pre }}<span>{{ .Name }}</span>{{ .Post }}
</a>
</summary>
<ul class="sub-menu" data-depth=1>
{{ range .Children }}