mirror of
https://github.com/trwnh/hugo-theme-paradox.git
synced 2024-11-14 15:31: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;
|
||||
.menu {
|
||||
margin-top: 1em;
|
||||
> li {
|
||||
> li, > details {
|
||||
margin-bottom: 1em;
|
||||
> a {
|
||||
display: block;
|
||||
|
|
|
@ -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 }}
|
||||
|
|
Loading…
Reference in a new issue