-
-
Notifications
You must be signed in to change notification settings - Fork 559
/
404.php
145 lines (143 loc) · 4.79 KB
/
404.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700" rel="stylesheet">
<link href="<?php bloginfo('template_url'); ?>/assets/vendor/nucleo/css/nucleo.css" rel="stylesheet">
<link href="<?php bloginfo('template_url'); ?>/assets/vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet">
<link type="text/css" href="<?php bloginfo('template_url'); ?>/assets/css/argon.min.css" rel="stylesheet">
<script src="<?php bloginfo('template_url'); ?>/assets/vendor/jquery/jquery.min.js"></script>
<script src="<?php bloginfo('template_url'); ?>/assets/vendor/bootstrap/bootstrap.min.js"></script>
<script src="<?php bloginfo('template_url'); ?>/assets/js/argon.min.js"></script>
<title><?php _e("404 - 找不到页面", "argon"); ?></title>
<script>
var darkmodeAutoSwitch = "<?php echo (get_option("argon_darkmode_autoswitch") == '' ? 'false' : get_option("argon_darkmode_autoswitch"));?>";
function setDarkmode(enable){
if (enable == true){
$("html").addClass("darkmode");
}else{
$("html").removeClass("darkmode");
}
$(window).trigger("scroll");
}
function toggleDarkmode(){
if ($("html").hasClass("darkmode")){
setDarkmode(false);
sessionStorage.setItem("Argon_Enable_Dark_Mode", "false");
}else{
setDarkmode(true);
sessionStorage.setItem("Argon_Enable_Dark_Mode", "true");
}
}
if (sessionStorage.getItem("Argon_Enable_Dark_Mode") == "true"){
setDarkmode(true);
}
function toggleDarkmodeByPrefersColorScheme(media){
if (sessionStorage.getItem('Argon_Enable_Dark_Mode') == "false" || sessionStorage.getItem('Argon_Enable_Dark_Mode') == "true"){
return;
}
if (media.matches){
setDarkmode(true);
}else{
setDarkmode(false);
}
}
function toggleDarkmodeByTime(){
if (sessionStorage.getItem('Argon_Enable_Dark_Mode') == "false" || sessionStorage.getItem('Argon_Enable_Dark_Mode') == "true"){
return;
}
let hour = new Date().getHours();
if (hour < 7 || hour >= 22){
setDarkmode(true);
}else{
setDarkmode(false);
}
}
if (darkmodeAutoSwitch == 'system'){
var darkmodeMediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
darkmodeMediaQuery.addListener(toggleDarkmodeByPrefersColorScheme);
toggleDarkmodeByPrefersColorScheme(darkmodeMediaQuery);
}
if (darkmodeAutoSwitch == 'time'){
toggleDarkmodeByTime();
}
if (darkmodeAutoSwitch == 'alwayson'){
setDarkmode(true);
}
function toggleAmoledDarkMode(){
$("html").toggleClass("amoled-dark");
if ($("html").hasClass("amoled-dark")){
localStorage.setItem("Argon_Enable_Amoled_Dark_Mode", "true");
}else{
localStorage.setItem("Argon_Enable_Amoled_Dark_Mode", "false");
}
}
if (localStorage.getItem("Argon_Enable_Amoled_Dark_Mode") == "true"){
$("html").addClass("amoled-dark");
}else if (localStorage.getItem("Argon_Enable_Amoled_Dark_Mode") == "false"){
$("html").removeClass("amoled-dark");
}
</script>
</head>
<body>
<div class="position-relative">
<section class="section section-lg section-shaped pb-250" style="height: 100vh !important;">
<div class="shape shape-style-1 shape-default">
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
</div>
<div class="container py-lg-md d-flex">
<div class="col px-0">
<div class="row">
<div class="col-lg-6 col-sm-12">
<div class="display-1 text-white">404</div>
<p class="lead text-white">Page not found.<br><?php _e("这个页面不见了", "argon"); ?></p>
<div class="btn-wrapper">
<a href="javascript:window.history.back(-1);" ondragstart="return false;" class="btn btn-info btn-icon mb-3 mb-sm-0">
<span class="btn-inner--icon"><i class="fa fa-chevron-left"></i></span>
<span class="btn-inner--text"><?php _e("返回上一页", "argon"); ?></span>
</a>
<a href="<?php bloginfo('url'); ?>" class="btn btn-white btn-icon mb-3 mb-sm-0">
<span class="btn-inner--icon"><i class="fa fa-home"></i></span>
<span class="btn-inner--text"><?php _e("回到首页", "argon"); ?></span>
</a>
</div>
<?php echo apply_filters('argon_404page_extra_html', ''); ?>
</div>
</div>
</div>
</div>
</section>
</div>
</body>
</html>
<style>
body{
overflow: hidden;
}
html.darkmode .section-shaped .shape {
background: #262626;
}
html.darkmode .text-white {
opacity: .75;
}
html.darkmode .btn-white {
background: #424242;
border-color: #424242;
color: #eee;
}
html.darkmode .btn-info {
background: #0a7f94;
border-color: #0a7f94;
color: #eee;
}
html.darkmode.amoled-dark .section-shaped .shape {
background: #000;
}
</style>