Compare commits
4 Commits
2b1363b4c8
...
57d661a35c
Author | SHA1 | Date |
---|---|---|
Guillaume Haerinck | 57d661a35c | |
Andrew D. Anderson | 175059921f | |
guillaume-haerinck | 46b957095a | |
guillaume-haerinck | 9dc03b05c7 |
|
@ -91,3 +91,27 @@ body:not(.dark) #sun {
|
|||
.logo-switches {
|
||||
flex-wrap: inherit;
|
||||
}
|
||||
|
||||
.sub-menu {
|
||||
position: absolute;
|
||||
visibility: hidden;
|
||||
list-style: none;
|
||||
z-index: 10;
|
||||
border-radius: var(--radius);
|
||||
padding: 0 15px;
|
||||
background-color: var(--code-bg);
|
||||
border: 1px solid var(--tertiary);
|
||||
}
|
||||
|
||||
.sub-menu a:hover {
|
||||
text-shadow: 0px 0px 1px currentColor;
|
||||
}
|
||||
|
||||
.menu-item:hover .sub-menu {
|
||||
visibility: visible;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.sub-menu:hover {
|
||||
visibility: visible;
|
||||
}
|
||||
|
|
|
@ -125,7 +125,7 @@
|
|||
{{- $menu_item_url := (cond (strings.HasSuffix .URL "/") .URL (printf "%s/" .URL) ) | absLangURL }}
|
||||
{{- $page_url:= $currentPage.Permalink | absLangURL }}
|
||||
{{- $is_search := eq (site.GetPage .KeyName).Layout `search` }}
|
||||
<li>
|
||||
<li class="menu-item">
|
||||
<a href="{{ .URL | absLangURL }}" title="{{ .Title | default .Name }} {{- cond $is_search (" (Alt + /)" | safeHTMLAttr) ("" | safeHTMLAttr ) }}"
|
||||
{{- cond $is_search (" accesskey=/" | safeHTMLAttr) ("" | safeHTMLAttr ) }}>
|
||||
<span {{- if eq $menu_item_url $page_url }} class="active" {{- end }}>
|
||||
|
@ -141,7 +141,19 @@
|
|||
<path d="M10 14L21 3"></path>
|
||||
</svg>
|
||||
{{- end }}
|
||||
{{ if .HasChildren }}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" fill="currentColor" viewBox="0 0 14 14">
|
||||
<path d="M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z"/>
|
||||
</svg>
|
||||
{{ end }}
|
||||
</a>
|
||||
{{ if .HasChildren }}
|
||||
<div class="sub-menu">
|
||||
{{ range .Children }}
|
||||
<a href="{{ .URL }}">{{ .Name }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
|
|
|
@ -229,6 +229,10 @@
|
|||
<path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path>
|
||||
<polyline points="22,6 12,13 2,6"></polyline>
|
||||
</svg>
|
||||
{{- else if (eq $icon_name "ethereum") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
|
||||
<path d="M11.944 17.97L4.58 13.62 11.943 24l7.37-10.38-7.372 4.35h.003zM12.056 0L4.69 12.223l7.365 4.354 7.365-4.35L12.056 0z"/>
|
||||
</svg>
|
||||
{{- else if (eq $icon_name "exercism") -}}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2230.4 1817.9" fill="currentColor" stroke-width="2" stroke="currentColor">
|
||||
<path d="M0,905.1v-48.3c119-10.6,189.5-56.6,206.8-157.4c14.8-85.8-9.8-249.3-6.7-387.8c3.5-157,107.1-289.2,222.6-305.8
|
||||
|
|
Loading…
Reference in New Issue