Skip to content

Commit

Permalink
更新至1.4.3版本
Browse files Browse the repository at this point in the history
  • Loading branch information
ZigZagK committed Mar 18, 2020
1 parent d32c278 commit 1360930
Show file tree
Hide file tree
Showing 50 changed files with 331 additions and 53 deletions.
30 changes: 20 additions & 10 deletions 404.php
Expand Up @@ -11,19 +11,29 @@
<div class="mdui-card-content">
<p>你到底是怎么进来的?算了不关我事QAQ……</p>
<blockquote>
<p>404页面是客户端在浏览网页时,服务器无法正常提供信息,或是服务器无法回应,且不知道原因所返回的页面。据说在第三次科技革命之前,互联网的形态就是一个大型的中央数据库,这个数据库就设置在404房间里面。那时候所有的请求都是由人工手动完成的,如果在数据库中没有找到请求者所需要的文件,或者由于请求者写错了文件编号,用户就会得到一个返回信息:room 404 : file not found。404错误信息通常是在目标页面被更改或移除,或客户端输入页面地址错误后显示的页面,人们也就习惯了用404作为服务器未找到文件的错误代码了。当然实际考证传说中的room 404是不存在的,在http请求3位的返回码中,4开头的代表客户错误,5开头代表服务器端错误。</p>
<p>……</p>
<p>当用户不小心访问了某一个不存在的页面并且没有设置错误提示 时,用户会怎么做?如果是初次到访的访客,那么回头率是多少呢?毫无疑问,会抱怨为何出现错误,之后当然是直接关闭窗口离开。所以设置了 404页面也相当于是做了一个针对用户的提示页面,当用户访问了某一个 不存在的页面后就会转到404页面,然后因为你在这个404页面上有友好 的提示,并且有首页和主要栏目页的连接,用户就很有可能会再次点击进入你的首页。但是,Web服务器默认的404错误页面,无论是Apache还是IIS,均十分简陋、呆板且对用户不友好,无法给用户提供必要的信息以获取更 多线索,无疑这会造成用户的流失。 因此,很多网站均使用自定义404错误的方式提供用户体验避免用户流失。一般而言,自定义404页面通用的做法是在页面中放置网站快速导航链接、搜索框以及网页提供的特色服务,这样可以有效的帮助用户访问站点并获取需要的信息。</p>
<footer>百度百科 —— 404页面</footer>
<p id="hitokoto">一言加载中</p>
<footer>—— <span id="hitokotofrom">一言加载中</span></footer>
</blockquote>
<del>在404页面划水也是不错的体验呢。</del>
<blockquote>
<p id="OIerdictum">大佬语录加载中</p>
<footer>—— <span id="OIerdictumdalao">大佬语录加载中</span></footer>
</blockquote>
<button class="mdui-btn mdui-btn-icon mdui-ripple mdui-color-theme-accent" id="ordermore"><i class="mdui-icon material-icons">&#xe5d5;</i></button><span class="mdui-text-color-theme-accent mdui-m-l-1"><strong>再来两条</strong></span>
<script>
$.ajax({url:'https://v1.hitokoto.cn/',success:function(data) {$('#hitokoto').text(data.hitokoto);$('#hitokotofrom').text(data.from);}});
$.ajax({url:'https://api.zigzagk.top/dictumapi/?type=dictum&encode=json',success:function(data) {$('#OIerdictum').text(data.text);$('#OIerdictumdalao').text(data.dalao);}});
$('#ordermore').click(function(){
$.ajax({url:'https://v1.hitokoto.cn/',success:function(data) {$('#hitokoto').text(data.hitokoto);$('#hitokotofrom').text(data.from);}});
$.ajax({url:'https://api.zigzagk.top/dictumapi/?type=dictum&encode=json',success:function(data) {$('#OIerdictum').text(data.text);$('#OIerdictumdalao').text(data.dalao);}});
});
</script>
</div>
<div class="mdui-card-actions">
<a href="/" class="mdui-btn mdui-ripple mdui-color-theme-accent">返回首页</a>
<button class="mdui-btn mdui-ripple mdui-color-theme-accent" mdui-tooltip="{content:'右上角可以搜索文章哦',position:'top'}">帮助 1</button>
<button class="mdui-btn mdui-ripple mdui-color-theme-accent" mdui-tooltip="{content:'左上角导航栏里有分类和标签啊',position:'top'}">帮助 2</button>
<button class="mdui-btn mdui-ripple mdui-color-theme-accent" mdui-tooltip="{content:'不想看文章了也可以左下角听歌呢',position:'top'}">帮助 3</button>
<button class="mdui-btn mdui-ripple mdui-color-theme-accent" onclick="mdui.snackbar({message:'你是有多无聊才把帮助都点了一遍',position:'right-bottom'});" mdui-tooltip="{content:'<del>你是有多无聊才把帮助都看了一遍</del>',position:'top'}">我是凑数</button>
<a href="/" class="mdui-btn mdui-ripple mdui-color-theme-accent mdui-m-a-1">返回首页</a>
<button class="mdui-btn mdui-ripple mdui-color-theme-accent mdui-m-a-1" mdui-tooltip="{content:'右上角可以搜索文章哦',position:'top'}">帮助 1</button>
<button class="mdui-btn mdui-ripple mdui-color-theme-accent mdui-m-a-1" mdui-tooltip="{content:'左上角导航栏里有分类和标签啊',position:'top'}">帮助 2</button>
<button class="mdui-btn mdui-ripple mdui-color-theme-accent mdui-m-a-1" mdui-tooltip="{content:'不想看文章了也可以左下角听歌呢',position:'top'}">帮助 3</button>
<button class="mdui-btn mdui-ripple mdui-color-theme-accent mdui-m-a-1" onclick="mdui.snackbar({message:'你是有多无聊才把帮助都点了一遍',position:'right-bottom'});" mdui-tooltip="{content:'<del>你是有多无聊才把帮助都看了一遍</del>',position:'top'}">我是凑数</button>
</div>
</div>
</div>
Expand Down
9 changes: 7 additions & 2 deletions README.md
Expand Up @@ -2,7 +2,7 @@

