diff --git a/themes/ccchh/assets/js/hamburgerAdditional.js b/themes/ccchh/assets/js/hamburgerAdditional.js new file mode 100644 index 0000000..73c602f --- /dev/null +++ b/themes/ccchh/assets/js/hamburgerAdditional.js @@ -0,0 +1,33 @@ +"use strict"; + +function setScrolling(enable = true) { + const body = document.body; + if (enable) { + body.style.overflow = "unset"; + } + else { + body.style.overflow = "hidden"; + } +}; + +document.addEventListener("DOMContentLoaded", () => { + const hamburgerMenuCheckbox = document.querySelector(".menu-button"); + + // When the hamburger menu is open, disable scrolling. + hamburgerMenuCheckbox.addEventListener("change", () => { + if (hamburgerMenuCheckbox.checked) { + setScrolling(false); + } + else { + setScrolling(true); + } + }); + + window.addEventListener("resize", () => { + if (window.innerWidth > 768 && hamburgerMenuCheckbox.checked) { + // Uncheck the checkbox to disable scrolling and to get to the original state. + hamburgerMenuCheckbox.checked = false; + hamburgerMenuCheckbox.dispatchEvent(new Event("change")); + } + }); +}); diff --git a/themes/ccchh/assets/pico-1.5.11/LICENSE.md b/themes/ccchh/assets/pico-1.5.11/LICENSE.md new file mode 100644 index 0000000..275ca7e --- /dev/null +++ b/themes/ccchh/assets/pico-1.5.11/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019-2023 Pico + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/themes/ccchh/assets/pico-1.5.11/scss/_functions.scss b/themes/ccchh/assets/pico-1.5.11/scss/_functions.scss new file mode 100644 index 0000000..160870c --- /dev/null +++ b/themes/ccchh/assets/pico-1.5.11/scss/_functions.scss @@ -0,0 +1,4 @@ +// Output color in RGB format +@function to-rgb($color) { + @return unquote("rgb(#{red($color)}, #{green($color)}, #{blue($color)})"); +} \ No newline at end of file diff --git a/themes/ccchh/assets/pico-1.5.11/scss/_variables.scss b/themes/ccchh/assets/pico-1.5.11/scss/_variables.scss new file mode 100644 index 0000000..e2f653e --- /dev/null +++ b/themes/ccchh/assets/pico-1.5.11/scss/_variables.scss @@ -0,0 +1,69 @@ +// Config +// –––––––––––––––––––– + +// Set the root element for $enable-semantic-container and $enable-responsive-spacings +$semantic-root-element: "body" !default; + +// Enable
,
,