mirror of
https://github.com/BeardedTek/flowbite-beardedtek.com.git
synced 2025-12-06 05:31:52 +00:00
Get rid of set-dark-mode.js as it can't work as intended. Add class cursor-pointer to themeToggle Button.
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
<span class="self-center font-semibold kanit-semibold whitespace-nowrap text-primary-800 dark:text-primary-300">{{ .Site.Params.logo.text }}</span>
|
||||
</a>
|
||||
<div class="flex items-center lg:order-2 dark:text-gray-400">
|
||||
<button id="themeToggle" data-tooltip-target="tooltip-toggle" type="button" class="hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-700 rounded-lg text-sm p-2.5 mr-2.5">
|
||||
<button id="themeToggle" data-tooltip-target="tooltip-toggle" type="button" class="cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-700 rounded-lg text-sm p-2.5 mr-2.5">
|
||||
<svg id="themeToggleDarkIcon" class="hidden w-5 h-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M17.293 13.293A8 8 0 016.707 2.707a8.001 8.001 0 1010.586 10.586z"></path></svg>
|
||||
<svg id="themeToggleLightIcon" class="hidden w-5 h-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10 2a1 1 0 011 1v1a1 1 0 11-2 0V3a1 1 0 011-1zm4 8a4 4 0 11-8 0 4 4 0 018 0zm-.464 4.95l.707.707a1 1 0 001.414-1.414l-.707-.707a1 1 0 00-1.414 1.414zm2.12-10.607a1 1 0 010 1.414l-.706.707a1 1 0 11-1.414-1.414l.707-.707a1 1 0 011.414 0zM17 11a1 1 0 100-2h-1a1 1 0 100 2h1zm-7 4a1 1 0 011 1v1a1 1 0 11-2 0v-1a1 1 0 011-1zM5.05 6.464A1 1 0 106.465 5.05l-.708-.707a1 1 0 00-1.414 1.414l.707.707zm1.414 8.486l-.707.707a1 1 0 01-1.414-1.414l.707-.707a1 1 0 011.414 1.414zM4 11a1 1 0 100-2H3a1 1 0 000 2h1z" fill-rule="evenodd" clip-rule="evenodd"></path></svg>
|
||||
</button>
|
||||
|
||||
@@ -5,5 +5,4 @@ import './dark-mode';
|
||||
import './navbar';
|
||||
import './current-year';
|
||||
import './contact-form';
|
||||
import './plausible-banner';
|
||||
import './set-dark-mode';
|
||||
import './plausible-banner';
|
||||
@@ -1,4 +0,0 @@
|
||||
colorTheme = window.localStorage.getItem('color-theme');
|
||||
if (!colorTheme){
|
||||
window.localStorage.setItem('color-theme', 'dark');
|
||||
}
|
||||
@@ -1,2 +1,2 @@
|
||||
(()=>{var e,t={4:()=>{const e=document.getElementById("themeToggleDarkIcon"),t=document.getElementById("themeToggleLightIcon");e&&t&&("dark"===localStorage.getItem("color-theme")||!("color-theme"in localStorage)&&window.matchMedia("(prefers-color-scheme: dark)").matches?t.classList.remove("hidden"):e.classList.remove("hidden"));const o=document.getElementById("themeToggle");let n=new Event("dark-mode");o&&o.addEventListener("click",(function(){e.classList.toggle("hidden"),t.classList.toggle("hidden"),localStorage.getItem("color-theme")?"light"===localStorage.getItem("color-theme")?(document.documentElement.classList.add("dark"),localStorage.setItem("color-theme","dark")):(document.documentElement.classList.remove("dark"),localStorage.setItem("color-theme","light")):document.documentElement.classList.contains("dark")?(document.documentElement.classList.remove("dark"),localStorage.setItem("color-theme","light")):(document.documentElement.classList.add("dark"),localStorage.setItem("color-theme","dark")),document.dispatchEvent(n)}))},5:()=>{colorTheme=window.localStorage.getItem("color-theme"),colorTheme||window.localStorage.setItem("color-theme","dark")},127:(e,t,o)=>{"use strict";o(315),o(4),o(756),o(391),o(935),o(762),o(5)},391:()=>{document.addEventListener("DOMContentLoaded",(function(){const e=document.getElementById("currentYear");e&&(e.textContent=(new Date).getFullYear())}))},756:()=>{function e(){window.scrollY>0?t.setAttribute("data-sticky","true"):t.setAttribute("data-sticky","false")}const t=document.querySelector("#mainNavbar");t&&(e(),window.addEventListener("scroll",(function(){e()})))},762:()=>{window.addEventListener("load",(function(){var e=document.getElementById("plausible-switch"),t=window.localStorage.getItem("plausible_ignore");e.checked=null==t||!1===t})),window.addEventListener("load",(function(){var e=window.localStorage.getItem("hidePlausibleBanner"),t=document.getElementById("plausible-banner");e?t.classList.add("hidden"):t.classList.remove("hidden")})),document.getElementById("plausible-switch").addEventListener("change",(function(){this.checked?window.localStorage.removeItem("plausible_ignore"):window.localStorage.setItem("plausible_ignore","true")})),document.getElementById("plausible-ok").addEventListener("click",(function(){var e=document.getElementById("plausible-banner");window.localStorage.setItem("hidePlausibleBanner","true"),e.classList.add("hidden")}))},935:(e,t,o)=>{window.addEventListener("DOMContentLoaded",(async function(){const e=await o.e(96).then(o.bind(o,339)),t=await o.e(96).then(o.bind(o,239)),n=e.Filter;if("function"!=typeof n)return;const r=new n,a=document.querySelector("form[name='contact'] input[name='subject']");if(!a)return;const l=new URLSearchParams(window.location.search).get("topic")||"none";if("none"===l)return;const i=r.clean(l).substring(0,30),c=t.default.titleCase(i),d=a.value||"none";a.value=d.concat(" - ",c)}))}},o={};function n(e){var r=o[e];if(void 0!==r)return r.exports;var a=o[e]={exports:{}};return t[e](a,a.exports,n),a.exports}n.m=t,e=[],n.O=(t,o,r,a)=>{if(!o){var l=1/0;for(s=0;s<e.length;s++){for(var[o,r,a]=e[s],i=!0,c=0;c<o.length;c++)(!1&a||l>=a)&&Object.keys(n.O).every((e=>n.O[e](o[c])))?o.splice(c--,1):(i=!1,a<l&&(l=a));if(i){e.splice(s--,1);var d=r();void 0!==d&&(t=d)}}return t}a=a||0;for(var s=e.length;s>0&&e[s-1][2]>a;s--)e[s]=e[s-1];e[s]=[o,r,a]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.e=()=>Promise.resolve(),n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={524:0};n.O.j=t=>0===e[t];var t=(t,o)=>{var r,a,[l,i,c]=o,d=0;if(l.some((t=>0!==e[t]))){for(r in i)n.o(i,r)&&(n.m[r]=i[r]);if(c)var s=c(n)}for(t&&t(o);d<l.length;d++)a=l[d],n.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return n.O(s)},o=self.webpackChunkflowbite_pro_marketing_ui_pages=self.webpackChunkflowbite_pro_marketing_ui_pages||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})();var r=n.O(void 0,[96],(()=>n(127)));r=n.O(r)})();
|
||||
(()=>{var e,t={4:()=>{const e=document.getElementById("themeToggleDarkIcon"),t=document.getElementById("themeToggleLightIcon");e&&t&&("dark"===localStorage.getItem("color-theme")||!("color-theme"in localStorage)&&window.matchMedia("(prefers-color-scheme: dark)").matches?t.classList.remove("hidden"):e.classList.remove("hidden"));const n=document.getElementById("themeToggle");let o=new Event("dark-mode");n&&n.addEventListener("click",(function(){e.classList.toggle("hidden"),t.classList.toggle("hidden"),localStorage.getItem("color-theme")?"light"===localStorage.getItem("color-theme")?(document.documentElement.classList.add("dark"),localStorage.setItem("color-theme","dark")):(document.documentElement.classList.remove("dark"),localStorage.setItem("color-theme","light")):document.documentElement.classList.contains("dark")?(document.documentElement.classList.remove("dark"),localStorage.setItem("color-theme","light")):(document.documentElement.classList.add("dark"),localStorage.setItem("color-theme","dark")),document.dispatchEvent(o)}))},127:(e,t,n)=>{"use strict";n(315),n(4),n(756),n(391),n(935),n(762)},391:()=>{document.addEventListener("DOMContentLoaded",(function(){const e=document.getElementById("currentYear");e&&(e.textContent=(new Date).getFullYear())}))},756:()=>{function e(){window.scrollY>0?t.setAttribute("data-sticky","true"):t.setAttribute("data-sticky","false")}const t=document.querySelector("#mainNavbar");t&&(e(),window.addEventListener("scroll",(function(){e()})))},762:()=>{window.addEventListener("load",(function(){var e=document.getElementById("plausible-switch"),t=window.localStorage.getItem("plausible_ignore");e.checked=null==t||!1===t})),window.addEventListener("load",(function(){var e=window.localStorage.getItem("hidePlausibleBanner"),t=document.getElementById("plausible-banner");e?t.classList.add("hidden"):t.classList.remove("hidden")})),document.getElementById("plausible-switch").addEventListener("change",(function(){this.checked?window.localStorage.removeItem("plausible_ignore"):window.localStorage.setItem("plausible_ignore","true")})),document.getElementById("plausible-ok").addEventListener("click",(function(){var e=document.getElementById("plausible-banner");window.localStorage.setItem("hidePlausibleBanner","true"),e.classList.add("hidden")}))},935:(e,t,n)=>{window.addEventListener("DOMContentLoaded",(async function(){const e=await n.e(96).then(n.bind(n,339)),t=await n.e(96).then(n.bind(n,239)),o=e.Filter;if("function"!=typeof o)return;const r=new o,a=document.querySelector("form[name='contact'] input[name='subject']");if(!a)return;const l=new URLSearchParams(window.location.search).get("topic")||"none";if("none"===l)return;const i=r.clean(l).substring(0,30),c=t.default.titleCase(i),d=a.value||"none";a.value=d.concat(" - ",c)}))}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var a=n[e]={exports:{}};return t[e](a,a.exports,o),a.exports}o.m=t,e=[],o.O=(t,n,r,a)=>{if(!n){var l=1/0;for(s=0;s<e.length;s++){for(var[n,r,a]=e[s],i=!0,c=0;c<n.length;c++)(!1&a||l>=a)&&Object.keys(o.O).every((e=>o.O[e](n[c])))?n.splice(c--,1):(i=!1,a<l&&(l=a));if(i){e.splice(s--,1);var d=r();void 0!==d&&(t=d)}}return t}a=a||0;for(var s=e.length;s>0&&e[s-1][2]>a;s--)e[s]=e[s-1];e[s]=[n,r,a]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.e=()=>Promise.resolve(),o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={524:0};o.O.j=t=>0===e[t];var t=(t,n)=>{var r,a,[l,i,c]=n,d=0;if(l.some((t=>0!==e[t]))){for(r in i)o.o(i,r)&&(o.m[r]=i[r]);if(c)var s=c(o)}for(t&&t(n);d<l.length;d++)a=l[d],o.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return o.O(s)},n=self.webpackChunkflowbite_pro_marketing_ui_pages=self.webpackChunkflowbite_pro_marketing_ui_pages||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var r=o.O(void 0,[96],(()=>o(127)));r=o.O(r)})();
|
||||
//# sourceMappingURL=app.bundle.js.map
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user