feat: Add icon on sidebar menu
This commit is contained in:
parent
c69fd0059f
commit
667b675aa3
|
@ -1 +1,17 @@
|
||||||
// Put your custom SCSS code here
|
// Put your custom SCSS code here
|
||||||
|
.docs-links {
|
||||||
|
overflow-y: inherit!important;
|
||||||
|
svg {
|
||||||
|
height: 24px!important;
|
||||||
|
width: 24px!important;
|
||||||
|
margin-bottom: 0!important;
|
||||||
|
}
|
||||||
|
.with-icon {
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
svg {
|
||||||
|
position: absolute;
|
||||||
|
left: calc(-24px - 1rem);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -88,7 +88,10 @@ skipped. To override this behavior, set $skipHome to false below.
|
||||||
<li {{- with $liClass }} class="{{ . }}" {{ end -}}>
|
<li {{- with $liClass }} class="{{ . }}" {{ end -}}>
|
||||||
{{- with $node.Page.Pages }}
|
{{- with $node.Page.Pages }}
|
||||||
<details{{- with $ariaCurrent }} open{{- end }}{{- if ne $node.Page.Params.sidebar.collapsed true }} open{{- end }}>
|
<details{{- with $ariaCurrent }} open{{- end }}{{- if ne $node.Page.Params.sidebar.collapsed true }} open{{- end }}>
|
||||||
<summary>{{ $linkContent }}</summary>
|
<summary>
|
||||||
|
{{ if $node.Page.Params.icon }}{{- partial "inline-svg" $node.Page.Params.icon -}}{{ end }}
|
||||||
|
{{ $linkContent }}
|
||||||
|
</summary>
|
||||||
<ul class="list-unstyled list-nested">
|
<ul class="list-unstyled list-nested">
|
||||||
{{- range . }}
|
{{- range . }}
|
||||||
{{- template "walk" (dict "node" . "currentPage" $currentPage) }}
|
{{- template "walk" (dict "node" . "currentPage" $currentPage) }}
|
||||||
|
|
Loading…
Reference in New Issue