Add timestamp and auto dark mode to service page

This commit is contained in:
jackiesung4ev 2021-01-24 18:06:19 +08:00
parent 762962a427
commit d30242eab3
4 changed files with 10 additions and 9 deletions

View File

@ -1 +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");
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/mode.js?v202101241800"),callAllJsFiles("/static/theme-daynight/js/navtop.js?v202101241800");

View File

@ -1 +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")}));
function callAllJsFiles(e){var t=document.createElement("script");t.setAttribute("type","text/javascript"),t.setAttribute("src",e),document.getElementsByTagName("head")[0].appendChild(t)}callAllJsFiles("./static/theme-daynight/js/navtop.js?v202101241800"),callAllJsFiles("./static/theme-daynight/js/mode.js?v202101241800"),$(".corner").hover((function(){$(this).attr("aria-expanded","true")}));const hour=new Date(Date.now()).getHours();(hour>17||hour<4)&&(document.querySelector("input[name=theme]").checked=!0,document.getElementsByTagName("BODY")[0].setAttribute("data-theme","dark"));

View File

@ -9,7 +9,7 @@
<title>{{.Title}}</title>
<link rel="shortcut icon" type="image/png" href="/static/logo.png" />
<link rel="stylesheet" href="/static/theme-daynight/css/main.css">
<link rel="stylesheet" href="/static/theme-daynight/css/main.css?v202101241800">
<link href="https://cdn.bootcdn.net/ajax/libs/font-awesome/5.15.1/css/all.min.css" rel="stylesheet">
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
@ -20,7 +20,7 @@
<body data-theme="light" data-gridlist="grid">
<header class="nav-bar clearfix">
<figure class="logo"><a href="/">哪吒面板</a></figure>
<figure class="logo"><a href="/">{{.Title}}</a></figure>
<div class="icon-container">
<div class="row cf">
<div class="three col">
@ -154,7 +154,7 @@
</div>
</footer>
<script src="/static/theme-daynight/js/main.js" ></script>
<script src="/static/theme-daynight/js/main.js?v202101241800" ></script>
<script src="https://cdn.jsdelivr.net/npm/vue@2.6.12/dist/vue.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@10"></script>

View File

@ -7,7 +7,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>{{.Title}}</title>
<link rel="shortcut icon" type="image/png" href="/static/logo.png" />
<link rel="stylesheet" href="/static/theme-daynight/css/service.css" />
<link rel="stylesheet" href="/static/theme-daynight/css/service.css?v202101241800" />
<link href="https://cdn.bootcdn.net/ajax/libs/font-awesome/5.15.1/css/all.min.css" rel="stylesheet" />
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
@ -19,7 +20,7 @@
<body data-theme="light" data-gridlist="list">
<article>
<header class="nav-bar clearfix">
<figure class="logo"><a href="/">哪吒面板</a></figure>
<figure class="logo"><a href="/">{{.Title}}</a></figure>
<div class="icon-container">
<div class="row cf">
<div class="three col">
@ -119,8 +120,8 @@
<a id="back-to-top"></a>
</article>
<script src="/static/theme-daynight/js/service.js" ></script>
<script src="https://cdn.jsdelivr.net/npm/vue@2.6.12/dist/vue.min.js"></script>
<script src="/static/theme-daynight/js/service.js?v202101241800"></script>
</body>
</html>
{{end}}