mirror of
https://github.com/trwnh/hugo-theme-paradox.git
synced 2024-11-24 10:21:21 +00:00
add styling for details docs-menu
This commit is contained in:
parent
73d11f00b8
commit
22e851dbe9
|
@ -21,7 +21,7 @@
|
||||||
padding: 1em 0;
|
padding: 1em 0;
|
||||||
.menu {
|
.menu {
|
||||||
margin-top: 1em;
|
margin-top: 1em;
|
||||||
> li {
|
> li, > details {
|
||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
> a {
|
> a {
|
||||||
display: block;
|
display: block;
|
||||||
|
|
|
@ -10,10 +10,12 @@
|
||||||
{{ $currentPage := . }}
|
{{ $currentPage := . }}
|
||||||
{{ range .Site.Menus.docs }}
|
{{ range .Site.Menus.docs }}
|
||||||
{{ $active := or ($currentPage.IsMenuCurrent "docs" .) (eq $currentPage.Section .Identifier)}}
|
{{ $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 }}
|
{{ if .HasChildren }}
|
||||||
<summary href="{{ .URL | relLangURL }}">
|
<summary class='section-title{{- if $active }} active{{ end -}}'>
|
||||||
|
<a>
|
||||||
{{ .Pre }}<span>{{ .Name }}</span>{{ .Post }}
|
{{ .Pre }}<span>{{ .Name }}</span>{{ .Post }}
|
||||||
|
</a>
|
||||||
</summary>
|
</summary>
|
||||||
<ul class="sub-menu" data-depth=1>
|
<ul class="sub-menu" data-depth=1>
|
||||||
{{ range .Children }}
|
{{ range .Children }}
|
||||||
|
|
Loading…
Reference in a new issue