add 404
This commit is contained in:
parent
946e989465
commit
3c7e98505b
46
404.html
Normal file
46
404.html
Normal file
@ -0,0 +1,46 @@
|
||||
---
|
||||
permalink:/404.html
|
||||
---
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
||||
<link rel="stylesheet" href="css/index.css">
|
||||
<link rel="stylesheet" href="css/myui.css">
|
||||
<title>LAOZHONGYI BLOG</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container clearfix">
|
||||
<div id="blog-title">AHPU 老中医的博客</div>
|
||||
<input type="checkbox" id="menu-control">
|
||||
<div class="menu-container">
|
||||
<ul>
|
||||
<li><a href="/">首页</a></li>
|
||||
<li><span>关于</span></li>
|
||||
<li><label for="menu-control">返回</label></li>
|
||||
</ul>
|
||||
</div>
|
||||
<label for="menu-control" class="content-mask"></label>
|
||||
<label for="menu-control" class="menu-button-container">
|
||||
<div class="menu-button">
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
</div>
|
||||
</label>
|
||||
|
||||
<div class="NotFound">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
|
||||
<script src="js/drag.js"></script>
|
||||
<script src="js/initialize.js"></script>
|
||||
<script src="js/404.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
3
js/404.js
Normal file
3
js/404.js
Normal file
@ -0,0 +1,3 @@
|
||||
message.alert('404 Not Found', '您所查找的页面不存在',function(){
|
||||
window.location.href = '/';
|
||||
});
|
@ -29,10 +29,13 @@ $(function () {
|
||||
m.remove();
|
||||
}, 300);
|
||||
message.alertCode = '';
|
||||
if(message.callback)
|
||||
message.callback();
|
||||
});
|
||||
})();
|
||||
|
||||
var message = new function () {
|
||||
this.callback = undefined;
|
||||
this.alertCode = '';
|
||||
this.alert = function () {
|
||||
|
||||
@ -43,7 +46,8 @@ var message = new function () {
|
||||
}
|
||||
|
||||
var arg1 = arguments[0],
|
||||
arg2 = arguments[1];
|
||||
arg2 = arguments[1],
|
||||
callback = arguments[2];
|
||||
|
||||
if (arguments.length <= 1) {
|
||||
header = '提示';
|
||||
@ -53,11 +57,13 @@ var message = new function () {
|
||||
content = (arg2 === undefined ? '提示内容' : arg2);
|
||||
}
|
||||
|
||||
message.appendHtml(header, content);
|
||||
message.callback = callback;
|
||||
appendHtml(header, content);
|
||||
|
||||
|
||||
}
|
||||
|
||||
this.appendHtml = function (header, content) {
|
||||
function appendHtml (header, content) {
|
||||
var id = uuid();
|
||||
var html =
|
||||
'<div class="msg-container" id="mc-' + id + '">' +
|
||||
|
Loading…
Reference in New Issue
Block a user