基于[MDUI](https://mdui.org)的一款单栏typecho主题。

作者:ZigZagK | 版本:1.4.2
作者:ZigZagK | 版本:1.4.3

## 主题特性

Expand All @@ -16,6 +16,7 @@
| 图片灯箱 | 使用[Fancybox](https://fancyapps.com/fancybox/3/)添加图片灯箱。 |
| 文章目录 | 使用[jquery_headindex](https://github.com/mnnyang/jquery_headindex)生成手风琴式的文章目录。 |
| 主题更新提示 | 有新版本时会在主题外观设置中显示。 |
| 主题设置备份 | 再也不用担心手贱切换主题导致设置清空啦。 |
| 只支持现代浏览器 | 这是不可抗力,不支持过气浏览器(如IE) |
| ~~不是很丰富的设置~~ | ~~这哪里是特性了?!~~ |
| ~~并没有多语言~~ | ~~这根本是敷衍吧?!~~ |
Expand Down Expand Up @@ -46,7 +47,11 @@

## 鸣谢

[MDUI](https://mdui.org) | [jQuery](https://github.com/jquery/jquery) | [jquery-pjax](https://github.com/defunkt/jquery-pjax) | [highlight.js](https://highlightjs.org/) | [Prism](https://prismjs.com/) | [MathJax](https://www.mathjax.org/) | [Fancybox](https://fancyapps.com/fancybox/3/) | [jquery_headindex](https://github.com/mnnyang/jquery_headindex) | [Meting](https://github.com/MoePlayer/APlayer-Typecho) | [ExSearch](https://github.com/AlanDecode/Typecho-Plugin-ExSearch) | [Mailer](https://github.com/AlanDecode/Typecho-Plugin-Mailer)
[MDUI](https://mdui.org) | [jQuery](https://github.com/jquery/jquery) | [jquery-pjax](https://github.com/defunkt/jquery-pjax)

[highlight.js](https://highlightjs.org/) | [Prism](https://prismjs.com/) | [MathJax](https://www.mathjax.org/) | [Fancybox](https://fancyapps.com/fancybox/3/) | [jquery_headindex](https://github.com/mnnyang/jquery_headindex) | [twemoji-colr](https://github.com/mozilla/twemoji-colr)

[Meting](https://github.com/MoePlayer/APlayer-Typecho) | [ExSearch](https://github.com/AlanDecode/Typecho-Plugin-ExSearch) | [Mailer](https://github.com/AlanDecode/Typecho-Plugin-Mailer)

最初灵感和随机图片来自[Material](https://github.com/idawnlight/typecho-theme-material) | 评论表情框魔改自[Castle](https://github.com/ohmyga233/castle-Typecho-Theme) | 全站音乐播放器的支持来自[AlanDecode](https://github.com/MoePlayer/APlayer-Typecho/pull/60)

Expand Down
8 changes: 4 additions & 4 deletions comments.php
Expand Up @@ -60,9 +60,9 @@ function threadedComments($comment,$options){ ?>
<?php if ($this->user->hasLogin()){ ?>
<div class="mdui-card">
<div class="mdui-card-content mdui-row">
<div class="mdui-chip">
<div class="mdui-chip mdui-m-l-1">
<img class="mdui-chip-icon mdui-color-grey-200" src="<?php echo GravatarURL($this->user->mail,100); ?>" />
<span class="mdui-chip-title"><a href="<?php $this->options->profileUrl(); ?>"><?php $this->user->screenName(); ?></a></span>
<span class="mdui-chip-title"><a href="<?php $this->options->profileUrl(); ?>" target="_blank"><?php $this->user->screenName(); ?></a></span>
</div>
<a href="<?php $this->options->logoutUrl(); ?>" class="mdui-btn mdui-btn-icon mdui-color-theme-accent mdui-ripple" mdui-tooltip="{content:'退出登录', position:'top'}" no-pjax><i class="mdui-icon material-icons">&#xe879;</i></a>
<?php } else { ?>
Expand Down Expand Up @@ -90,8 +90,8 @@ function threadedComments($comment,$options){ ?>
</div>
<?php if ($this->options->commentpicture=='true') $this->need('php/QAQTAB.php'); ?>
<?php if (!$this->user->hasLogin() && array_key_exists('Mailer',$plugin['activated'])){ ?>
<span class="mdui-float-left mdui-valign" mdui-tooltip="{content:'接收邮件通知',position:'top'}">
<i class="mdui-icon material-icons mdui-text-color-theme-accent mdui-m-r-1">&#xe7f7;</i>
<span class="mdui-float-left mdui-valign" mdui-tooltip="{content:'邮件提醒',position:'top'}">
<i class="mdui-icon material-icons mdui-text-color-theme-accent mdui-m-r-1" id="receiveMailicon">&#xe7f7;</i>
<label class="mdui-switch"><input type="checkbox" name="receiveMail" value="yes" checked /><i class="mdui-switch-icon"></i></label>
</span>
<?php } ?>
Expand Down
9 changes: 7 additions & 2 deletions css/MDUI2333css.php
@@ -1,8 +1,11 @@
<style>
/*index.php*/
<?php if ($this->options->twemoji=='true'){ ?>
@font-face {font-family:twemoji;font-display:swap;src:url('<?php Helper::options()->themeUrl(); ?>fonts/twemoji/TwemojiMozilla.ttf');}
<?php } ?>
::selection {background:#b3d4fc;text-shadow:none;}
a {color:unset;text-decoration:unset;}
body {background:<?php if ($this->options->backgroundPic) echo 'url('.$this->options->backgroundPic.')'; else echo '#b3d4fc'; ?>;background-position:center center;background-size:cover;background-repeat:no-repeat;background-attachment:fixed;display:flex;flex-flow:column;min-height:calc(100vh - 56px);}
body {background:<?php if ($this->options->backgroundPic) echo 'url('.$this->options->backgroundPic.')'; else echo '#b3d4fc'; ?>;background-position:center center;background-size:cover;background-repeat:no-repeat;background-attachment:fixed;display:flex;flex-flow:column;min-height:calc(100vh - 56px);<?php if ($this->options->twemoji=='true') echo 'font-family:Roboto,Noto,Helvetica,Arial,sans-serif,twemoji;'; ?>}
@media (min-width:600px) {body {min-height:calc(100vh - 64px);}}
@media (orientation:landscape) and (max-width:959px) {body {min-height:calc(100vh - 48px);}}
#pjax-overlay {position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:2000;background:rgb(0,0,0,0.8);}
Expand All @@ -29,9 +32,11 @@
div.cancel-comment-reply a:hover:before,div.cancel-comment-reply a:focus:before {display:none!important;}
#QAQ {height:75%!important;max-height:400px!important;}
#QAQ .mdui-dialog-content {height:calc(100% - 100px)!important;}
#QAQ a {color:unset!important;}
#QAQ a {color:unset!important;text-transform:unset!important;}
#QAQ a:hover:before,#QAQ a:focus:before {display:none!important;}
#QAQ .mdui-dialog-content .mdui-btn {text-transform:unset!important;}
#QAQ .mdui-dialog-content .QAQPicture .mdui-btn {min-width:unset;padding:5px;height:unset;margin-bottom:-13px;}
#QAQ .mdui-dialog-content .QAQTextclose .mdui-btn {min-width:unset;}
div.page-navigator div {display:inline-block;margin:2px 1%;border-radius:4px;width:30px;height:30px;line-height:30px;background:<?php echo ThemeAccent(); ?>;}
div.page-navigator div a,div.page-navigator div span{color:#fff!important;}
div.page-navigator div a:hover:before,div.page-navigator div a:focus:before {display:none!important;}
Expand Down
Empty file modified css/animate.min.css 100644 → 100755
Empty file.
Empty file modified css/jquery.fancybox.min.css 100644 → 100755
Empty file.
Empty file modified css/mdui.min.css 100644 → 100755
Empty file.
Empty file modified css/prism/prism-coy.min.css 100644 → 100755
Empty file.
Empty file modified css/prism/prism-dark.min.css 100644 → 100755
Empty file.
Empty file modified css/prism/prism-funky.min.css 100644 → 100755
Empty file.
Empty file modified css/prism/prism-okaidia.min.css 100644 → 100755
Empty file.
Empty file modified css/prism/prism-solarizedlight.min.css 100644 → 100755
Empty file.
Empty file modified css/prism/prism-tomorrow.min.css 100644 → 100755
Empty file.
Empty file modified css/prism/prism-twilight.min.css 100644 → 100755
Empty file.
Empty file modified css/prism/prism.min.css 100644 → 100755
Empty file.
1 change: 1 addition & 0 deletions css/settingbackup.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file modified fonts/iconfont/iconfont.css 100644 → 100755
Empty file.
Empty file modified fonts/iconfont/iconfont.eot 100644 → 100755
Empty file.
Empty file modified fonts/iconfont/iconfont.svg 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified fonts/iconfont/iconfont.ttf 100644 → 100755
Empty file.
Empty file modified fonts/iconfont/iconfont.woff 100644 → 100755
Empty file.
Empty file modified fonts/iconfont/iconfont.woff2 100644 → 100755
Empty file.
Binary file added fonts/twemoji/TwemojiMozilla.ttf
Binary file not shown.

0 comments on commit 1360930

Please sign in to comment.