mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-04 12:40:07 +00:00
Service page and Smooth transition update
This commit is contained in:
File diff suppressed because one or more lines are too long
1
resource/static/theme-daynight/css/service.css
Normal file
1
resource/static/theme-daynight/css/service.css
Normal file
File diff suppressed because one or more lines are too long
1
resource/static/theme-daynight/js/main.js
Normal file
1
resource/static/theme-daynight/js/main.js
Normal file
@@ -0,0 +1 @@
|
||||
function callAllJsFiles(t){var e=document.createElement("script");e.setAttribute("type","text/javascript"),e.setAttribute("src",t),document.getElementsByTagName("head")[0].appendChild(e)}callAllJsFiles("/static/theme-daynight/js/navtop.js"),callAllJsFiles("/static/theme-daynight/js/mode.js");
|
||||
1
resource/static/theme-daynight/js/mode.js
Normal file
1
resource/static/theme-daynight/js/mode.js
Normal file
@@ -0,0 +1 @@
|
||||
var darkCheckBox=document.querySelector("input[name=theme]"),themeStatus=document.getElementsByTagName("BODY")[0];darkCheckBox.addEventListener("change",(function(){this.checked?(trans(),themeStatus.setAttribute("data-theme","dark")):(trans(),themeStatus.setAttribute("data-theme","light"))}));let trans=()=>{themeStatus.classList.add("transition-theme"),window.setTimeout(()=>{themeStatus.classList.remove("transition-theme")},1e3)};var listCheckBox=document.querySelector("input[name=grid]");themeStatus=document.getElementsByTagName("BODY")[0];listCheckBox.addEventListener("change",(function(){this.checked?(transs(),themeStatus.setAttribute("data-gridlist","list")):(transs(),themeStatus.setAttribute("data-gridlist","grid"))}));let transs=()=>{themeStatus.classList.add("transition-theme"),window.setTimeout(()=>{themeStatus.classList.remove("transition-theme")},1e3)};
|
||||
1
resource/static/theme-daynight/js/navtop.js
Normal file
1
resource/static/theme-daynight/js/navtop.js
Normal file
@@ -0,0 +1 @@
|
||||
$(document).ready((function(){$(".hamburger").click((function(){$(this).toggleClass("is-active"),$(".nav-menu").toggleClass("active"),$(".nav-bar").toggleClass("active")}))}));var btn=$("#back-to-top");$(window).scroll((function(){$(window).scrollTop()>300?btn.addClass("show"):btn.removeClass("show")})),btn.on("click",(function(o){o.preventDefault(),$("html, body").animate({scrollTop:0},"300")}));
|
||||
1
resource/static/theme-daynight/js/service.js
Normal file
1
resource/static/theme-daynight/js/service.js
Normal file
@@ -0,0 +1 @@
|
||||
function callAllJsFiles(t){var e=document.createElement("script");e.setAttribute("type","text/javascript"),e.setAttribute("src",t),document.getElementsByTagName("head")[0].appendChild(e)}callAllJsFiles("/static/theme-daynight/js/navtop.js"),callAllJsFiles("/static/theme-daynight/js/mode.js"),callAllJsFiles("/static/theme-daynight/js/tooltip.js"),$(".corner").hover((function(){$(this).attr("aria-expanded","true")}));
|
||||
1
resource/static/theme-daynight/js/tooltip.js
Normal file
1
resource/static/theme-daynight/js/tooltip.js
Normal file
@@ -0,0 +1 @@
|
||||
var tooltipData=document.querySelectorAll(".corner ul");$(window).width()<=500?window.onmousemove=function(t){for(var o=t.clientX-40+"px",l=t.clientY+30+"px",e=0;e<tooltipData.length;e++)tooltipData[e].style.top=l,tooltipData[e].style.left=o}:window.onmousemove=function(t){for(var o=t.clientX-50+"px",l=t.clientY-100+"px",e=0;e<tooltipData.length;e++)tooltipData[e].style.top=l,tooltipData[e].style.left=o};
|
||||
Reference in New Issue
Block a user