Skip to content

Commit

Permalink
Rename mobile.* files to mobilemenu.*.
Browse files Browse the repository at this point in the history
  • Loading branch information
frjo committed Jan 22, 2025
1 parent 1994fe7 commit bcf25a8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions assets/js/mobile.js → assets/js/mobilemenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@
// Close the nav sheet after click (needed for anchor links).
const links = document.querySelectorAll('.mobile-nav__sheet a');
links.forEach(function (link) {
link.addEventListener('click', function (e) {
navclose();
});
link.addEventListener('click', () => navclose());
});

// Move focus back to button efter user tab out of last link.
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion layouts/partials/scripts.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
{{ end -}}

{{ if $.Param "mobilemenu" -}}
{{ $mobilemenu := resources.Get "js/mobile.js" | js.Build $opts | fingerprint -}}
{{ $mobilemenu := resources.Get "js/mobilemenu.js" | js.Build $opts | fingerprint -}}
<script defer src="{{ $mobilemenu.RelPermalink }}"></script>
{{ end -}}

Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/styles.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
{{ if eq hugo.Environment "development" -}}
{{ $main_options = merge $main_options (dict "outputStyle" "nested" "enableSourceMap" true) -}}
{{ end -}}
{{ $mobile_options := merge $main_options (dict "targetPath" "css/mobile.css") -}}
{{ $mobile_options := merge $main_options (dict "targetPath" "css/mobilemenu.css") -}}
{{ $print_options := merge $main_options (dict "targetPath" "css/print.css") -}}
{{ $main_style := resources.Get "sass/styles.scss" | toCSS $main_options -}}
{{ $mobile_style := resources.Get "sass/mobile.scss" | toCSS $mobile_options -}}
{{ $mobile_style := resources.Get "sass/mobilemenu.scss" | toCSS $mobile_options -}}
{{ $print_style := resources.Get "sass/print.scss" | toCSS $print_options -}}
{{ if ne hugo.Environment "development" -}}
{{ $main_style = $main_style | fingerprint -}}
Expand Down

0 comments on commit bcf25a8

Please sign in to comment.