blog-hexo/themes/hexo-theme-linear/source/js/85d1c72e.js

1 line
3.6 KiB
JavaScript
Raw Normal View History

2023-10-19 21:55:22 +08:00
(()=>{"use strict";const o="__theme__",r={light:{"--color-primary":"rgb(110, 121, 214)","--color-primary-2":"rgba(110, 121, 214, .1)","--color-font":"rgb(40, 42, 48)","--color-font-2":"rgb(107, 111, 118)","--color-font-3":"rgb(160, 160, 160)","--color-menu-hover":"#f4f2f4","--color-tiny-hover":"rgb(251, 251, 252)","--color-border":"rgb(237, 240, 243)","--color-border-2":"rgba(237, 240, 243, .5)","--color-article-selection":"rgba(33, 96, 219, 0.4)","--color-selection":"rgba(106, 111, 117, 0.2)","--color-bg":"#fff","--color-bg-2":"#fafafa","--color-bg-3":"rgb(239, 239, 239)","--color-bg-4":"rgba(223, 225, 228,.6)","--color-bg-mask":"rgba(255, 255, 255,.6)","--shadow-button":"rgba(0, 0, 0, 0.09) 0px 1px 4px","--shadow-box":"rgb(0 0 0 / 23%) 0px 16px 70px","--border-button":"1px solid rgb(223, 225, 228)","--scrollbar-width":"12px","--scrollbar-min-size":"32px","--scrollbar-color":"rgba(143, 149, 156, 0.3)","--dropdown-bdf":"blur(12px) saturate(190%) contrast(50%) brightness(130%)","--dropdown-bg":"rgba(255, 255, 255, 0.5)","--dropdown-boxShadow":"rgba(0, 0, 0, 0.09) 0px 3px 12px","--dropdown-border":"1px solid rgb(233, 233, 233)"},dark:{"--color-primary":"rgb(90, 79, 182)","--color-primary-2":"rgba(90, 79, 182, .7)","--color-font":"rgb(215, 213, 207)","--color-font-2":"rgb(148, 155, 167)","--color-font-3":"rgb(107, 111, 118)","--color-menu-hover":"rgb(45, 47, 54)","--color-tiny-hover":"rgb(30, 30, 33)","--color-border":"rgb(68, 65, 62)","--color-border-2":"rgba(68, 65, 62, .7)","--color-article-selection":"rgba(72, 160, 255, 0.6)","--color-selection":"rgba(90, 95, 107, 0.8)","--color-bg":"#1f2023","--color-bg-2":"#27282b","--color-bg-3":"rgb(48, 50, 54)","--color-bg-4":"rgba(48, 50, 54,.6)","--color-bg-mask":"rgba(0, 0, 0, .2)","--shadow-button":"rgba(255, 255, 255, 0.05) 0px -1px 4px","--shadow-box":"rgb(0 0 0 / 77%) 0px -16px 70px","--border-button":"1px solid rgb(32, 35, 40)","--scrollbar-width":"12px","--scrollbar-min-size":"32px","--scrollbar-color":"rgba(112, 116, 121, 0.7)","--dropdown-bdf":"blur(10px) saturate(190%) contrast(70%) brightness(80%)","--dropdown-bg":"rgba(29, 30, 43, 0.498)","--dropdown-boxShadow":"rgba(0, 0, 0, 0.2) 0px 4px 24px","--dropdown-border":"1px solid rgba(82, 82, 111, 0.44)"}},t=o=>{for(const[r,t]of Object.entries(o))document.documentElement.style.setProperty(r,t)},e=()=>{var e;const l=r[null!==(e=(()=>{const r=localStorage.getItem(o);return null!=r?r:"light"})())&&void 0!==e?e:"light"];t(l)},l='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="4" y="4" width="16" height="16" rx="2"></rect><path d="M9 4v16"></path></g></svg>';document.addEventListener("DOMContentLoaded",(function(){e();const o=document.querySelector(".side-navigation"),r=document.querySelector("#app"),t=document.querySelector("#app >main");o&&r&&o.addEventListener("click",(()=>{r.className.includes("equip")?(r.classList.remove("equip"),o.setAttribute("data-tip",window.i18n["tip-expand"]),o.innerHTML=l):(r.classList.add("equip"),o.setAttribute("data-tip",window.i18n["tip-collapse"]),o.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="4" y="4" width="16" height="16" rx="2"></rect><path d="M9 4v16"></path><path d="M15 10l-2 2l2 2"></path></g></svg>')})),t&&r&&o&&t.addEventListener("click",(()=>{r.className.includes("equip")&&(r.classList.remove("equip"),o.setAttribute("data-tip",window.i18n["tip-expand"]),o.innerHTML=l)}))}))})();