Skip to content

Commit

Permalink
v1.4.2 添加404页面
Browse files Browse the repository at this point in the history
  • Loading branch information
ddiu8081 committed May 26, 2018
1 parent 9ac9ee2 commit 16a8dc5
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Ghost 0.x版本默认的 Casper 十分好看,可惜1.0版本之后就改成 cm
* 2018.05.24 v1.3.0 添加归档页;细节优化
* 2018.05.24 v1.4.0 添加文章目录
* 2018.05.25 v1.4.1 标签云支持显示为独立页面
* 2018.05.26 v1.4.2 添加404页面

## 下载与使用

Expand Down
27 changes: 27 additions & 0 deletions assets/css/moegi.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
body {
font: 300 1em/1.8 PingFang SC, Lantinghei SC, Microsoft Yahei, Hiragino Sans GB, Microsoft Sans Serif, WenQuanYi Micro Hei, sans-serif;
margin: 0;
padding: 0;
}

a {
transition: all 0.3s ease;
text-decoration: none;
Expand Down Expand Up @@ -383,6 +389,27 @@ pre {

#archives-list a:hover {
color: #86B81B;
border: none;
}

/* ERROR */

.error-message {
text-align: center;
margin-left: auto;
margin-right: auto;
margin-top: 1.8em;
}

.error-code {
margin: 0;
font-size: 4em;
opacity: .3;
}

.error-description {
margin: 0;
color: #999999;
}

/* POSITIONING */
Expand Down
48 changes: 48 additions & 0 deletions error-404.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{{!--
This error template is used for all 404 errors, which might occur on your site.
It's a good idea to keep this template as minimal as possible in terms of both file size and complexity.
--}}

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>{{meta_title}}</title>
<meta name="HandheldFriendly" content="True" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" type="text/css" href="{{asset "css/moegi.css"}}" />
<link rel="stylesheet" type="text/css" href="{{asset "fonts/iconfont.css"}}">
</head>
<body class="error-template">
<div class="container">

<header>
<div class="post-blog-title"><a href="{{@blog.url}}"><i class="iconfont icon-back"></i>&nbsp;{{@blog.title}}</a></div>
</header>

<main id="site-main" class="site-main outer">
<div class="inner">

<section class="error-message">
<h1 class="error-code">{{code}}</h1>
<p class="error-description">{{message}}</p>
</section>
</div>
</main>

{{!-- {{#get "posts" limit="3"}}
<div id="archives-list" class="typo">
<h2>你可能喜欢</h2>
{{#foreach posts}}
<div class='archives-item' date="{{date format='YYYY'}}">
<time>{{date published_at format="MM-DD"}}</time>
<a href='{{url}}'>{{title}}</a>
</div>
{{/foreach}}
</div>
{{/get}} --}}

</div>
</body>
</html>
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Moegi",
"description": "An elegant Ghost theme.",
"version": "1.4.1",
"version": "1.4.2",
"engines": {
"ghost": ">=1.0.0"
},
Expand Down

0 comments on commit 16a8dc5

Please sign in to comment.