maverick-wave 5.17.0 → 5.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/skills/mw-maverick-wave/SKILL.md +2 -2
- package/.claude/skills/mw-maverick-wave/references/layout.md +24 -0
- package/CHANGELOG.md +18 -0
- package/README.md +2 -2
- package/index.html +1 -1
- package/maverick-wave.min.css +3 -3
- package/maverick-wave.min.js +1 -1
- package/package.json +2 -2
- package/src/js/main.js +14 -24
- package/src/partials/header-container.html +6 -3
- package/src/partials/parallax-container.html +13 -2
- package/src/scss/abstracts/_mixins.scss +5 -1
- package/src/scss/components/_theme-toggle.scss +0 -5
- package/src/scss/layout/_header-reveal.scss +115 -4
- package/src/scss/layout/_header.scss +109 -56
package/maverick-wave.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){"use strict";function e(e,t){e&&(e.classList.toggle("mw-active",t),t||e.classList.remove("active"))}function t(e){return!!e&&(e.classList.contains("mw-active")||e.classList.contains("active"))}function n(){const e=Array.from(document.querySelectorAll(".color-swatch")),t=e.map(e=>function(e){if(!e||"transparent"===e)return"#000000";const t=e=>Math.max(0,Math.min(255,Math.round(e))).toString(16).padStart(2,"0"),n=e.match(/color\(srgb\s+([\d.]+)\s+([\d.]+)\s+([\d.]+)(?:\s*\/\s*([\d.]+))?\)/);if(n){const e="#"+t(255*n[1])+t(255*n[2])+t(255*n[3]),a=void 0===n[4]?1:parseFloat(n[4]);return(a<1?`${e} / ${a}`:e).toUpperCase()}const a=e.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)/);if(!a)return e;const o="#"+t(a[1])+t(a[2])+t(a[3]),r=void 0===a[4]?1:parseFloat(a[4]);return(r<1?`${o} / ${r}`:o).toUpperCase()}(window.getComputedStyle(e).backgroundColor));e.forEach((e,n)=>{const a=e.parentElement.querySelector(".mw-text-muted");a&&(a.textContent=t[n])})}function a(){const e=parseFloat(getComputedStyle(document.documentElement).scrollPaddingTop);return Number.isNaN(e)?0:e}document.addEventListener("DOMContentLoaded",function(){document.querySelectorAll(".mw-gallery").forEach(e=>{const t=e.closest(".mw-gallery-container")||e.parentElement;t&&function(e,t){const n=t.querySelector(".mw-gallery-track");if(!n||!n.children.length)return;const a=n.children,o=e.querySelector(".mw-gallery-dots"),r=e.querySelector(".mw-gallery-desc"),c=t.querySelector(".mw-gallery-navi-prev"),s=t.querySelector(".mw-gallery-navi-next");let l=0;function i(e){const t=a.length;l=(e+t)%t,n.style.transform=`translateX(-${100*l}%)`,o&&o.querySelectorAll(".mw-gallery-dot").forEach((e,t)=>{e.classList.toggle("mw-active",t===l)}),r&&(r.textContent=a[l].dataset.desc||"")}if(o)for(let e=0;e<a.length;e++){const t=document.createElement("button");t.type="button",t.className="mw-gallery-dot"+(0===e?" mw-active":""),t.setAttribute("aria-label","Go to slide "+(e+1)),t.addEventListener("click",()=>i(e)),o.appendChild(t)}c&&c.addEventListener("click",()=>i(l-1)),s&&s.addEventListener("click",()=>i(l+1));let d=0,u=0,m=!1;n.addEventListener("touchstart",e=>{m=1===e.touches.length,m&&(d=e.touches[0].clientX,u=e.touches[0].clientY)},{passive:!0}),n.addEventListener("touchcancel",()=>m=!1),n.addEventListener("touchend",e=>{if(!m)return;m=!1;const t=e.changedTouches[0].clientX-d,n=e.changedTouches[0].clientY-u;Math.abs(t)<50||Math.abs(t)<=Math.abs(n)||i(l+(t<0?1:-1))},{passive:!0}),i(0)}(t,e)}),function(){const t=document.querySelector(".mw-theme-toggle");if(!t)return;const a=document.body,o=document.documentElement,r=t.querySelector(".mw-theme-toggle-slider i"),c=getComputedStyle(document.documentElement).getPropertyValue("--mw-internal-theme-mode").trim()||"switchable";if("switchable"!==c)return console.log(`Theme mode fixed to: ${c}. Disabling toggle.`),r&&(r.className="light"===c?"fas fa-sun":"fas fa-moon"),e(t,"light"===c),t.style.opacity="0.4",t.style.pointerEvents="none",t.style.cursor="default",t.setAttribute("aria-disabled","true"),localStorage.removeItem("mw-theme"),void a.classList.remove("mw-theme-light","mw-theme-dark");const s=window.matchMedia("(prefers-color-scheme: light)"),l=window.CSS&&CSS.supports("color","light-dark(#000, #fff)"),i=()=>l&&s.matches,d=localStorage.getItem("mw-theme");let u=d?"light"===d:i();const m=n=>{o.classList.add("mw-theme-switching"),a.classList.toggle("mw-theme-light",n),a.classList.toggle("mw-theme-dark",!n),o.offsetHeight,o.classList.remove("mw-theme-switching"),e(t,n),r&&(r.className=n?"fas fa-sun":"fas fa-moon")};m(u),s.addEventListener("change",()=>{localStorage.getItem("mw-theme")||(u=i(),m(u),n())}),t.addEventListener("click",()=>{u=!u,m(u),localStorage.setItem("mw-theme",u?"light":"dark"),n()})}(),n(),document.querySelectorAll(".mw-accordion-header").forEach(n=>{const a="BUTTON"===n.tagName;a&&n.setAttribute("aria-expanded",String(t(n))),n.addEventListener("click",function(){const n=!t(this);e(this,n),e(this.nextElementSibling,n),a&&this.setAttribute("aria-expanded",String(n))})}),function(){const e=document.querySelector(".mw-menu-btn"),t=document.querySelector(".mw-navbar");if(!e||!t)return;const n="BUTTON"===e.tagName;function a(a){e.classList.toggle("open",a),t.classList.toggle("open",a),n&&e.setAttribute("aria-expanded",String(a))}function o(e){e.preventDefault(),e.stopPropagation(),a(!t.classList.contains("open"))}e.addEventListener("click",o),e.addEventListener("touchstart",o,{passive:!1}),document.addEventListener("click",function(n){t.classList.contains("open")&&(t.contains(n.target)||e.contains(n.target)||a(!1))}),document.addEventListener("keydown",function(n){"Escape"===n.key&&t.classList.contains("open")&&(a(!1),e.focus())})}(),function(){const e=document.querySelectorAll(".mw-progress-fill");if(!e.length)return;const t=CSS.supports("animation-timeline","view()"),n=e=>e.dataset.value?e.dataset.value+"%":e.style.width,a=[];if(e.forEach(e=>{const o=n(e);o&&(e.style.setProperty("--mw-progress-value",o),t?e.classList.add("mw-progress-driven"):a.push(e))}),t)return;const o=new IntersectionObserver((e,t)=>{e.forEach(e=>{e.isIntersecting&&(e.target.style.width=n(e.target),t.unobserve(e.target))})},{root:null,threshold:.2});a.forEach(e=>o.observe(e))}(),function(){if(CSS.supports("animation-timeline","view()"))return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;const e=document.querySelectorAll(".mw-reveal, .mw-reveal-stagger > *");if(!e.length)return;const t=e=>{const t=e.parentElement;if(!t||!t.classList.contains("mw-reveal-stagger"))return 0;const n=getComputedStyle(t).gridTemplateColumns.split(" ").length;return[...t.children].indexOf(e)%n*90},n=new IntersectionObserver((e,n)=>{e.forEach(e=>{e.isIntersecting&&(n.unobserve(e.target),e.target.style.animationDelay=t(e.target)+"ms",e.target.classList.replace("mw-reveal-hidden","mw-reveal-run"))})},{threshold:.15});e.forEach(e=>{e.getBoundingClientRect().top<window.innerHeight||(e.classList.add("mw-reveal-hidden"),n.observe(e))})}(),function(){const e=document.querySelector(".mw-header-reveal");if(!e)return;if(CSS.supports("animation-timeline","scroll()"))return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;const t=document.querySelector(".mw-announcement:not(.mw-announcement-static)"),n=270;let a=null;const o=()=>{const o=window.scrollY<n;o!==a&&(a=o,e.classList.toggle("mw-header-away",o),t&&t.classList.toggle("mw-announcement-away",o))};o(),requestAnimationFrame(()=>{e.classList.add("mw-header-driven"),t&&t.classList.add("mw-announcement-driven")}),window.addEventListener("scroll",o,{passive:!0})}(),function(){if(CSS.supports("animation-timeline","view()"))return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;const e=document.querySelectorAll(".mw-parallax-media");if(!e.length)return;const t=[...e].map(e=>(e.classList.add("mw-parallax-driven"),{el:e,pinned:Boolean(e.closest(".mw-parallax-sticky"))})),n=e=>Math.min(1,Math.max(0,e)),a=(e,t)=>{if(e.pinned)return n(window.scrollY/t);const a=e.el.getBoundingClientRect();return n((t-a.top)/(t+a.height))};let o=!1;const r=()=>{o=!1;const e=document.documentElement.clientHeight,n=t.map(t=>a(t,e));t.forEach((e,t)=>e.el.style.setProperty("--mw-parallax-progress",n[t]))},c=()=>{o||(o=!0,requestAnimationFrame(r))};r(),window.addEventListener("scroll",c,{passive:!0}),window.addEventListener("resize",c,{passive:!0})}(),function(){function e(e){const t=e.style.position,n="sticky"===getComputedStyle(e).position;n&&(e.style.position="static");const a=e.getBoundingClientRect().top+window.scrollY;return n&&(e.style.position=t),a}function t(e){const t=window.scrollY,n=e-t;if(!n)return;const a=Math.min(2e3,600+.5*Math.abs(n)),r={};o=r;let c=null;function s(e){if(o!==r)return;null===c&&(c=e);const l=Math.min(1,(e-c)/a),i=l<.5?4*l*l*l:1-Math.pow(-2*l+2,3)/2;window.scrollTo({top:t+n*i,behavior:"instant"}),l<1?requestAnimationFrame(s):o=null}requestAnimationFrame(s)}document.querySelectorAll('a[href^="#"]').forEach(n=>{n.addEventListener("click",function(n){const o=this.getAttribute("href");if("#"===o)return;const r=document.querySelector(o);if(!r)return;const c=document.querySelector(".mw-menu-btn"),s=document.querySelector(".mw-navbar");c&&s&&(c.classList.remove("open"),s.classList.remove("open")),n.preventDefault();const l=Math.max(0,e(r)-a());r.hasAttribute("tabindex")||r.setAttribute("tabindex","-1"),r.focus({preventScroll:!0}),window.matchMedia("(prefers-reduced-motion: reduce)").matches?window.scrollTo({top:l,behavior:"instant"}):t(l),history.replaceState(null,"",o)})})}(),function(){const t=document.querySelectorAll("section[id]"),n=document.querySelectorAll(".mw-navbar-link");if(0===t.length||0===n.length)return;window.addEventListener("scroll",function(e,t){let n;return function(){const a=this,o=arguments;clearTimeout(n),n=setTimeout(()=>e.apply(a,o),t)}}(function(){let o="";const r=a()+2;t.forEach(e=>{const t=e.offsetTop-r,n=e.clientHeight;scrollY>=t&&scrollY<t+n&&(o=e.getAttribute("id"))}),n.forEach(t=>{e(t,!1);const n=t.getAttribute("href");if(n){const a=n.indexOf("#");if(-1!==a){n.substring(a+1)===o&&e(t,!0)}}})},100),{passive:!0})}(),document.querySelectorAll(".mw-tabs-nav").forEach(e=>{const t=Array.from(e.querySelectorAll(".mw-tabs-nav-item"));if(!t.length)return;const n=!!e.closest(".mw-tabs-vertical");e.setAttribute("role","tablist"),n&&e.setAttribute("aria-orientation","vertical"),t.forEach((e,a)=>{const o=c(e);e.setAttribute("role","tab"),e.id||(e.id=(o?o.id:"mw-tab-"+a)+"-tab"),o&&(e.setAttribute("aria-controls",o.id),o.setAttribute("role","tabpanel"),o.setAttribute("aria-labelledby",e.id)),s(e),e.addEventListener("click",()=>l(t,e)),e.addEventListener("keydown",e=>{const o=function(e,t,n,a){const o=t?"ArrowUp":"ArrowLeft",r=t?"ArrowDown":"ArrowRight";return e.key===o?(a-1+n)%n:e.key===r?(a+1)%n:"Home"===e.key?0:"End"===e.key?n-1:null}(e,n,t.length,a);null!==o&&(e.preventDefault(),l(t,t[o]),t[o].focus())})}),r(e);const a=new ResizeObserver(()=>r(e));a.observe(e),t.forEach(e=>a.observe(e))}),document.querySelectorAll(".mw-alert-close").forEach(e=>{e.addEventListener("click",function(){const e=this.closest(".mw-alert");e&&(e.classList.add("mw-alert-closing"),setTimeout(()=>{e.classList.add("mw-alert-closed")},300))})}),function(){const e=document.querySelector(".mw-localhost-indicator-activated"),t=document.querySelector(".mw-header");if(e&&i()){const e=document.createElement("div");e.className="mw-localhost-indicator-pulse",t.prepend(e)}}(),function(){if(!i())return;const e=document.querySelector('meta[name="viewport"]'),t=e&&e.getAttribute("content")||"";if(/viewport-fit\s*=\s*cover/.test(t))return;console.warn('MaverickWave: <meta name="viewport"> is missing viewport-fit=cover. env(safe-area-inset-*) resolves to 0 without it, so notched phones lose the gutter, the nav panel and the modal padding that expect it.')}(),document.querySelectorAll(".mw-slider-container").forEach(e=>{const t=e.querySelector(".mw-slider"),n=e.querySelector(".mw-slider-value");if(!t||!n)return;const a=()=>{const e=Number(t.value),a=Number(t.max)||100,o=Math.round(e/a*100);t.style.setProperty("--value",o+"%"),n.classList.contains("mw-slider-numeric")?n.setAttribute("data-value",e):n.setAttribute("data-value",o)};t.addEventListener("input",a),a()}),document.addEventListener("click",e=>{const t=e.target.closest(".mw-modal-close");if(t){const e=t.closest("dialog.mw-modal");if(e)return void e.close();const n=t.closest(".mw-modal-overlay");return void(n&&n.classList.remove("mw-modal-open"))}const n=e.target.closest("[data-mw-modal]");var a;n?d(document.getElementById(n.dataset.mwModal)):e.target.matches("dialog.mw-modal[open]")&&(!("closedBy"in(a=e.target))||null===a.getAttribute("closedby"))&&e.target.close()}),function(){const e=document.getElementById("login-button");e&&e.addEventListener("click",function(){const e=this.querySelector("i");e.classList.contains("fa-lock")?(e.classList.remove("fa-lock"),e.classList.add("fa-lock-open")):(e.classList.remove("fa-lock-open"),e.classList.add("fa-lock"))})}(),document.querySelectorAll(".mw-image-slider").forEach(t=>{const n=t.querySelectorAll(".mw-image-slider-overlay-image"),a=t.querySelectorAll("button[data-index]");if(!n.length||!a.length)return;let o=0;function r(){n.forEach(t=>{e(t,parseInt(t.dataset.index)===o)}),a.forEach(t=>{e(t,parseInt(t.dataset.index)===o)})}function c(e){o=e,r()}a.forEach(e=>{e.addEventListener("click",()=>{c(parseInt(e.dataset.index))})}),r()}),document.querySelectorAll(".mw-item-list-checkbox, .mw-item-list-checkbox-scroll").forEach(e=>{e.querySelectorAll("li").forEach(e=>{const t=e.querySelector('input[type="checkbox"]'),n=e.querySelector(".mw-checkbox");t&&n&&(t.checked&&e.classList.add("mw-selected"),e.addEventListener("click",function(e){e.target!==t&&e.target.closest(".mw-checkbox")!==n&&toggleCheckbox(this)}),t.addEventListener("change",function(){const e=this.closest("li");this.checked?e.classList.add("mw-selected"):e.classList.remove("mw-selected"),e.dispatchEvent(new CustomEvent("checkboxToggle",{detail:{checked:this.checked,item:e}}))}),n.addEventListener("click",function(e){setTimeout(()=>{const e=this.closest("li");this.querySelector('input[type="checkbox"]').checked?e.classList.add("mw-selected"):e.classList.remove("mw-selected")},0)}))})}),document.addEventListener("checkboxToggle",function(e){console.log("Checkbox toggled:",e.detail.checked,e.detail.item)}),document.querySelectorAll(".mw-kanban").forEach(u),document.querySelectorAll("[data-calendar]").forEach(m),function(){function e(e){document.querySelectorAll(".mw-dropdown[open]").forEach(t=>{t!==e&&t.removeAttribute("open")})}document.addEventListener("click",function(t){const n=t.target.closest(".mw-dropdown");e(n),n&&t.target.closest(".mw-dropdown-item")&&n.removeAttribute("open")}),document.addEventListener("keydown",function(e){if("Escape"!==e.key)return;const t=document.querySelector(".mw-dropdown[open]");if(!t)return;t.removeAttribute("open");const n=t.querySelector("summary");n&&n.focus()})}(),document.querySelectorAll(".mw-lang-switch").forEach(t=>{const n=t.querySelectorAll("[data-mw-lang]"),a=t.querySelector("summary"),o=t.querySelector("summary .mw-flag"),r=t.querySelector("summary .mw-lang-switch-code");n.forEach(c=>{c.addEventListener("click",function(){const s=c.dataset.mwLang,l=c.querySelector(".mw-lang-switch-name"),i=l?l.textContent.trim():s;n.forEach(t=>{e(t,t===c),t===c?t.setAttribute("aria-current","true"):t.removeAttribute("aria-current")}),r&&(r.textContent=s);const d=c.querySelector(".mw-flag");o&&d&&(o.className=d.className),a&&a.setAttribute("aria-label","Language: "+i),t.dispatchEvent(new CustomEvent("mw-language-change",{bubbles:!0,detail:{lang:s,name:i}}))})})})}),window.toggleCheckbox=function(e){const t=e.querySelector('input[type="checkbox"]');if(!t)return;const n=t.checked;t.checked=!n,t.checked?e.classList.add("mw-selected"):e.classList.remove("mw-selected"),e.dispatchEvent(new CustomEvent("checkboxToggle",{detail:{checked:t.checked,item:e}}))};let o=null;function r(e){const t=e.querySelector(".mw-tabs-nav-item.mw-active, .mw-tabs-nav-item.active");t?(e.style.setProperty("--mw-tabs-marker-x",t.offsetLeft+"px"),e.style.setProperty("--mw-tabs-marker-w",t.offsetWidth),e.style.setProperty("--mw-tabs-marker-y",t.offsetTop+"px"),e.style.setProperty("--mw-tabs-marker-h",t.offsetHeight),e.setAttribute("data-mw-tabs-marker","")):e.removeAttribute("data-mw-tabs-marker")}function c(e){const t=e.getAttribute("data-tab");return t?document.getElementById(t):null}function s(e){const n=t(e);e.setAttribute("aria-selected",String(n)),e.tabIndex=n?0:-1}function l(t,n){t.forEach(t=>{const a=t===n;e(t,a),e(c(t),a),s(t)});const a=n.closest(".mw-tabs-nav");a&&r(a)}function i(){const e=window.location.hostname;return"localhost"===e||"127.0.0.1"===e||e.includes("192.168.")}function d(e){e&&("DIALOG"===e.tagName?e.showModal():e.classList.add("mw-modal-open"))}function u(e){const t=Array.from(e.querySelectorAll(".mw-kanban-column")),n=e.querySelector(".mw-kanban-composer"),a=e.querySelector(".mw-kanban-card-template"),o=e.dataset.kanbanPrefix||"MW",r=n.querySelector(".mw-kanban-composer-title"),c=n.querySelector(".mw-kanban-composer-text"),s=n.querySelector(".mw-kanban-composer-priority"),l=n.querySelector(".mw-kanban-composer-assignee");let i=null;function d(){t.forEach(function(e,n){const a=e.querySelectorAll(".mw-kanban-card"),o=e.querySelector(".mw-kanban-count");o&&(o.textContent=a.length),e.querySelectorAll("[data-kanban-move]").forEach(function(e){const a=n+parseInt(e.dataset.kanbanMove,10);e.disabled=a<0||a>=t.length})})}function u(e,t){const n=e.querySelector(t);return n?n.textContent.replace(/\s+/g," ").trim():""}function m(e,t){w(),i=t||null,r.value=t?u(t,".mw-kanban-card-title"):"",c.value=t?u(t,".mw-kanban-card-text"):"",s.value=t?function(e){const t=e.querySelector(".mw-card-ribbon");if(!t)return"";const n=Array.from(t.classList).find(function(e){return 0===e.indexOf("mw-card-addon-")});return n?n.replace("mw-card-addon-",""):""}(t):"",l.value=t?function(e){const t=e.querySelector(".mw-avatar-initials");return t?t.textContent.trim():""}(t):"",t?(t.classList.add("mw-kanban-editing"),t.before(n)):e.querySelector(".mw-kanban-column-body").prepend(n),n.classList.add("mw-active"),r.focus()}function w(){n.classList.remove("mw-active"),i&&i.classList.remove("mw-kanban-editing"),i=null}function f(){const t=r.value.trim();if(!t)return void r.focus();const u=i||a.content.firstElementChild.cloneNode(!0);if(u.querySelector(".mw-kanban-card-title").textContent=t,u.querySelector(".mw-kanban-card-text").textContent=c.value.trim(),function(e,t){const n=e.querySelector(".mw-card-ribbon");if(n&&n.remove(),!t||!t.value)return;const a=document.createElement("div");a.className="mw-card-ribbon mw-card-addon-"+t.value,a.textContent=t.textContent,e.prepend(a)}(u,s.selectedOptions[0]),function(e,t){const n=e.querySelector(".mw-kanban-card-actions"),a=n.querySelector(".mw-avatar");if(!t)return void(a&&a.remove());const o=a||document.createElement("div");o.className="mw-avatar mw-avatar-xs mw-avatar-initials",o.textContent=t,a||n.prepend(o)}(u,l.value),!i){const t=function(){const t=Array.from(e.querySelectorAll(".mw-kanban-card-id")).map(function(e){return parseInt(e.textContent.split("-").pop(),10)||0});return o+"-"+(Math.max(0,...t)+1)}();u.classList.add("mw-kanban-card-in"),u.querySelector(".mw-kanban-card-id").textContent=t,u.querySelectorAll("[aria-label]").forEach(function(e){e.setAttribute("aria-label",e.getAttribute("aria-label").replace(/[A-Z]+-\d+/,t))}),n.before(u)}w(),d()}const h=["mw-kanban-card-moved-forward","mw-kanban-card-moved-back"];e.addEventListener("click",function(e){const n=e.target.closest("[data-kanban-move]");if(n){if(function(e,n){const a=e.closest(".mw-kanban-column"),o=t[t.indexOf(a)+n];o&&(o.querySelector(".mw-kanban-column-body").appendChild(e),e.classList.remove.apply(e.classList,h),e.offsetWidth,e.classList.add(n>0?h[0]:h[1]),d())}(n.closest(".mw-kanban-card"),parseInt(n.dataset.kanbanMove,10)),n.disabled){const e=n.parentElement.querySelector("[data-kanban-move]:not(:disabled)");e&&e.focus()}return}const a=e.target.closest(".mw-kanban-edit");if(a){const e=a.closest(".mw-kanban-card");return void m(e.closest(".mw-kanban-column"),e)}const o=e.target.closest(".mw-kanban-delete");if(o){const e=o.closest(".mw-kanban-card");return e===i&&w(),e.remove(),void d()}const r=e.target.closest(".mw-kanban-add");r?m(r.closest(".mw-kanban-column"),null):e.target.closest(".mw-kanban-composer-cancel")&&w()}),n.addEventListener("submit",function(e){e.preventDefault(),f()}),n.addEventListener("keydown",function(e){"Escape"===e.key&&w()}),d()}function m(e){const t=e.querySelector(".mw-calendar-grid"),n=e.querySelector(".mw-calendar-title");if(!t)return;const a="week"===e.dataset.calendar,o=function(e){if(!e)return{};try{return JSON.parse(e)}catch(e){return{}}}(e.dataset.calendarMarkers),r=e.dataset.calendarLocale||document.documentElement.lang||void 0,c=new Date;c.setHours(0,0,0,0);let s=e.dataset.calendarDate?new Date(e.dataset.calendarDate+"T00:00:00"):new Date(c),l=e.dataset.calendarSelected||"";function i(e){const t=new Date(e);return t.setDate(t.getDate()-(t.getDay()+6)%7),t}function d(e){return e.getFullYear()+"-"+String(e.getMonth()+1).padStart(2,"0")+"-"+String(e.getDate()).padStart(2,"0")}function u(){if(!a)return s.toLocaleDateString(r,{month:"long",year:"numeric"});const e=i(s),t=new Date(e);t.setDate(t.getDate()+6);const n=e.toLocaleDateString(r,{day:"numeric",month:e.getMonth()===t.getMonth()?void 0:"short"}),o=t.toLocaleDateString(r,{day:"numeric",month:"short",year:"numeric"});return"Week "+function(e){const t=i(e);t.setDate(t.getDate()+3);const n=i(new Date(t.getFullYear(),0,4));return n.setDate(n.getDate()+3),1+Math.round((t-n)/6048e5)}(e)+" · "+n+" - "+o}function m(e){const t=e.getDay();return 0===t||6===t}function w(e,t){const n=d(e),s=document.createElement("button");s.type="button",s.className="mw-calendar-day",s.tabIndex=-1,s.dataset.calendarDay=n,s.setAttribute("aria-pressed",n===l?"true":"false"),s.setAttribute("aria-label",e.toLocaleDateString(r,{weekday:"long",day:"numeric",month:"long",year:"numeric"})),m(e)&&s.classList.add("mw-calendar-weekend"),a||e.getMonth()===t||s.classList.add("mw-calendar-adjacent"),n===d(c)&&(s.classList.add("mw-calendar-today"),s.setAttribute("aria-current","date")),n===l&&s.classList.add("mw-selected");const i=document.createElement("span");i.className="mw-calendar-date",i.textContent=e.getDate(),s.appendChild(i);const u=[].concat(o[n]||[]);if(u.length){const e=document.createElement("span");e.className="mw-calendar-dots",u.forEach(function(t){const n=document.createElement("span");n.className=t?"mw-calendar-dot mw-calendar-dot-"+t:"mw-calendar-dot",e.appendChild(n)}),s.appendChild(e)}return s}function f(){const e=s.getMonth(),o=a?7:42,c=i(a?s:new Date(s.getFullYear(),e,1));t.innerHTML="",function(){const e=i(new Date);for(let n=0;n<7;n++){const n=document.createElement("div");n.className="mw-calendar-weekday",m(e)&&n.classList.add("mw-calendar-weekend"),n.setAttribute("aria-hidden","true"),n.textContent=e.toLocaleDateString(r,{weekday:"short"}),t.appendChild(n),e.setDate(e.getDate()+1)}}();for(let n=0;n<o;n++)t.appendChild(w(c,e)),c.setDate(c.getDate()+1);n&&(n.textContent=u()),function(){const e=t.querySelector(".mw-selected")||t.querySelector(".mw-calendar-today")||t.querySelector(".mw-calendar-day:not(.mw-calendar-adjacent)")||t.querySelector(".mw-calendar-day");e&&(e.tabIndex=0)}()}e.addEventListener("click",function(n){const o=n.target.closest("[data-calendar-nav]");if(o)return r=parseInt(o.dataset.calendarNav,10),a?s.setDate(s.getDate()+7*r):s=new Date(s.getFullYear(),s.getMonth()+r,1),void f();var r;const c=n.target.closest(".mw-calendar-day");var i;c&&!c.disabled&&(i=c.dataset.calendarDay,l=i===l?"":i,t.querySelectorAll(".mw-calendar-day").forEach(function(e){const t=e.dataset.calendarDay===l;e.classList.toggle("mw-selected",t),e.setAttribute("aria-pressed",t?"true":"false")}),e.dispatchEvent(new CustomEvent("mw-calendar-select",{bubbles:!0,detail:{date:l}})))}),t.addEventListener("keydown",function(e){const n={ArrowLeft:-1,ArrowRight:1,ArrowUp:-7,ArrowDown:7}[e.key];if(!n)return;const a=e.target.closest(".mw-calendar-day");if(!a)return;e.preventDefault();const o=new Date(a.dataset.calendarDay+"T00:00:00");o.setDate(o.getDate()+n),function(e){const n=d(e);let a=t.querySelector('[data-calendar-day="'+n+'"]');a||(s=new Date(e),f(),a=t.querySelector('[data-calendar-day="'+n+'"]')),a&&(t.querySelectorAll(".mw-calendar-day").forEach(function(e){e.tabIndex=-1}),a.tabIndex=0,a.focus())}(o)}),f()}["wheel","touchstart"].forEach(e=>{window.addEventListener(e,()=>o=null,{passive:!0})}),window.mwOpenModal=e=>d(document.getElementById(e)),window.mwCloseModal=e=>{var t;(t=document.getElementById(e))&&("DIALOG"===t.tagName?t.close():t.classList.remove("mw-modal-open"))},window.mwRefreshColorSwatches=n}();
|
|
1
|
+
!function(){"use strict";function e(e,t){e&&(e.classList.toggle("mw-active",t),t||e.classList.remove("active"))}function t(e){return!!e&&(e.classList.contains("mw-active")||e.classList.contains("active"))}function n(){const e=Array.from(document.querySelectorAll(".color-swatch")),t=e.map(e=>function(e){if(!e||"transparent"===e)return"#000000";const t=e=>Math.max(0,Math.min(255,Math.round(e))).toString(16).padStart(2,"0"),n=e.match(/color\(srgb\s+([\d.]+)\s+([\d.]+)\s+([\d.]+)(?:\s*\/\s*([\d.]+))?\)/);if(n){const e="#"+t(255*n[1])+t(255*n[2])+t(255*n[3]),a=void 0===n[4]?1:parseFloat(n[4]);return(a<1?`${e} / ${a}`:e).toUpperCase()}const a=e.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)/);if(!a)return e;const r="#"+t(a[1])+t(a[2])+t(a[3]),o=void 0===a[4]?1:parseFloat(a[4]);return(o<1?`${r} / ${o}`:r).toUpperCase()}(window.getComputedStyle(e).backgroundColor));e.forEach((e,n)=>{const a=e.parentElement.querySelector(".mw-text-muted");a&&(a.textContent=t[n])})}function a(){const e=parseFloat(getComputedStyle(document.documentElement).scrollPaddingTop);return Number.isNaN(e)?0:e}document.addEventListener("DOMContentLoaded",function(){document.querySelectorAll(".mw-gallery").forEach(e=>{const t=e.closest(".mw-gallery-container")||e.parentElement;t&&function(e,t){const n=t.querySelector(".mw-gallery-track");if(!n||!n.children.length)return;const a=n.children,r=e.querySelector(".mw-gallery-dots"),o=e.querySelector(".mw-gallery-desc"),c=t.querySelector(".mw-gallery-navi-prev"),s=t.querySelector(".mw-gallery-navi-next");let l=0;function i(e){const t=a.length;l=(e+t)%t,n.style.transform=`translateX(-${100*l}%)`,r&&r.querySelectorAll(".mw-gallery-dot").forEach((e,t)=>{e.classList.toggle("mw-active",t===l)}),o&&(o.textContent=a[l].dataset.desc||"")}if(r)for(let e=0;e<a.length;e++){const t=document.createElement("button");t.type="button",t.className="mw-gallery-dot"+(0===e?" mw-active":""),t.setAttribute("aria-label","Go to slide "+(e+1)),t.addEventListener("click",()=>i(e)),r.appendChild(t)}c&&c.addEventListener("click",()=>i(l-1)),s&&s.addEventListener("click",()=>i(l+1));let d=0,u=0,m=!1;n.addEventListener("touchstart",e=>{m=1===e.touches.length,m&&(d=e.touches[0].clientX,u=e.touches[0].clientY)},{passive:!0}),n.addEventListener("touchcancel",()=>m=!1),n.addEventListener("touchend",e=>{if(!m)return;m=!1;const t=e.changedTouches[0].clientX-d,n=e.changedTouches[0].clientY-u;Math.abs(t)<50||Math.abs(t)<=Math.abs(n)||i(l+(t<0?1:-1))},{passive:!0}),i(0)}(t,e)}),function(){const t=document.querySelector(".mw-theme-toggle");if(!t)return;const a=document.body,r=document.documentElement,o=t.querySelector(".mw-theme-toggle-slider i"),c=getComputedStyle(document.documentElement).getPropertyValue("--mw-internal-theme-mode").trim()||"switchable";if("switchable"!==c)return console.log(`Theme mode fixed to: ${c}. Disabling toggle.`),o&&(o.className="light"===c?"fas fa-sun":"fas fa-moon"),e(t,"light"===c),t.style.opacity="0.4",t.style.pointerEvents="none",t.style.cursor="default",t.setAttribute("aria-disabled","true"),localStorage.removeItem("mw-theme"),void a.classList.remove("mw-theme-light","mw-theme-dark");const s=window.matchMedia("(prefers-color-scheme: light)"),l=window.CSS&&CSS.supports("color","light-dark(#000, #fff)"),i=()=>l&&s.matches,d=localStorage.getItem("mw-theme");let u=d?"light"===d:i();const m=n=>{r.classList.add("mw-theme-switching"),a.classList.toggle("mw-theme-light",n),a.classList.toggle("mw-theme-dark",!n),r.offsetHeight,r.classList.remove("mw-theme-switching"),e(t,n),o&&(o.className=n?"fas fa-sun":"fas fa-moon")};m(u),s.addEventListener("change",()=>{localStorage.getItem("mw-theme")||(u=i(),m(u),n())}),t.addEventListener("click",()=>{u=!u,m(u),localStorage.setItem("mw-theme",u?"light":"dark"),n()})}(),n(),document.querySelectorAll(".mw-accordion-header").forEach(n=>{const a="BUTTON"===n.tagName;a&&n.setAttribute("aria-expanded",String(t(n))),n.addEventListener("click",function(){const n=!t(this);e(this,n),e(this.nextElementSibling,n),a&&this.setAttribute("aria-expanded",String(n))})}),function(){const e=document.querySelector(".mw-menu-btn"),t=document.querySelector(".mw-navbar");if(!e||!t)return;const n="BUTTON"===e.tagName;function a(a){e.classList.toggle("open",a),t.classList.toggle("open",a),document.body.classList.toggle("mw-nav-open",a),n&&e.setAttribute("aria-expanded",String(a))}function r(e){e.preventDefault(),e.stopPropagation(),a(!t.classList.contains("open"))}e.addEventListener("click",r),document.addEventListener("click",function(n){t.classList.contains("open")&&(t.contains(n.target)||e.contains(n.target)||a(!1))}),document.addEventListener("keydown",function(n){"Escape"===n.key&&t.classList.contains("open")&&(a(!1),e.focus())})}(),function(){const e=document.querySelectorAll(".mw-progress-fill");if(!e.length)return;const t=CSS.supports("animation-timeline","view()"),n=e=>e.dataset.value?e.dataset.value+"%":e.style.width,a=[];if(e.forEach(e=>{const r=n(e);r&&(e.style.setProperty("--mw-progress-value",r),t?e.classList.add("mw-progress-driven"):a.push(e))}),t)return;const r=new IntersectionObserver((e,t)=>{e.forEach(e=>{e.isIntersecting&&(e.target.style.width=n(e.target),t.unobserve(e.target))})},{root:null,threshold:.2});a.forEach(e=>r.observe(e))}(),function(){if(CSS.supports("animation-timeline","view()"))return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;const e=document.querySelectorAll(".mw-reveal, .mw-reveal-stagger > *");if(!e.length)return;const t=e=>{const t=e.parentElement;if(!t||!t.classList.contains("mw-reveal-stagger"))return 0;const n=getComputedStyle(t).gridTemplateColumns.split(" ").length;return[...t.children].indexOf(e)%n*90},n=new IntersectionObserver((e,n)=>{e.forEach(e=>{e.isIntersecting&&(n.unobserve(e.target),e.target.style.animationDelay=t(e.target)+"ms",e.target.classList.replace("mw-reveal-hidden","mw-reveal-run"))})},{threshold:.15});e.forEach(e=>{e.getBoundingClientRect().top<window.innerHeight||(e.classList.add("mw-reveal-hidden"),n.observe(e))})}(),function(){const e=document.querySelector(".mw-header-reveal");if(!e)return;if(CSS.supports("animation-timeline","scroll()"))return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;const t=document.querySelector(".mw-announcement:not(.mw-announcement-static)"),n=270;let a=null;const r=()=>{const r=window.scrollY<n;r!==a&&(a=r,e.classList.toggle("mw-header-away",r),t&&t.classList.toggle("mw-announcement-away",r))};r(),requestAnimationFrame(()=>{e.classList.add("mw-header-driven"),t&&t.classList.add("mw-announcement-driven")}),window.addEventListener("scroll",r,{passive:!0})}(),function(){if(CSS.supports("animation-timeline","view()"))return;if(window.matchMedia("(prefers-reduced-motion: reduce)").matches)return;const e=document.querySelectorAll(".mw-parallax-media");if(!e.length)return;const t=[...e].map(e=>(e.classList.add("mw-parallax-driven"),{el:e,pinned:Boolean(e.closest(".mw-parallax-sticky"))})),n=e=>Math.min(1,Math.max(0,e)),a=(e,t)=>{if(e.pinned)return n(window.scrollY/t);const a=e.el.getBoundingClientRect();return n((t-a.top)/(t+a.height))};let r=!1;const o=()=>{r=!1;const e=document.documentElement.clientHeight,n=t.map(t=>a(t,e));t.forEach((e,t)=>e.el.style.setProperty("--mw-parallax-progress",n[t]))},c=()=>{r||(r=!0,requestAnimationFrame(o))};o(),window.addEventListener("scroll",c,{passive:!0}),window.addEventListener("resize",c,{passive:!0})}(),function(){function e(e){const t=e.style.position,n="sticky"===getComputedStyle(e).position;n&&(e.style.position="static");const a=e.getBoundingClientRect().top+window.scrollY;return n&&(e.style.position=t),a}function t(e){const t=window.scrollY,n=e-t;if(!n)return;const a=Math.min(2e3,600+.5*Math.abs(n)),o={};r=o;let c=null;function s(e){if(r!==o)return;null===c&&(c=e);const l=Math.min(1,(e-c)/a),i=l<.5?4*l*l*l:1-Math.pow(-2*l+2,3)/2;window.scrollTo({top:t+n*i,behavior:"instant"}),l<1?requestAnimationFrame(s):r=null}requestAnimationFrame(s)}document.querySelectorAll('a[href^="#"]').forEach(n=>{n.addEventListener("click",function(n){const r=this.getAttribute("href");if("#"===r)return;const o=document.querySelector(r);if(!o)return;const c=document.querySelector(".mw-menu-btn"),s=document.querySelector(".mw-navbar");c&&s&&(c.classList.remove("open"),s.classList.remove("open"),document.body.classList.remove("mw-nav-open"),"BUTTON"===c.tagName&&c.setAttribute("aria-expanded","false")),n.preventDefault();const l=Math.max(0,e(o)-a());o.hasAttribute("tabindex")||o.setAttribute("tabindex","-1"),o.focus({preventScroll:!0}),window.matchMedia("(prefers-reduced-motion: reduce)").matches?window.scrollTo({top:l,behavior:"instant"}):t(l),history.replaceState(null,"",r)})})}(),function(){const t=document.querySelectorAll("section[id]"),n=document.querySelectorAll(".mw-navbar-link");if(0===t.length||0===n.length)return;window.addEventListener("scroll",function(e,t){let n;return function(){const a=this,r=arguments;clearTimeout(n),n=setTimeout(()=>e.apply(a,r),t)}}(function(){let r="";const o=a()+2;t.forEach(e=>{const t=e.offsetTop-o,n=e.clientHeight;scrollY>=t&&scrollY<t+n&&(r=e.getAttribute("id"))}),n.forEach(t=>{e(t,!1);const n=t.getAttribute("href");if(n){const a=n.indexOf("#");if(-1!==a){n.substring(a+1)===r&&e(t,!0)}}})},100),{passive:!0})}(),document.querySelectorAll(".mw-tabs-nav").forEach(e=>{const t=Array.from(e.querySelectorAll(".mw-tabs-nav-item"));if(!t.length)return;const n=!!e.closest(".mw-tabs-vertical");e.setAttribute("role","tablist"),n&&e.setAttribute("aria-orientation","vertical"),t.forEach((e,a)=>{const r=c(e);e.setAttribute("role","tab"),e.id||(e.id=(r?r.id:"mw-tab-"+a)+"-tab"),r&&(e.setAttribute("aria-controls",r.id),r.setAttribute("role","tabpanel"),r.setAttribute("aria-labelledby",e.id)),s(e),e.addEventListener("click",()=>l(t,e)),e.addEventListener("keydown",e=>{const r=function(e,t,n,a){const r=t?"ArrowUp":"ArrowLeft",o=t?"ArrowDown":"ArrowRight";return e.key===r?(a-1+n)%n:e.key===o?(a+1)%n:"Home"===e.key?0:"End"===e.key?n-1:null}(e,n,t.length,a);null!==r&&(e.preventDefault(),l(t,t[r]),t[r].focus())})}),o(e);const a=new ResizeObserver(()=>o(e));a.observe(e),t.forEach(e=>a.observe(e))}),document.querySelectorAll(".mw-alert-close").forEach(e=>{e.addEventListener("click",function(){const e=this.closest(".mw-alert");e&&(e.classList.add("mw-alert-closing"),setTimeout(()=>{e.classList.add("mw-alert-closed")},300))})}),function(){const e=document.querySelector(".mw-localhost-indicator-activated"),t=document.querySelector(".mw-header");if(e&&i()){const e=document.createElement("div");e.className="mw-localhost-indicator-pulse",t.prepend(e)}}(),function(){if(!i())return;const e=document.querySelector('meta[name="viewport"]'),t=e&&e.getAttribute("content")||"";if(/viewport-fit\s*=\s*cover/.test(t))return;console.warn('MaverickWave: <meta name="viewport"> is missing viewport-fit=cover. env(safe-area-inset-*) resolves to 0 without it, so notched phones lose the gutter, the nav panel and the modal padding that expect it.')}(),document.querySelectorAll(".mw-slider-container").forEach(e=>{const t=e.querySelector(".mw-slider"),n=e.querySelector(".mw-slider-value");if(!t||!n)return;const a=()=>{const e=Number(t.value),a=Number(t.max)||100,r=Math.round(e/a*100);t.style.setProperty("--value",r+"%"),n.classList.contains("mw-slider-numeric")?n.setAttribute("data-value",e):n.setAttribute("data-value",r)};t.addEventListener("input",a),a()}),document.addEventListener("click",e=>{const t=e.target.closest(".mw-modal-close");if(t){const e=t.closest("dialog.mw-modal");if(e)return void e.close();const n=t.closest(".mw-modal-overlay");return void(n&&n.classList.remove("mw-modal-open"))}const n=e.target.closest("[data-mw-modal]");var a;n?d(document.getElementById(n.dataset.mwModal)):e.target.matches("dialog.mw-modal[open]")&&(!("closedBy"in(a=e.target))||null===a.getAttribute("closedby"))&&e.target.close()}),document.querySelectorAll(".mw-image-slider").forEach(t=>{const n=t.querySelectorAll(".mw-image-slider-overlay-image"),a=t.querySelectorAll("button[data-index]");if(!n.length||!a.length)return;let r=0;function o(){n.forEach(t=>{e(t,parseInt(t.dataset.index)===r)}),a.forEach(t=>{e(t,parseInt(t.dataset.index)===r)})}function c(e){r=e,o()}a.forEach(e=>{e.addEventListener("click",()=>{c(parseInt(e.dataset.index))})}),o()}),document.querySelectorAll(".mw-item-list-checkbox, .mw-item-list-checkbox-scroll").forEach(e=>{e.querySelectorAll("li").forEach(e=>{const t=e.querySelector('input[type="checkbox"]'),n=e.querySelector(".mw-checkbox");t&&n&&(t.checked&&e.classList.add("mw-selected"),e.addEventListener("click",function(e){e.target!==t&&e.target.closest(".mw-checkbox")!==n&&toggleCheckbox(this)}),t.addEventListener("change",function(){const e=this.closest("li");this.checked?e.classList.add("mw-selected"):e.classList.remove("mw-selected"),e.dispatchEvent(new CustomEvent("checkboxToggle",{detail:{checked:this.checked,item:e}}))}),n.addEventListener("click",function(e){setTimeout(()=>{const e=this.closest("li");this.querySelector('input[type="checkbox"]').checked?e.classList.add("mw-selected"):e.classList.remove("mw-selected")},0)}))})}),document.addEventListener("checkboxToggle",function(e){console.log("Checkbox toggled:",e.detail.checked,e.detail.item)}),document.querySelectorAll(".mw-kanban").forEach(u),document.querySelectorAll("[data-calendar]").forEach(m),function(){function e(e){document.querySelectorAll(".mw-dropdown[open]").forEach(t=>{t!==e&&t.removeAttribute("open")})}document.addEventListener("click",function(t){const n=t.target.closest(".mw-dropdown");e(n),n&&t.target.closest(".mw-dropdown-item")&&n.removeAttribute("open")}),document.addEventListener("keydown",function(e){if("Escape"!==e.key)return;const t=document.querySelector(".mw-dropdown[open]");if(!t)return;t.removeAttribute("open");const n=t.querySelector("summary");n&&n.focus()})}(),document.querySelectorAll(".mw-lang-switch").forEach(t=>{const n=t.querySelectorAll("[data-mw-lang]"),a=t.querySelector("summary"),r=t.querySelector("summary .mw-flag"),o=t.querySelector("summary .mw-lang-switch-code");n.forEach(c=>{c.addEventListener("click",function(){const s=c.dataset.mwLang,l=c.querySelector(".mw-lang-switch-name"),i=l?l.textContent.trim():s;n.forEach(t=>{e(t,t===c),t===c?t.setAttribute("aria-current","true"):t.removeAttribute("aria-current")}),o&&(o.textContent=s);const d=c.querySelector(".mw-flag");r&&d&&(r.className=d.className),a&&a.setAttribute("aria-label","Language: "+i),t.dispatchEvent(new CustomEvent("mw-language-change",{bubbles:!0,detail:{lang:s,name:i}}))})})})}),window.toggleCheckbox=function(e){const t=e.querySelector('input[type="checkbox"]');if(!t)return;const n=t.checked;t.checked=!n,t.checked?e.classList.add("mw-selected"):e.classList.remove("mw-selected"),e.dispatchEvent(new CustomEvent("checkboxToggle",{detail:{checked:t.checked,item:e}}))};let r=null;function o(e){const t=e.querySelector(".mw-tabs-nav-item.mw-active, .mw-tabs-nav-item.active");t?(e.style.setProperty("--mw-tabs-marker-x",t.offsetLeft+"px"),e.style.setProperty("--mw-tabs-marker-w",t.offsetWidth),e.style.setProperty("--mw-tabs-marker-y",t.offsetTop+"px"),e.style.setProperty("--mw-tabs-marker-h",t.offsetHeight),e.setAttribute("data-mw-tabs-marker","")):e.removeAttribute("data-mw-tabs-marker")}function c(e){const t=e.getAttribute("data-tab");return t?document.getElementById(t):null}function s(e){const n=t(e);e.setAttribute("aria-selected",String(n)),e.tabIndex=n?0:-1}function l(t,n){t.forEach(t=>{const a=t===n;e(t,a),e(c(t),a),s(t)});const a=n.closest(".mw-tabs-nav");a&&o(a)}function i(){const e=window.location.hostname;return"localhost"===e||"127.0.0.1"===e||e.includes("192.168.")}function d(e){e&&("DIALOG"===e.tagName?e.showModal():e.classList.add("mw-modal-open"))}function u(e){const t=Array.from(e.querySelectorAll(".mw-kanban-column")),n=e.querySelector(".mw-kanban-composer"),a=e.querySelector(".mw-kanban-card-template"),r=e.dataset.kanbanPrefix||"MW",o=n.querySelector(".mw-kanban-composer-title"),c=n.querySelector(".mw-kanban-composer-text"),s=n.querySelector(".mw-kanban-composer-priority"),l=n.querySelector(".mw-kanban-composer-assignee");let i=null;function d(){t.forEach(function(e,n){const a=e.querySelectorAll(".mw-kanban-card"),r=e.querySelector(".mw-kanban-count");r&&(r.textContent=a.length),e.querySelectorAll("[data-kanban-move]").forEach(function(e){const a=n+parseInt(e.dataset.kanbanMove,10);e.disabled=a<0||a>=t.length})})}function u(e,t){const n=e.querySelector(t);return n?n.textContent.replace(/\s+/g," ").trim():""}function m(e,t){w(),i=t||null,o.value=t?u(t,".mw-kanban-card-title"):"",c.value=t?u(t,".mw-kanban-card-text"):"",s.value=t?function(e){const t=e.querySelector(".mw-card-ribbon");if(!t)return"";const n=Array.from(t.classList).find(function(e){return 0===e.indexOf("mw-card-addon-")});return n?n.replace("mw-card-addon-",""):""}(t):"",l.value=t?function(e){const t=e.querySelector(".mw-avatar-initials");return t?t.textContent.trim():""}(t):"",t?(t.classList.add("mw-kanban-editing"),t.before(n)):e.querySelector(".mw-kanban-column-body").prepend(n),n.classList.add("mw-active"),o.focus()}function w(){n.classList.remove("mw-active"),i&&i.classList.remove("mw-kanban-editing"),i=null}function f(){const t=o.value.trim();if(!t)return void o.focus();const u=i||a.content.firstElementChild.cloneNode(!0);if(u.querySelector(".mw-kanban-card-title").textContent=t,u.querySelector(".mw-kanban-card-text").textContent=c.value.trim(),function(e,t){const n=e.querySelector(".mw-card-ribbon");if(n&&n.remove(),!t||!t.value)return;const a=document.createElement("div");a.className="mw-card-ribbon mw-card-addon-"+t.value,a.textContent=t.textContent,e.prepend(a)}(u,s.selectedOptions[0]),function(e,t){const n=e.querySelector(".mw-kanban-card-actions"),a=n.querySelector(".mw-avatar");if(!t)return void(a&&a.remove());const r=a||document.createElement("div");r.className="mw-avatar mw-avatar-xs mw-avatar-initials",r.textContent=t,a||n.prepend(r)}(u,l.value),!i){const t=function(){const t=Array.from(e.querySelectorAll(".mw-kanban-card-id")).map(function(e){return parseInt(e.textContent.split("-").pop(),10)||0});return r+"-"+(Math.max(0,...t)+1)}();u.classList.add("mw-kanban-card-in"),u.querySelector(".mw-kanban-card-id").textContent=t,u.querySelectorAll("[aria-label]").forEach(function(e){e.setAttribute("aria-label",e.getAttribute("aria-label").replace(/[A-Z]+-\d+/,t))}),n.before(u)}w(),d()}const h=["mw-kanban-card-moved-forward","mw-kanban-card-moved-back"];e.addEventListener("click",function(e){const n=e.target.closest("[data-kanban-move]");if(n){if(function(e,n){const a=e.closest(".mw-kanban-column"),r=t[t.indexOf(a)+n];r&&(r.querySelector(".mw-kanban-column-body").appendChild(e),e.classList.remove.apply(e.classList,h),e.offsetWidth,e.classList.add(n>0?h[0]:h[1]),d())}(n.closest(".mw-kanban-card"),parseInt(n.dataset.kanbanMove,10)),n.disabled){const e=n.parentElement.querySelector("[data-kanban-move]:not(:disabled)");e&&e.focus()}return}const a=e.target.closest(".mw-kanban-edit");if(a){const e=a.closest(".mw-kanban-card");return void m(e.closest(".mw-kanban-column"),e)}const r=e.target.closest(".mw-kanban-delete");if(r){const e=r.closest(".mw-kanban-card");return e===i&&w(),e.remove(),void d()}const o=e.target.closest(".mw-kanban-add");o?m(o.closest(".mw-kanban-column"),null):e.target.closest(".mw-kanban-composer-cancel")&&w()}),n.addEventListener("submit",function(e){e.preventDefault(),f()}),n.addEventListener("keydown",function(e){"Escape"===e.key&&w()}),d()}function m(e){const t=e.querySelector(".mw-calendar-grid"),n=e.querySelector(".mw-calendar-title");if(!t)return;const a="week"===e.dataset.calendar,r=function(e){if(!e)return{};try{return JSON.parse(e)}catch(e){return{}}}(e.dataset.calendarMarkers),o=e.dataset.calendarLocale||document.documentElement.lang||void 0,c=new Date;c.setHours(0,0,0,0);let s=e.dataset.calendarDate?new Date(e.dataset.calendarDate+"T00:00:00"):new Date(c),l=e.dataset.calendarSelected||"";function i(e){const t=new Date(e);return t.setDate(t.getDate()-(t.getDay()+6)%7),t}function d(e){return e.getFullYear()+"-"+String(e.getMonth()+1).padStart(2,"0")+"-"+String(e.getDate()).padStart(2,"0")}function u(){if(!a)return s.toLocaleDateString(o,{month:"long",year:"numeric"});const e=i(s),t=new Date(e);t.setDate(t.getDate()+6);const n=e.toLocaleDateString(o,{day:"numeric",month:e.getMonth()===t.getMonth()?void 0:"short"}),r=t.toLocaleDateString(o,{day:"numeric",month:"short",year:"numeric"});return"Week "+function(e){const t=i(e);t.setDate(t.getDate()+3);const n=i(new Date(t.getFullYear(),0,4));return n.setDate(n.getDate()+3),1+Math.round((t-n)/6048e5)}(e)+" · "+n+" - "+r}function m(e){const t=e.getDay();return 0===t||6===t}function w(e,t){const n=d(e),s=document.createElement("button");s.type="button",s.className="mw-calendar-day",s.tabIndex=-1,s.dataset.calendarDay=n,s.setAttribute("aria-pressed",n===l?"true":"false"),s.setAttribute("aria-label",e.toLocaleDateString(o,{weekday:"long",day:"numeric",month:"long",year:"numeric"})),m(e)&&s.classList.add("mw-calendar-weekend"),a||e.getMonth()===t||s.classList.add("mw-calendar-adjacent"),n===d(c)&&(s.classList.add("mw-calendar-today"),s.setAttribute("aria-current","date")),n===l&&s.classList.add("mw-selected");const i=document.createElement("span");i.className="mw-calendar-date",i.textContent=e.getDate(),s.appendChild(i);const u=[].concat(r[n]||[]);if(u.length){const e=document.createElement("span");e.className="mw-calendar-dots",u.forEach(function(t){const n=document.createElement("span");n.className=t?"mw-calendar-dot mw-calendar-dot-"+t:"mw-calendar-dot",e.appendChild(n)}),s.appendChild(e)}return s}function f(){const e=s.getMonth(),r=a?7:42,c=i(a?s:new Date(s.getFullYear(),e,1));t.innerHTML="",function(){const e=i(new Date);for(let n=0;n<7;n++){const n=document.createElement("div");n.className="mw-calendar-weekday",m(e)&&n.classList.add("mw-calendar-weekend"),n.setAttribute("aria-hidden","true"),n.textContent=e.toLocaleDateString(o,{weekday:"short"}),t.appendChild(n),e.setDate(e.getDate()+1)}}();for(let n=0;n<r;n++)t.appendChild(w(c,e)),c.setDate(c.getDate()+1);n&&(n.textContent=u()),function(){const e=t.querySelector(".mw-selected")||t.querySelector(".mw-calendar-today")||t.querySelector(".mw-calendar-day:not(.mw-calendar-adjacent)")||t.querySelector(".mw-calendar-day");e&&(e.tabIndex=0)}()}e.addEventListener("click",function(n){const r=n.target.closest("[data-calendar-nav]");if(r)return o=parseInt(r.dataset.calendarNav,10),a?s.setDate(s.getDate()+7*o):s=new Date(s.getFullYear(),s.getMonth()+o,1),void f();var o;const c=n.target.closest(".mw-calendar-day");var i;c&&!c.disabled&&(i=c.dataset.calendarDay,l=i===l?"":i,t.querySelectorAll(".mw-calendar-day").forEach(function(e){const t=e.dataset.calendarDay===l;e.classList.toggle("mw-selected",t),e.setAttribute("aria-pressed",t?"true":"false")}),e.dispatchEvent(new CustomEvent("mw-calendar-select",{bubbles:!0,detail:{date:l}})))}),t.addEventListener("keydown",function(e){const n={ArrowLeft:-1,ArrowRight:1,ArrowUp:-7,ArrowDown:7}[e.key];if(!n)return;const a=e.target.closest(".mw-calendar-day");if(!a)return;e.preventDefault();const r=new Date(a.dataset.calendarDay+"T00:00:00");r.setDate(r.getDate()+n),function(e){const n=d(e);let a=t.querySelector('[data-calendar-day="'+n+'"]');a||(s=new Date(e),f(),a=t.querySelector('[data-calendar-day="'+n+'"]')),a&&(t.querySelectorAll(".mw-calendar-day").forEach(function(e){e.tabIndex=-1}),a.tabIndex=0,a.focus())}(r)}),f()}["wheel","touchstart"].forEach(e=>{window.addEventListener(e,()=>r=null,{passive:!0})}),window.mwOpenModal=e=>d(document.getElementById(e)),window.mwCloseModal=e=>{var t;(t=document.getElementById(e))&&("DIALOG"===t.tagName?t.close():t.classList.remove("mw-modal-open"))},window.mwRefreshColorSwatches=n}();
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "maverick-wave",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.20.0",
|
|
4
4
|
"config": {
|
|
5
|
-
"version_short": "5.
|
|
5
|
+
"version_short": "5.20"
|
|
6
6
|
},
|
|
7
7
|
"description": "A lightweight, modern CSS framework for building responsive websites with elegance and speed.",
|
|
8
8
|
"main": "src/js/main.js",
|
package/src/js/main.js
CHANGED
|
@@ -36,7 +36,6 @@
|
|
|
36
36
|
warnMissingViewportFit();
|
|
37
37
|
initFormSliders();
|
|
38
38
|
initModals();
|
|
39
|
-
initHeaderLoginButton();
|
|
40
39
|
initImageSliders();
|
|
41
40
|
initCheckboxLists();
|
|
42
41
|
initKanbanBoards();
|
|
@@ -507,6 +506,11 @@
|
|
|
507
506
|
function setOpen(open) {
|
|
508
507
|
menuBtn.classList.toggle('open', open);
|
|
509
508
|
navbar.classList.toggle('open', open);
|
|
509
|
+
// The scrim and the rules that pin the bar and the burger in place hang
|
|
510
|
+
// off this one class rather than off `:has(.mw-navbar.open)` - a selector
|
|
511
|
+
// that has to re-match the whole document from a class change several
|
|
512
|
+
// levels down, which is where WebKit's invalidation has let it slip.
|
|
513
|
+
document.body.classList.toggle('mw-nav-open', open);
|
|
510
514
|
if (announces) menuBtn.setAttribute('aria-expanded', String(open));
|
|
511
515
|
}
|
|
512
516
|
|
|
@@ -516,9 +520,11 @@
|
|
|
516
520
|
setOpen(!navbar.classList.contains('open'));
|
|
517
521
|
}
|
|
518
522
|
|
|
519
|
-
//
|
|
523
|
+
// One listener, not two. The button carries touch-action: manipulation, so
|
|
524
|
+
// its click arrives without the 300ms wait that the extra touchstart was
|
|
525
|
+
// there to skip - and with both, a touch fires the toggle twice on any
|
|
526
|
+
// engine that still synthesises the click.
|
|
520
527
|
menuBtn.addEventListener('click', toggleMenu);
|
|
521
|
-
menuBtn.addEventListener('touchstart', toggleMenu, { passive: false });
|
|
522
528
|
|
|
523
529
|
// The scrim is a body pseudo-element, so its taps land on the document
|
|
524
530
|
document.addEventListener('click', function (e) {
|
|
@@ -527,7 +533,7 @@
|
|
|
527
533
|
setOpen(false);
|
|
528
534
|
});
|
|
529
535
|
|
|
530
|
-
// Or Escape strands the keyboard user in a
|
|
536
|
+
// Or Escape strands the keyboard user in a panel that is no longer there
|
|
531
537
|
document.addEventListener('keydown', function (e) {
|
|
532
538
|
if (e.key !== 'Escape') return;
|
|
533
539
|
if (!navbar.classList.contains('open')) return;
|
|
@@ -803,6 +809,10 @@
|
|
|
803
809
|
if (menuBtn && nav) {
|
|
804
810
|
menuBtn.classList.remove('open');
|
|
805
811
|
nav.classList.remove('open');
|
|
812
|
+
document.body.classList.remove('mw-nav-open');
|
|
813
|
+
if (menuBtn.tagName === 'BUTTON') {
|
|
814
|
+
menuBtn.setAttribute('aria-expanded', 'false');
|
|
815
|
+
}
|
|
806
816
|
}
|
|
807
817
|
|
|
808
818
|
e.preventDefault();
|
|
@@ -1140,26 +1150,6 @@
|
|
|
1140
1150
|
// root colour at runtime has to ask for them to be read again
|
|
1141
1151
|
window.mwRefreshColorSwatches = updateColorSwatchHexValues;
|
|
1142
1152
|
|
|
1143
|
-
// ===== Login Button =====
|
|
1144
|
-
function initHeaderLoginButton() {
|
|
1145
|
-
const loginButton = document.getElementById('login-button');
|
|
1146
|
-
|
|
1147
|
-
if (loginButton) {
|
|
1148
|
-
loginButton.addEventListener('click', function () {
|
|
1149
|
-
const icon = this.querySelector('i');
|
|
1150
|
-
|
|
1151
|
-
// Toggle between fa-user-lock and fa-user-tag
|
|
1152
|
-
if (icon.classList.contains('fa-lock')) {
|
|
1153
|
-
icon.classList.remove('fa-lock');
|
|
1154
|
-
icon.classList.add('fa-lock-open');
|
|
1155
|
-
} else {
|
|
1156
|
-
icon.classList.remove('fa-lock-open');
|
|
1157
|
-
icon.classList.add('fa-lock');
|
|
1158
|
-
}
|
|
1159
|
-
});
|
|
1160
|
-
}
|
|
1161
|
-
}
|
|
1162
|
-
|
|
1163
1153
|
// ===== Image Sliders =====
|
|
1164
1154
|
function initImageSliders() {
|
|
1165
1155
|
const sliders = document.querySelectorAll('.mw-image-slider');
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
<!-- Theme Toggle -->
|
|
32
32
|
<button
|
|
33
33
|
type="button"
|
|
34
|
-
class="mw-theme-toggle mw-ml-5"
|
|
34
|
+
class="mw-theme-toggle mw-header-keep mw-ml-5"
|
|
35
35
|
aria-label="Toggle light and dark theme"
|
|
36
36
|
>
|
|
37
37
|
<div class="mw-theme-toggle-slider">
|
|
@@ -42,9 +42,12 @@
|
|
|
42
42
|
</button>
|
|
43
43
|
|
|
44
44
|
<!-- Palette Switcher, showcase only - the panel lives in palette-container -->
|
|
45
|
+
<!-- mw-header-keep like its neighbours: without it the button rides away with
|
|
46
|
+
the bar and leaves its 50px of space standing between the controls that
|
|
47
|
+
did stay -->
|
|
45
48
|
<button
|
|
46
49
|
type="button"
|
|
47
|
-
class="palette-toggle"
|
|
50
|
+
class="palette-toggle mw-header-keep"
|
|
48
51
|
id="palette-toggle"
|
|
49
52
|
aria-expanded="false"
|
|
50
53
|
aria-controls="palette-panel"
|
|
@@ -56,7 +59,7 @@
|
|
|
56
59
|
<!-- Burger Menu Button -->
|
|
57
60
|
<button
|
|
58
61
|
type="button"
|
|
59
|
-
class="mw-menu-btn"
|
|
62
|
+
class="mw-menu-btn mw-header-keep"
|
|
60
63
|
aria-label="Menu"
|
|
61
64
|
aria-expanded="false"
|
|
62
65
|
aria-controls="mw-main-nav"
|
|
@@ -59,7 +59,14 @@
|
|
|
59
59
|
the picture, not on a theme surface, and the light theme's shadows are cut for
|
|
60
60
|
paper and vanish there. Pair it with <code>mw-header-reveal</code> on the
|
|
61
61
|
header and the page opens on the picture alone: the bar stays away for the
|
|
62
|
-
first 130px of scroll and has ridden in by 420px.
|
|
62
|
+
first 130px of scroll and has ridden in by 420px. A control marked
|
|
63
|
+
<code>mw-header-keep</code> sits that ride out - it travels the bar's distance
|
|
64
|
+
the other way and waits at the position it will hold once the bar is there, so
|
|
65
|
+
a login button is on the picture from the first frame and nothing jumps at the
|
|
66
|
+
end. On a narrow screen it is how the burger reaches the reader before the bar
|
|
67
|
+
exists. While it floats it carries a ring and a soft shadow so a dark control
|
|
68
|
+
still reads on a dark picture, and focus leaves the bar alone - it is on
|
|
69
|
+
screen already, so a click on the theme toggle no longer hauls the header in.
|
|
63
70
|
</p>
|
|
64
71
|
<p class="mw-text-muted mw-text-measure mw-mb-6">
|
|
65
72
|
Add <code>mw-parallax-rise</code> next to it and the picture lifts by
|
|
@@ -119,7 +126,11 @@
|
|
|
119
126
|
<span class="mw-code-block-language">HTML</span>
|
|
120
127
|
</div>
|
|
121
128
|
<div class="mw-code-container">
|
|
122
|
-
<pre><code><header class="mw-header mw-header-reveal">
|
|
129
|
+
<pre><code><header class="mw-header mw-header-reveal">
|
|
130
|
+
...
|
|
131
|
+
<button class="mw-login-btn mw-header-keep">...</button>
|
|
132
|
+
<button class="mw-menu-btn mw-header-keep">...</button>
|
|
133
|
+
</header>
|
|
123
134
|
|
|
124
135
|
<main class="mw-main">
|
|
125
136
|
<section class="mw-section mw-parallax-sticky mw-parallax-rise">
|
|
@@ -306,7 +306,11 @@ $_corner-opaque: 55%;
|
|
|
306
306
|
// as a plain 2px border all the way round the box, which is how a modal ended up
|
|
307
307
|
// framed instead of cornered.
|
|
308
308
|
@function _accent-width($value) {
|
|
309
|
-
@
|
|
309
|
+
@if math.is-unitless($value) {
|
|
310
|
+
@return $value * 1px;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
@return $value;
|
|
310
314
|
}
|
|
311
315
|
|
|
312
316
|
// What is left of the signature once the silhouette is switched off: the same
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
display: flex;
|
|
15
15
|
align-items: center;
|
|
16
16
|
transition: var(--mw-transition);
|
|
17
|
-
margin-right: spacing('6');
|
|
18
17
|
appearance: none;
|
|
19
18
|
padding: 0;
|
|
20
19
|
@include tappable;
|
|
@@ -25,10 +24,6 @@
|
|
|
25
24
|
transition-duration: var(--mw-duration-instant);
|
|
26
25
|
}
|
|
27
26
|
|
|
28
|
-
@include media-up('lg') {
|
|
29
|
-
margin-right: spacing('5');
|
|
30
|
-
}
|
|
31
|
-
|
|
32
27
|
&-slider {
|
|
33
28
|
position: absolute;
|
|
34
29
|
left: 3px;
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
// Floating free over a picture, a control has to carry its own edge - the burger
|
|
2
|
+
// and the login button bring a primary surface, the theme toggle is a dark pill
|
|
3
|
+
// that a dark photo swallows. It travels with the float and not with the class,
|
|
4
|
+
// or the ring would still be there in the arrived bar, on one control and not
|
|
5
|
+
// its neighbour. Fixed values and not the elevation ramp, the same call the
|
|
6
|
+
// parallax shadow makes: this lands on the picture, not on a theme surface, and
|
|
7
|
+
// the light theme cuts its shadows for paper.
|
|
8
|
+
$float-edge: (0 0 0 1px rgb(255 255 255 / 0.22), 0 4px 14px rgb(0 0 0 / 0.4));
|
|
9
|
+
|
|
1
10
|
@layer mw.layout {
|
|
2
11
|
// For a page that opens on a full-bleed picture and wants nothing on top of
|
|
3
12
|
// it: the bar starts above the screen and rides in over the first stretch of
|
|
@@ -17,6 +26,28 @@
|
|
|
17
26
|
animation-range: 0 420px;
|
|
18
27
|
}
|
|
19
28
|
|
|
29
|
+
// Anything carrying mw-header-keep sits the ride out: the bar travels,
|
|
30
|
+
// the element travels the same distance back and stays where it is. The
|
|
31
|
+
// distance is the bar's own, so it waits at the position it will hold in
|
|
32
|
+
// the arrived bar - nothing jumps at the end, the bar just closes in
|
|
33
|
+
// behind it. For a login or burger button that has to be reachable while
|
|
34
|
+
// the hero is still untouched.
|
|
35
|
+
.mw-header-reveal .mw-header-keep {
|
|
36
|
+
animation-name: mw-header-keep;
|
|
37
|
+
animation-timing-function: var(--mw-ease-out);
|
|
38
|
+
animation-fill-mode: both;
|
|
39
|
+
animation-timeline: scroll(root);
|
|
40
|
+
animation-range: 0 420px;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// A group's opacity cannot be taken back by a child, so the fade has to
|
|
44
|
+
// go as soon as something is meant to stay visible through it. No loss:
|
|
45
|
+
// the bar is off screen for that stretch anyway, the fade only softened
|
|
46
|
+
// the last few pixels of the arrival.
|
|
47
|
+
.mw-header-reveal:has(.mw-header-keep) {
|
|
48
|
+
animation-name: mw-header-slide;
|
|
49
|
+
}
|
|
50
|
+
|
|
20
51
|
// The ribbon is glued under the bar, so it has to leave and arrive with
|
|
21
52
|
// it - left behind it would hang alone at the top of an otherwise clean
|
|
22
53
|
// hero. No class of its own: a ribbon on a page with a revealing header
|
|
@@ -51,18 +82,54 @@
|
|
|
51
82
|
// author declaration that outranks a running animation; dropping
|
|
52
83
|
// `animation-name` instead leaves the element stuck on its last value, because
|
|
53
84
|
// a restarted scroll timeline only catches up on the next scroll.
|
|
54
|
-
|
|
85
|
+
//
|
|
86
|
+
// A keep element is on screen already and needs no rescue, so it is left out -
|
|
87
|
+
// otherwise a click on the theme toggle, which focuses it, would haul in the
|
|
88
|
+
// whole bar. It takes `:focus` on a descendant and not `:focus-within` on the
|
|
89
|
+
// header: within also matches every wrapper around the focused control, and no
|
|
90
|
+
// `:not()` on those can tell which one holds the keep.
|
|
91
|
+
body:has(
|
|
92
|
+
.mw-header-reveal :focus:not(.mw-header-keep, .mw-header-keep *),
|
|
93
|
+
.mw-announcement:focus-within
|
|
94
|
+
) {
|
|
55
95
|
.mw-header-reveal {
|
|
56
96
|
top: 0 !important;
|
|
57
97
|
opacity: 1 !important;
|
|
58
98
|
}
|
|
59
99
|
|
|
100
|
+
.mw-header-keep {
|
|
101
|
+
translate: none !important;
|
|
102
|
+
box-shadow: none !important;
|
|
103
|
+
}
|
|
104
|
+
|
|
60
105
|
.mw-announcement:not(.mw-announcement-static) {
|
|
61
106
|
transform: none !important;
|
|
62
107
|
opacity: 1 !important;
|
|
63
108
|
}
|
|
64
109
|
}
|
|
65
110
|
|
|
111
|
+
// Same treatment while the panel is open. The panel hangs off the bar, so the
|
|
112
|
+
// bar has to be in place for it to open anywhere sensible - and the burger,
|
|
113
|
+
// which is the X from the moment the panel is out, has to stay on the burger's
|
|
114
|
+
// own position rather than a header height below it.
|
|
115
|
+
//
|
|
116
|
+
// A class the script sets, and not `:has(.mw-navbar.open)`: this is the one
|
|
117
|
+
// rule in the file that has to hold on every engine, and `:has()` against a
|
|
118
|
+
// class toggled deep in the subtree is exactly where WebKit's style
|
|
119
|
+
// invalidation has been unreliable. The burger is the control that closes the
|
|
120
|
+
// panel - it cannot be the thing that waits for a repaint.
|
|
121
|
+
body.mw-nav-open {
|
|
122
|
+
.mw-header-reveal {
|
|
123
|
+
top: 0 !important;
|
|
124
|
+
opacity: 1 !important;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.mw-header-keep {
|
|
128
|
+
translate: none !important;
|
|
129
|
+
box-shadow: none !important;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
66
133
|
// Older Safari and Firefox ship no scroll timelines, so there the script
|
|
67
134
|
// toggles these classes instead (main.js) - the same two positions,
|
|
68
135
|
// triggered instead of scrubbed. State and transition are separate because
|
|
@@ -72,6 +139,15 @@
|
|
|
72
139
|
.mw-header-reveal.mw-header-away {
|
|
73
140
|
top: calc(-1 * var(--mw-header-reveal-offset));
|
|
74
141
|
opacity: 0;
|
|
142
|
+
|
|
143
|
+
&:has(.mw-header-keep) {
|
|
144
|
+
opacity: 1;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.mw-header-keep {
|
|
148
|
+
translate: 0 var(--mw-header-reveal-offset);
|
|
149
|
+
box-shadow: $float-edge;
|
|
150
|
+
}
|
|
75
151
|
}
|
|
76
152
|
|
|
77
153
|
.mw-header-driven {
|
|
@@ -80,6 +156,12 @@
|
|
|
80
156
|
transition:
|
|
81
157
|
var(--mw-transition),
|
|
82
158
|
top var(--mw-duration-slow) var(--mw-ease-out);
|
|
159
|
+
|
|
160
|
+
.mw-header-keep {
|
|
161
|
+
transition:
|
|
162
|
+
translate var(--mw-duration-slow) var(--mw-ease-out),
|
|
163
|
+
box-shadow var(--mw-duration-slow) var(--mw-ease-out);
|
|
164
|
+
}
|
|
83
165
|
}
|
|
84
166
|
|
|
85
167
|
.mw-announcement.mw-announcement-away {
|
|
@@ -96,9 +178,9 @@
|
|
|
96
178
|
}
|
|
97
179
|
}
|
|
98
180
|
|
|
99
|
-
// `top` and not a transform: the
|
|
100
|
-
//
|
|
101
|
-
//
|
|
181
|
+
// `top` and not a transform: a transform on the header would make it the
|
|
182
|
+
// containing block for anything fixed inside it - at every value, the resting
|
|
183
|
+
// one included - and the bar is chrome that other things hang off.
|
|
102
184
|
// The wait sits in the keyframes and not in the range, because a range that
|
|
103
185
|
// starts past 0 leaves the bar in its resting state below that point - so the
|
|
104
186
|
// header would be visible for exactly the stretch it should stay away for.
|
|
@@ -115,6 +197,35 @@
|
|
|
115
197
|
}
|
|
116
198
|
}
|
|
117
199
|
|
|
200
|
+
// The same ride without the fade, for a bar something stays visible through
|
|
201
|
+
@keyframes mw-header-slide {
|
|
202
|
+
0%,
|
|
203
|
+
30% {
|
|
204
|
+
top: calc(-1 * var(--mw-header-reveal-offset));
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
100% {
|
|
208
|
+
top: 0;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// `translate` and not `transform`: the burger puts its hover lift and its
|
|
213
|
+
// press on transform, and a running animation outranks an author declaration
|
|
214
|
+
// - it would hold the button flat for the rest of the page. The standalone
|
|
215
|
+
// property stacks with the shorthand instead of replacing it.
|
|
216
|
+
@keyframes mw-header-keep {
|
|
217
|
+
0%,
|
|
218
|
+
30% {
|
|
219
|
+
translate: 0 var(--mw-header-reveal-offset);
|
|
220
|
+
box-shadow: $float-edge;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
100% {
|
|
224
|
+
translate: none;
|
|
225
|
+
box-shadow: none;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
118
229
|
// The ribbon holds nothing fixed, so it can use the cheaper transform
|
|
119
230
|
@keyframes mw-announcement-reveal {
|
|
120
231
|
0%,
|