mirror of https://github.com/jpanther/congo.git
fix; move function to another file
parent
a785bb0dbf
commit
8ae115e95c
|
@ -0,0 +1,6 @@
|
||||||
|
/*
|
||||||
|
Closes the hamburger menu when a link is clicked.
|
||||||
|
*/
|
||||||
|
function close_menu() {
|
||||||
|
document.getElementById('menu-controller').checked=false
|
||||||
|
}
|
|
@ -17,7 +17,7 @@ enableImageLazyLoading = true
|
||||||
fingerprintAlgorithm = "sha256"
|
fingerprintAlgorithm = "sha256"
|
||||||
|
|
||||||
[header]
|
[header]
|
||||||
layout = "basic" # valid options: basic, hamburger, hybrid, custom
|
layout = "hamburger" # valid options: basic, hamburger, hybrid, custom
|
||||||
# logo = "img/logo.jpg"
|
# logo = "img/logo.jpg"
|
||||||
# logoDark = "img/dark-logo.jpg"
|
# logoDark = "img/dark-logo.jpg"
|
||||||
showTitle = true
|
showTitle = true
|
||||||
|
|
|
@ -47,6 +47,10 @@
|
||||||
{{ $jsCode := resources.Get "js/code.js" }}
|
{{ $jsCode := resources.Get "js/code.js" }}
|
||||||
{{ $assets.Add "js" (slice $jsCode) }}
|
{{ $assets.Add "js" (slice $jsCode) }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
{{ if eq .Site.Params.header.layout "hamburger" }}
|
||||||
|
{{ $jsMenu := resources.Get "js/menu.js" }}
|
||||||
|
{{ $assets.Add "js" (slice $jsMenu) }}
|
||||||
|
{{ end }}
|
||||||
{{ if eq (site.Language.LanguageDirection | default "ltr") "rtl" }}
|
{{ if eq (site.Language.LanguageDirection | default "ltr") "rtl" }}
|
||||||
{{ $jsRTL := resources.Get "js/rtl.js" }}
|
{{ $jsRTL := resources.Get "js/rtl.js" }}
|
||||||
{{ $assets.Add "js" (slice $jsRTL) }}
|
{{ $assets.Add "js" (slice $jsRTL) }}
|
||||||
|
|
|
@ -93,7 +93,7 @@
|
||||||
<a
|
<a
|
||||||
href="{{ .URL }}"
|
href="{{ .URL }}"
|
||||||
title="{{ .Title }}"
|
title="{{ .Title }}"
|
||||||
onclick="document.getElementById('menu-controller').checked=false"
|
onclick="close_menu()"
|
||||||
{{ with .Params.target }}target="{{ . }}"{{ end }}
|
{{ with .Params.target }}target="{{ . }}"{{ end }}
|
||||||
>{{ with .Params.icon }}
|
>{{ with .Params.icon }}
|
||||||
<span
|
<span
|
||||||
|
|
Loading…
Reference in New Issue