Skip to content

Commit

Permalink
Fix/repair dropdown menu button (#362)
Browse files Browse the repository at this point in the history
* fix: repair burger menu button for mobiles

* fix: repair fetching zoom.min.js
  • Loading branch information
f-hollow authored Dec 16, 2024
1 parent eb32ae0 commit bc0dbce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 4 additions & 1 deletion layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@
{{ $jsRTL := resources.Get "js/rtl.js" }}
{{ $assets.Add "js" (slice $jsRTL) }}
{{ end }}
{{ $jsMobileMenu := resources.Get "js/mobilemenu.js" }}
{{ $assets.Add "js" (slice $jsMobileMenu) }}
{{ if $assets.Get "js" }}
{{ $bundleJS := $assets.Get "js" | resources.Concat "js/main.bundle.js" | resources.Minify | resources.Fingerprint
"sha512" }}
Expand All @@ -76,7 +78,8 @@
}}"></script>
{{ end }}
{{ if not .Site.Params.disableImageZoom | default true }}
<script src="{{ "js/zoom.min.js" | relURL }}"></script>
{{ $zoomJS := resources.Get "lib/zoom/zoom.min.js" | resources.Fingerprint "sha512" }}
<script src="{{ $zoomJS.RelPermalink }}" integrity="{{ $zoomJS.Data.Integrity }}"></script>
{{ end }}
{{/* Icons */}}
{{ if templates.Exists "partials/favicons.html" }}
Expand Down
5 changes: 2 additions & 3 deletions layouts/partials/header/basic.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@
</div>
<div class="-my-2 -mr-2 md:hidden">

<label id="menu-button" for="menu-controller" class="block">
<input type="checkbox" id="menu-controller" class="hidden" />
<label id="menu-button" class="block">
{{ if .Site.Menus.main }}
<div class="cursor-pointer hover:text-primary-600 dark:hover:text-primary-400">
{{ partial "icon.html" "bars" }}
Expand All @@ -102,7 +101,7 @@
<ul
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">

<li>
<li id="menu-close-button">
<span
class="cursor-pointer inline-block align-text-bottom hover:text-primary-600 dark:hover:text-primary-400 menu-close">{{
partial
Expand Down

0 comments on commit bc0dbce

Please sign in to comment.