Skip to content

Commit bc0dbce

Browse files
authored
Fix/repair dropdown menu button (#362)
* fix: repair burger menu button for mobiles * fix: repair fetching zoom.min.js
1 parent eb32ae0 commit bc0dbce

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

layouts/partials/head.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@
6868
{{ $jsRTL := resources.Get "js/rtl.js" }}
6969
{{ $assets.Add "js" (slice $jsRTL) }}
7070
{{ end }}
71+
{{ $jsMobileMenu := resources.Get "js/mobilemenu.js" }}
72+
{{ $assets.Add "js" (slice $jsMobileMenu) }}
7173
{{ if $assets.Get "js" }}
7274
{{ $bundleJS := $assets.Get "js" | resources.Concat "js/main.bundle.js" | resources.Minify | resources.Fingerprint
7375
"sha512" }}
@@ -76,7 +78,8 @@
7678
}}"></script>
7779
{{ end }}
7880
{{ if not .Site.Params.disableImageZoom | default true }}
79-
<script src="{{ "js/zoom.min.js" | relURL }}"></script>
81+
{{ $zoomJS := resources.Get "lib/zoom/zoom.min.js" | resources.Fingerprint "sha512" }}
82+
<script src="{{ $zoomJS.RelPermalink }}" integrity="{{ $zoomJS.Data.Integrity }}"></script>
8083
{{ end }}
8184
{{/* Icons */}}
8285
{{ if templates.Exists "partials/favicons.html" }}

layouts/partials/header/basic.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,7 @@
9191
</div>
9292
<div class="-my-2 -mr-2 md:hidden">
9393

94-
<label id="menu-button" for="menu-controller" class="block">
95-
<input type="checkbox" id="menu-controller" class="hidden" />
94+
<label id="menu-button" class="block">
9695
{{ if .Site.Menus.main }}
9796
<div class="cursor-pointer hover:text-primary-600 dark:hover:text-primary-400">
9897
{{ partial "icon.html" "bars" }}
@@ -102,7 +101,7 @@
102101
<ul
103102
class="flex space-y-2 mt-3 flex-col items-end w-full px-6 py-6 mx-auto overflow-visible list-none ltr:text-right rtl:text-left max-w-7xl menu-ul">
104103

105-
<li>
104+
<li id="menu-close-button">
106105
<span
107106
class="cursor-pointer inline-block align-text-bottom hover:text-primary-600 dark:hover:text-primary-400 menu-close">{{
108107
partial

0 commit comments

Comments
 (0)