From 8441a6d17c9516715115f27e9a95c7e5dbcd9766 Mon Sep 17 00:00:00 2001 From: outtime Date: Sun, 15 Dec 2019 17:22:31 +0800 Subject: =?UTF-8?q?=F0=9F=93=83Perf=EF=BC=9A=E4=BC=98=E5=8C=96=E9=A6=96?= =?UTF-8?q?=E9=A1=B5=E5=8D=A1=E7=89=87=EF=BC=8C=E5=90=88=E5=B9=B6=E7=A7=BB?= =?UTF-8?q?=E5=8A=A8=E7=AB=AF=E4=B8=8EPC=E4=B8=BA=E4=B8=80=E4=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/css/main/miracles.min.css | 7 ++++++- assets/css/main/post.css | 23 +++-------------------- index.php | 27 +++------------------------ 3 files changed, 12 insertions(+), 45 deletions(-) diff --git a/assets/css/main/miracles.min.css b/assets/css/main/miracles.min.css index d85e1e1..905e186 100644 --- a/assets/css/main/miracles.min.css +++ b/assets/css/main/miracles.min.css @@ -62,10 +62,14 @@ display: block } /* Mobile phone */ -@media (max-width:375px) { +@media (max-width:767px) { .drawer { width: 100vw; } + .mobile-menu-close { + right: 20px; + left: auto; + } } /* > Pad and up */ @media (min-width:768px) { @@ -147,6 +151,7 @@ .post-title { margin: 25px 0; margin-bottom: 10px + font-size: 2rem; } .post-excerpt { diff --git a/assets/css/main/post.css b/assets/css/main/post.css index 799b999..f35786e 100644 --- a/assets/css/main/post.css +++ b/assets/css/main/post.css @@ -21,7 +21,6 @@ transition: background .1s } .post-banner-box { - margin-left: -15px; height: 100%; overflow: hidden } @@ -49,6 +48,7 @@ margin-top: 15px } .post-button { + margin-right: 20px; float: right } .post-footer { @@ -333,23 +333,6 @@ .post-pagenav-right { float: right } -/* -ss */ -.post-banner-ss img { - width: 100% -} -.post-banner-box-ss { - max-height: 280px; - overflow: hidden -} -.post-item-content-ss { - padding: 20px -} -.post-title-ss { - margin: 12px 0; - margin-top: 6px; - height: 32px; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - font-size: 25px +.post-item-content{ + padding: 0 35px 10px 35px; } \ No newline at end of file diff --git a/index.php b/index.php index e57565e..edaad92 100644 --- a/index.php +++ b/index.php @@ -16,8 +16,8 @@ $this->need('includes/header.php');
next()): ?>
- -
+ +
- -
- -
-
- -
-
-
-

sticky(); ?>title(); ?>

-

- fields->excerpt && $this->fields->excerpt!='') { - echo $this->fields->excerpt; - }else{ - echo $this->excerpt(130); - } - ?>

- -
-
-

-- cgit v1.2.3 From 7e758fae9c0669cfdd2f0c6a2804a79ae9ace5ff Mon Sep 17 00:00:00 2001 From: outtime Date: Sun, 15 Dec 2019 17:25:57 +0800 Subject: =?UTF-8?q?=F0=9F=96=BCPerf=EF=BC=9A=E5=8E=8B=E7=BC=A9=E4=B8=A4?= =?UTF-8?q?=E5=BC=A0=E5=9B=BE=E5=A4=A7=E5=B0=8F=EF=BC=8C=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E6=9B=B4=E8=BF=85=E9=80=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- images/login.png | Bin 264227 -> 54795 bytes images/search.png | Bin 263594 -> 55326 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/images/login.png b/images/login.png index 9b78982..8374afe 100644 Binary files a/images/login.png and b/images/login.png differ diff --git a/images/search.png b/images/search.png index 4cf3b53..0ac6ef1 100644 Binary files a/images/search.png and b/images/search.png differ -- cgit v1.2.3 From be503b617116ec68ecb890b8031aa40e7ae28bef Mon Sep 17 00:00:00 2001 From: outtime Date: Sun, 15 Dec 2019 17:26:42 +0800 Subject: =?UTF-8?q?=20=F0=9F=8E=8A=20Perf:=20=E6=9B=B4=E6=8D=A2=E6=87=92?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E5=9B=BE=E7=89=87=E4=B8=BA=E6=96=B9=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- images/loading.gif | Bin 121780 -> 35110 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/images/loading.gif b/images/loading.gif index 791ac77..18d956c 100644 Binary files a/images/loading.gif and b/images/loading.gif differ -- cgit v1.2.3 From 3ee51f3485a1b633c1f39fa568ce1e6896fe1b79 Mon Sep 17 00:00:00 2001 From: outtime Date: Sun, 15 Dec 2019 17:47:41 +0800 Subject: =?UTF-8?q?=E2=9C=A8Add=EF=BC=9A=E6=9B=B4=E6=8D=A2=E6=96=B0logo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- banner.jpg | Bin 13658 -> 6422 bytes wiki-banner.png | Bin 52592 -> 3877 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/banner.jpg b/banner.jpg index 317e8b4..c630f97 100644 Binary files a/banner.jpg and b/banner.jpg differ diff --git a/wiki-banner.png b/wiki-banner.png index 9a5d4ca..d26cb87 100644 Binary files a/wiki-banner.png and b/wiki-banner.png differ -- cgit v1.2.3 From 196934f503fb238b228179d049dbc3da016dbad7 Mon Sep 17 00:00:00 2001 From: outtime Date: Sun, 15 Dec 2019 17:49:41 +0800 Subject: =?UTF-8?q?=F0=9F=93=94Complete=EF=BC=9A=E6=96=87=E7=AB=A0?= =?UTF-8?q?=E5=AD=97=E6=95=B0=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/plan.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/plan.md b/docs/plan.md index 6f1f830..9f2d52e 100644 --- a/docs/plan.md +++ b/docs/plan.md @@ -7,7 +7,7 @@ - [ ] 添加文章目录 - [ ] 后台检测主题更新 - [ ] 追番页面 -- [ ] 文章字数统计 +- [x] 文章字数统计 - [ ] 自动压缩 html ## 优化 -- cgit v1.2.3 From f4b79a3e9f4bcfb343164b38b8062471f0b37748 Mon Sep 17 00:00:00 2001 From: outtime Date: Mon, 16 Dec 2019 13:00:53 +0800 Subject: =?UTF-8?q?=20=E2=9C=92=EF=B8=8FPerf=EF=BC=9AReadMe=E7=BB=86?= =?UTF-8?q?=E8=8A=82=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 924f70d..5b959a2 100644 --- a/README.md +++ b/README.md @@ -1,45 +1,45 @@ -

+

+

-

+

+

--- > **请下载 [Releases](https://github.com/BigCoke233/miracles/releases) 页面的最新发行包,使用前先看 [Wiki](https://github.com/BigCoke233/miracles/wiki),wiki 有的问题一律不解答;禁止删除主题版权信息**
同时,主题的 Telegram 频道已开启,可以获取主题最新消息,推送作者博客更新,点此加入:[Miracles News](https://t.me/eltracer)
开放了一个议题,用于~~民主~~决策主题的更新方向,点击 [这里](https://github.com/BigCoke233/miracles/issues/17) 进入 + # 特色 - 响应式 / 自适应设计 - Pjax 全站无刷新 -- 夜间模式 & 日落模式 -- 前台配置面板 +- 支持系统切换夜间模式 +- 阅读调整字号 / 思源系列字体 & 日落模式 - 前台登录 / 快捷后台通道 - 图片懒加载 - 代码高亮 / 行号 -- 思源系列字体 - 两种可供选择的导航栏(顶部导航栏 / 侧边栏) - 灵活的友情链接功能 - 方便排版的短代码 - 后台设置备份 - 文章浏览数 / 字数统计 - 内置 Live2d(将在 1.3.0 版本移除) -- 简洁大气的设计 -- 文字可读性高 +- 简约大气的设计 - 一个完善的 wiki(强调) - More to find # 使用 1. 下载**最新的 [Release](https://github.com/BigCoke233/miracles/releases)** 2. 解压后,**确认目录名为`Miracles`(M 大写)** -3. 将文件夹放入`usr/themes` +3. 将文件夹放入Typecho根目录下的`usr/themes/` 4. 到后台启用主题 -5. **根据 wiki** 配置主题 -> 有问题请先查看 [Wiki](https://github.com/BigCoke233/miracles/wiki) +5. **根据 wiki(可选)** 配置主题
使用开发版
@@ -51,6 +51,13 @@ $ git clone https://github.com/BigCoke233/miracles
+# 遇到问题 +如果在使用过程中遇到了任何问题,可以先阅读本主题的[Wiki](https://github.com/BigCoke233/miracles/wiki) +并进行一些简单的确认:清理浏览器缓存,更换网络环境,确保Console内没有提示访问不到文件等自身原因。 +在确认你遇到的现象确实是一个Bug后,请在[Issues](https://github.com/BigCoke233/miracles/issues)提交问题 +并为该问题尽可能的描述清楚,并提供一些有关信息。 + + # 鸣谢 > 这些都是在开发过程中给予我帮助的项目和大佬! ## 开源项目 -- cgit v1.2.3 From 40c2ee166dc2ead06bbcb7aaadfec32eabe1e133 Mon Sep 17 00:00:00 2001 From: outtime Date: Mon, 16 Dec 2019 13:03:31 +0800 Subject: =?UTF-8?q?=20=E2=9C=92=EF=B8=8F=20Perf:=20=E6=96=87=E6=A1=88?= =?UTF-8?q?=E7=BB=86=E8=8A=82=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 5b959a2..151f915 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,13 @@ -
-

+

-

+

-

--- @@ -52,14 +50,15 @@ $ git clone https://github.com/BigCoke233/miracles # 遇到问题 -如果在使用过程中遇到了任何问题,可以先阅读本主题的[Wiki](https://github.com/BigCoke233/miracles/wiki) -并进行一些简单的确认:清理浏览器缓存,更换网络环境,确保Console内没有提示访问不到文件等自身原因。 -在确认你遇到的现象确实是一个Bug后,请在[Issues](https://github.com/BigCoke233/miracles/issues)提交问题 +如果在使用过程中遇到了任何问题,可以先阅读本主题的[Wiki](https://github.com/BigCoke233/miracles/wiki)
+并进行一些简单的确认:清理浏览器缓存,更换网络环境,确保Console内没有提示访问不到文件等自身原因。
+在确认你遇到的现象确实是一个Bug后,请在[Issues](https://github.com/BigCoke233/miracles/issues)提交问题
并为该问题尽可能的描述清楚,并提供一些有关信息。 # 鸣谢 > 这些都是在开发过程中给予我帮助的项目和大佬! + ## 开源项目 - [jQuery](https://github.com/jquery/jquery)(若干开源项目和主题内一些 js 的前置) - [FancyBox](https://github.com/fancyapps/fancybox)(文章图片灯箱) @@ -70,6 +69,7 @@ $ git clone https://github.com/BigCoke233/miracles - [OwO](https://github.com/DIYgod/OwO)(评论 OwO 表情) - [LazyLoad](https://github.com/tuupola/lazyload)(图片懒加载) - [Pangu.js](https://github.com/vinta/pangu.js)(分割中英文字符) + ## 大佬 常提交 Pull Requests 的大佬: - [@outtimes](https://github.com/outtimes)(时光) -- cgit v1.2.3 From 09d5c2b09330621b5faff7bba05371e3a8a87431 Mon Sep 17 00:00:00 2001 From: outtime Date: Mon, 16 Dec 2019 13:18:43 +0800 Subject: =?UTF-8?q?=F0=9F=94=A7Perf=EF=BC=9A=E5=88=A0=E9=99=A4=E6=97=A0?= =?UTF-8?q?=E5=85=B3=E7=9A=84=E6=9B=B4=E6=96=B0=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/README-en.md | 2 +- docs/change-log.md | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/docs/README-en.md b/docs/README-en.md index 2d07342..609f17d 100644 --- a/docs/README-en.md +++ b/docs/README-en.md @@ -4,7 +4,7 @@ ![](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square) ![](https://img.shields.io/badge/for-Typecho-blueviolet.svg?style=flat-square) ![](https://img.shields.io/badge/version-1.2.1-red.svg?style=flat-square) -> 🙌 Born to be the Miracles. +> 🙌 Born to be the Miracles. Language: [简体中文](/README.md) | English diff --git a/docs/change-log.md b/docs/change-log.md index ce5e3b2..1f787e9 100644 --- a/docs/change-log.md +++ b/docs/change-log.md @@ -24,18 +24,13 @@ - 添加:滚动时标题栏的变色效果 - 添加:增加顶栏效果并且适配移动端 - 添加:添加文章字数阅读提示 -- 优化:为 nav 添加 id 以供样式切换 -- 优化:删除控制滚动部分 - 优化:为夜间模式适配透明 navBar - 添加:为 navbar 添加单独的透明样式 -- 优化:修改 navbar 变化的方式 -- 优化:去掉 navbar 透明状态的模糊 - 优化:关闭按钮在移动设备上的表现,并且修正了响应式参数 - 优化:调整移动端关闭按钮的表现 - 优化:调整黑夜模式下图片的表现,以及适配布局 - 优化:调整移动端 nav 的颜色表现 - 优化:优化移动端进入文章触发范围 -- 优化:删除无关代码 - 优化:增加菜单文字阴影 - 优化:返回顶部按钮在移动设备的表现 - 修复:navbar 颜色自动更换无效问题 -- cgit v1.2.3 From 19bfe34fda8b9af43167ea6fe9c2d106edf6d3bd Mon Sep 17 00:00:00 2001 From: outtime Date: Wed, 18 Dec 2019 09:50:13 +0800 Subject: =?UTF-8?q?=F0=9F=96=BCPerf=EF=BC=9A=E5=9B=9E=E6=BB=9ALogo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- banner.jpg | Bin 6422 -> 13658 bytes wiki-banner.png | Bin 3877 -> 52592 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/banner.jpg b/banner.jpg index c630f97..317e8b4 100644 Binary files a/banner.jpg and b/banner.jpg differ diff --git a/wiki-banner.png b/wiki-banner.png index d26cb87..9a5d4ca 100644 Binary files a/wiki-banner.png and b/wiki-banner.png differ -- cgit v1.2.3 From 7c970774e9b92cc9cd8aabc01edfebc31d8f30ec Mon Sep 17 00:00:00 2001 From: outtime Date: Thu, 19 Dec 2019 09:50:45 +0800 Subject: =?UTF-8?q?=F0=9F=8E=82Perf=EF=BC=9A=E6=9B=B4=E6=94=B9=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E9=A1=B5=E6=96=87=E6=A1=88=EF=BC=8C=E9=A1=BA=E5=B8=A6?= =?UTF-8?q?=E8=AF=95=E4=B8=80=E4=B8=8B=E6=96=B0=E5=BC=80=E5=8F=91=E7=8E=AF?= =?UTF-8?q?=E5=A2=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libs/Options.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/Options.php b/libs/Options.php index bbc93bb..e876a46 100644 --- a/libs/Options.php +++ b/libs/Options.php @@ -16,14 +16,14 @@ function themeConfig($form) { if($db->fetchRow($db->select()->from ('table.options')->where ('name = ?', 'theme:MiraclesBackup'))){ $update = $db->update('table.options')->rows(array('value'=>$ysj))->where('name = ?', 'theme:MiraclesBackup'); $updateRows= $db->query($update); - echo '
备份已更新,请等待自动刷新!如果等不到请点击'; + echo '
备份已更新,即将自动刷新。如过您的浏览器没有自动跳转请点击'; ?>这里
insert('table.options') ->rows(array('name' => 'theme:MiraclesBackup','user' => '0','value' => $ysj)); $insertId = $db->query($insert); - echo '
备份完成,请等待自动刷新!如果等不到请点击'; + echo '
备份完成,即将自动刷新。如过您的浏览器没有自动跳转请点击'; ?>这里
update('table.options')->rows(array('value'=>$bsj))->where('name = ?', 'theme:Miracles'); $updateRows= $db->query($update); - echo '
检测到模板备份数据,恢复完成,请等待自动刷新!如果等不到请点击'; + echo '
检测到模板备份数据,恢复完成,即将自动刷新。如过您的浏览器没有自动跳转请点击'; ?>这里
Date: Thu, 19 Dec 2019 10:47:08 +0800 Subject: =?UTF-8?q?=F0=9F=A7=B6Add=EF=BC=9A=E6=96=B0=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=E5=8A=A8=E7=94=BB=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- images/loading.gif | Bin 35110 -> 0 bytes images/loading/bilibili.gif | Bin 0 -> 121780 bytes images/loading/block.gif | Bin 0 -> 35110 bytes images/loading/octopus.gif | Bin 0 -> 83375 bytes index.php | 2 +- libs/Options.php | 20 +++++++++++++++----- 6 files changed, 16 insertions(+), 6 deletions(-) delete mode 100644 images/loading.gif create mode 100644 images/loading/bilibili.gif create mode 100755 images/loading/block.gif create mode 100755 images/loading/octopus.gif diff --git a/images/loading.gif b/images/loading.gif deleted file mode 100644 index 18d956c..0000000 Binary files a/images/loading.gif and /dev/null differ diff --git a/images/loading/bilibili.gif b/images/loading/bilibili.gif new file mode 100644 index 0000000..791ac77 Binary files /dev/null and b/images/loading/bilibili.gif differ diff --git a/images/loading/block.gif b/images/loading/block.gif new file mode 100755 index 0000000..18d956c Binary files /dev/null and b/images/loading/block.gif differ diff --git a/images/loading/octopus.gif b/images/loading/octopus.gif new file mode 100755 index 0000000..5967221 Binary files /dev/null and b/images/loading/octopus.gif differ diff --git a/index.php b/index.php index edaad92..4106d39 100644 --- a/index.php +++ b/index.php @@ -22,7 +22,7 @@ $this->need('includes/header.php');
- +
diff --git a/libs/Options.php b/libs/Options.php index e876a46..a94d509 100644 --- a/libs/Options.php +++ b/libs/Options.php @@ -58,9 +58,10 @@ function themeConfig($form) { /** * 设置样式+面板 */ - $ver = themeVersion(); + $ver = themeVersion(); + $themeDir = "/usr/themes/Miracles/"; - echo ''; + echo ''; echo '

Miracles 主题设置面板

欢迎使用 Miracles 主题,目前版本是:'. $ver .'
@@ -77,7 +78,7 @@ function themeConfig($form) { * 设置项 */ //首要设置项 - $news = new Typecho_Widget_Helper_Form_Element_Text('news', NULL, NULL, _t('

首要设置 First

全站公告'), _t('输入公告内容,用户进入站点时自动弹出')); + $news = new Typecho_Widget_Helper_Form_Element_Text('news', NULL, NULL, _t('

首要设置

全站公告'), _t('输入公告内容,用户进入站点时自动弹出')); $form->addInput($news); //nav @@ -99,7 +100,7 @@ function themeConfig($form) { $form->addInput($bannerTitle); $bannerIntro = new Typecho_Widget_Helper_Form_Element_Text('bannerIntro', NULL, NULL, _t('介绍'), _t('这里是首页大图标题下的简介
')); $form->addInput($bannerIntro); - + //pjax $pjax = new Typecho_Widget_Helper_Form_Element_Select('pjax',array('0'=>'关闭','1'=>'开启'),'1','

Pjax 预加载

是否开启','Pjax 预加载功能的开关'); $form->addInput($pjax); @@ -117,7 +118,16 @@ function themeConfig($form) { $form->addInput($grayTheme); $bodyFonts = new Typecho_Widget_Helper_Form_Element_Select('bodyFonts',array('0'=>'无衬线字体','1'=>'衬线字体'),'0','网站字体','选择网站的字体,无衬线字体即“思源黑体”,衬线字体即“思源宋体”'); $form->addInput($bodyFonts); - + + //LoadingImage + $LoadingOptions = [ + 'block' => "方块:", + 'octopus' => "旋转章鱼:", + 'bilibili' => "哔哩哔哩小电视:" + ]; + $LoadingImage = new Typecho_Widget_Helper_Form_Element_Radio('loading_image', $LoadingOptions, 'block', _t('选择图片加载动画'),_t("
")); + $form->addInput($LoadingImage); + //developer $headerEcho = new Typecho_Widget_Helper_Form_Element_Textarea('headerEcho', NULL, NULL, _t('

开发者设置

自定义头部信息'), _t('填写 html 代码,将输出在 <head> 标签中')); $form->addInput($headerEcho); -- cgit v1.2.3 From 71ff6eadc03c481acf0088b61eb14b79160e7d37 Mon Sep 17 00:00:00 2001 From: outtime Date: Thu, 19 Dec 2019 11:21:03 +0800 Subject: =?UTF-8?q?=F0=9F=93=9CPerf=EF=BC=9A=E4=BF=AE=E6=AD=A3=E8=8B=B1?= =?UTF-8?q?=E6=96=87=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/README-en.md | 116 +++++++++++++++++++++++++++--------------------------- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/docs/README-en.md b/docs/README-en.md index 609f17d..0bf0d98 100644 --- a/docs/README-en.md +++ b/docs/README-en.md @@ -1,58 +1,58 @@ -![](/banner.jpg) -![](https://img.shields.io/badge/build-passing-brightgreen.svg?style=flat-square) -![](https://img.shields.io/badge/made%20with-%E2%9D%A4-ff69b4.svg?style=flat-square) -![](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square) -![](https://img.shields.io/badge/for-Typecho-blueviolet.svg?style=flat-square) -![](https://img.shields.io/badge/version-1.2.1-red.svg?style=flat-square) -> 🙌 Born to be the Miracles. - -Language: [简体中文](/README.md) | English - -**Notice: This theme is only for [Typecho](https://github.com/typecho/typecho).** -# Feature -- Responsive Web design -- Pjax -- LazyLoad -- Code Highlight by Prism.js -- Change font-family and font-size when viewing pages -- Use emotional pictures in comments -- Live2d -- A nice dark theme -- Two interesting filters -- Two kinds of Nav -- Custom excerpt when posting -- Twenty random banner for articles -- ~~Lightweight (4MB)~~ - -# Usage -- Star, please! -- Download the latest release. -- Change the name of the folder into `Miracles` -- Put it into `usr/themes` -- Start using after reading the [wiki](https://github.com/BigCoke233/miracles/wiki) -> Sorry, there's no English edition of the wiki now. Maybe you can help me. - -# Thanks! -- [jQuery](https://github.com/jquery/jquery) -- [FancyBox](https://github.com/fancyapps/fancybox) -- [Prism.js](https://github.com/PrismJS/prism) -- [Nprogress](https://github.com/rstacruz/nprogress) -- [OwO](https://github.com/DIYgod/OwO) -- [Pjax](https://github.com/defunkt/jquery-pjax) -- [LazyLoad](https://github.com/tuupola/lazyload) -- [Pangu.js](https://github.com/vinta/pangu.js) - -[@ohmyga233](https://github.com/ohmyga233) | -[@AlanDecode](https://github.com/AlanDecode) | -[@gfwyuexia](https://github.com/gfwyuexia) | -[@jrotty](https://github.com/jrotty) - -# Links -Demo: [My Blog](https://guhub.cn) -Introduction: [Miracles —— 生为奇迹](https://guhub.cn/p/miracles.html) -Change-log: [change-log.md](/docs/change-log.md) -Plan: [plan.md](/docs/plan.md) -> All above is in Chinese. - -# Lincense -© [Eltrac](https://github.com/BigCoke233/) | Under MIT License. +![](/banner.jpg) +![](https://img.shields.io/badge/build-passing-brightgreen.svg?style=flat-square) +![](https://img.shields.io/badge/made%20with-%E2%9D%A4-ff69b4.svg?style=flat-square) +![](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square) +![](https://img.shields.io/badge/for-Typecho-blueviolet.svg?style=flat-square) +![](https://img.shields.io/badge/version-1.2.1-red.svg?style=flat-square) +> 🙌 Born to be the Miracles. + +Language: [简体中文](/README.md) | English + +**Notice: This theme is only for [Typecho](https://github.com/typecho/typecho).** +# Feature +- Responsive Web design +- Pjax +- LazyLoad +- Code Highlight by Prism.js +- Change font-family and font-size when viewing pages +- Use emotional pictures in comments +- Live2d +- A nice dark theme +- Two interesting filters +- Two kinds of Nav +- Custom excerpt when posting +- Twenty random banner for articles +- ~~Lightweight (4MB)~~ + +# Usage +- Star, please! +- Download the latest release. +- Change the name of the folder into `Miracles` +- Put it into `usr/themes` +- Start using after reading the [wiki](https://github.com/BigCoke233/miracles/wiki) +> Sorry, there's no English edition of the wiki now. Maybe you can help me. + +# Thanks! +- [jQuery](https://github.com/jquery/jquery) +- [FancyBox](https://github.com/fancyapps/fancybox) +- [Prism.js](https://github.com/PrismJS/prism) +- [Nprogress](https://github.com/rstacruz/nprogress) +- [OwO](https://github.com/DIYgod/OwO) +- [Pjax](https://github.com/defunkt/jquery-pjax) +- [LazyLoad](https://github.com/tuupola/lazyload) +- [Pangu.js](https://github.com/vinta/pangu.js) + +[@ohmyga233](https://github.com/ohmyga233) | +[@AlanDecode](https://github.com/AlanDecode) | +[@gfwyuexia](https://github.com/gfwyuexia) | +[@jrotty](https://github.com/jrotty) + +# Links +Demo: [My Blog](https://guhub.cn) +Introduction: [Miracles —— 生为奇迹](https://guhub.cn/p/miracles.html) +Change-log: [change-log.md](/docs/change-log.md) +Plan: [plan.md](/docs/plan.md) +> All above is in Chinese. + +# Lincense +© [Eltrac](https://github.com/BigCoke233/) | Under MIT License. -- cgit v1.2.3 From 467366b3788943eefbbd0c18fabbe23ac5692376 Mon Sep 17 00:00:00 2001 From: outtime Date: Thu, 19 Dec 2019 13:48:42 +0800 Subject: =?UTF-8?q?=F0=9F=8D=ADAdd=EF=BC=9A=E6=B7=BB=E5=8A=A0=E8=B9=A6?= =?UTF-8?q?=E8=B7=B6=E7=9A=84=E9=A2=9C=E6=96=87=E5=AD=97=E4=B8=8E=E5=BB=BA?= =?UTF-8?q?=E7=AB=99=E6=97=B6=E9=97=B4=E9=A1=B9=EF=BC=8C=E5=90=8C=E6=97=B6?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BA=86=E9=83=A8=E5=88=86=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/css/main/special.css | 249 ++++++++++++++++++++++++++++++++++++++++++++ assets/js/miracles.min.js | 28 +++++ functions.php | 14 +++ includes/footer.php | 46 ++++---- includes/head.php | 17 +-- libs/Options.php | 13 ++- 6 files changed, 325 insertions(+), 42 deletions(-) diff --git a/assets/css/main/special.css b/assets/css/main/special.css index 6b3c342..1ae2867 100644 --- a/assets/css/main/special.css +++ b/assets/css/main/special.css @@ -243,4 +243,253 @@ iframe[src*="//player.bilibili.com/player.html"] { } .fadein { opacity: 1; +} +/*底部动画字符*/ +.anime-face { + animation: anime-face 5s infinite ease-in-out; + display: inline-block; + margin: 0 5px; +} +@-webkit-keyframes anime-face { + 2%,24%,80% { + -webkit-transform: translate(0,1.5px) rotate(1.5deg); + transform: translate(0,1.5px) rotate(1.5deg) + } + + 4%,68%,98% { + -webkit-transform: translate(0,-1.5px) rotate(-.5deg); + transform: translate(0,-1.5px) rotate(-.5deg) + } + + 38%,6% { + -webkit-transform: translate(0,1.5px) rotate(-1.5deg); + transform: translate(0,1.5px) rotate(-1.5deg) + } + + 8%,86% { + -webkit-transform: translate(0,-1.5px) rotate(-1.5deg); + transform: translate(0,-1.5px) rotate(-1.5deg) + } + + 10%,72% { + -webkit-transform: translate(0,2.5px) rotate(1.5deg); + transform: translate(0,2.5px) rotate(1.5deg) + } + + 12%,64%,78%,96% { + -webkit-transform: translate(0,-.5px) rotate(1.5deg); + transform: translate(0,-.5px) rotate(1.5deg) + } + + 14%,54% { + -webkit-transform: translate(0,-1.5px) rotate(1.5deg); + transform: translate(0,-1.5px) rotate(1.5deg) + } + + 16% { + -webkit-transform: translate(0,-.5px) rotate(-1.5deg); + transform: translate(0,-.5px) rotate(-1.5deg) + } + + 18%,22% { + -webkit-transform: translate(0,.5px) rotate(-1.5deg); + transform: translate(0,.5px) rotate(-1.5deg) + } + + 20%,36%,46% { + -webkit-transform: translate(0,-1.5px) rotate(2.5deg); + transform: translate(0,-1.5px) rotate(2.5deg) + } + + 26%,50% { + -webkit-transform: translate(0,.5px) rotate(.5deg); + transform: translate(0,.5px) rotate(.5deg) + } + + 28% { + -webkit-transform: translate(0,.5px) rotate(1.5deg); + transform: translate(0,.5px) rotate(1.5deg) + } + + 30%,40%,62%,76%,88% { + -webkit-transform: translate(0,-.5px) rotate(2.5deg); + transform: translate(0,-.5px) rotate(2.5deg) + } + + 32%,34%,66% { + -webkit-transform: translate(0,1.5px) rotate(-.5deg); + transform: translate(0,1.5px) rotate(-.5deg) + } + + 42% { + -webkit-transform: translate(0,2.5px) rotate(-1.5deg); + transform: translate(0,2.5px) rotate(-1.5deg) + } + + 44%,70% { + -webkit-transform: translate(0,1.5px) rotate(.5deg); + transform: translate(0,1.5px) rotate(.5deg) + } + + 48%,74%,82% { + -webkit-transform: translate(0,-.5px) rotate(.5deg); + transform: translate(0,-.5px) rotate(.5deg) + } + + 52%,56%,60% { + -webkit-transform: translate(0,2.5px) rotate(2.5deg); + transform: translate(0,2.5px) rotate(2.5deg) + } + + 58% { + -webkit-transform: translate(0,.5px) rotate(2.5deg); + transform: translate(0,.5px) rotate(2.5deg) + } + + 84% { + -webkit-transform: translate(0,1.5px) rotate(2.5deg); + transform: translate(0,1.5px) rotate(2.5deg) + } + + 90% { + -webkit-transform: translate(0,2.5px) rotate(-.5deg); + transform: translate(0,2.5px) rotate(-.5deg) + } + + 92% { + -webkit-transform: translate(0,.5px) rotate(-.5deg); + transform: translate(0,.5px) rotate(-.5deg) + } + + 94% { + -webkit-transform: translate(0,2.5px) rotate(.5deg); + transform: translate(0,2.5px) rotate(.5deg) + } + + 0%,100% { + -webkit-transform: translate(0,0) rotate(0); + transform: translate(0,0) rotate(0) + } +} + +@keyframes anime-face { + 2%,24%,80% { + -webkit-transform: translate(0,1.5px) rotate(1.5deg); + transform: translate(0,1.5px) rotate(1.5deg) + } + + 4%,68%,98% { + -webkit-transform: translate(0,-1.5px) rotate(-.5deg); + transform: translate(0,-1.5px) rotate(-.5deg) + } + + 38%,6% { + -webkit-transform: translate(0,1.5px) rotate(-1.5deg); + transform: translate(0,1.5px) rotate(-1.5deg) + } + + 8%,86% { + -webkit-transform: translate(0,-1.5px) rotate(-1.5deg); + transform: translate(0,-1.5px) rotate(-1.5deg) + } + + 10%,72% { + -webkit-transform: translate(0,2.5px) rotate(1.5deg); + transform: translate(0,2.5px) rotate(1.5deg) + } + + 12%,64%,78%,96% { + -webkit-transform: translate(0,-.5px) rotate(1.5deg); + transform: translate(0,-.5px) rotate(1.5deg) + } + + 14%,54% { + -webkit-transform: translate(0,-1.5px) rotate(1.5deg); + transform: translate(0,-1.5px) rotate(1.5deg) + } + + 16% { + -webkit-transform: translate(0,-.5px) rotate(-1.5deg); + transform: translate(0,-.5px) rotate(-1.5deg) + } + + 18%,22% { + -webkit-transform: translate(0,.5px) rotate(-1.5deg); + transform: translate(0,.5px) rotate(-1.5deg) + } + + 20%,36%,46% { + -webkit-transform: translate(0,-1.5px) rotate(2.5deg); + transform: translate(0,-1.5px) rotate(2.5deg) + } + + 26%,50% { + -webkit-transform: translate(0,.5px) rotate(.5deg); + transform: translate(0,.5px) rotate(.5deg) + } + + 28% { + -webkit-transform: translate(0,.5px) rotate(1.5deg); + transform: translate(0,.5px) rotate(1.5deg) + } + + 30%,40%,62%,76%,88% { + -webkit-transform: translate(0,-.5px) rotate(2.5deg); + transform: translate(0,-.5px) rotate(2.5deg) + } + + 32%,34%,66% { + -webkit-transform: translate(0,1.5px) rotate(-.5deg); + transform: translate(0,1.5px) rotate(-.5deg) + } + + 42% { + -webkit-transform: translate(0,2.5px) rotate(-1.5deg); + transform: translate(0,2.5px) rotate(-1.5deg) + } + + 44%,70% { + -webkit-transform: translate(0,1.5px) rotate(.5deg); + transform: translate(0,1.5px) rotate(.5deg) + } + + 48%,74%,82% { + -webkit-transform: translate(0,-.5px) rotate(.5deg); + transform: translate(0,-.5px) rotate(.5deg) + } + + 52%,56%,60% { + -webkit-transform: translate(0,2.5px) rotate(2.5deg); + transform: translate(0,2.5px) rotate(2.5deg) + } + + 58% { + -webkit-transform: translate(0,.5px) rotate(2.5deg); + transform: translate(0,.5px) rotate(2.5deg) + } + + 84% { + -webkit-transform: translate(0,1.5px) rotate(2.5deg); + transform: translate(0,1.5px) rotate(2.5deg) + } + + 90% { + -webkit-transform: translate(0,2.5px) rotate(-.5deg); + transform: translate(0,2.5px) rotate(-.5deg) + } + + 92% { + -webkit-transform: translate(0,.5px) rotate(-.5deg); + transform: translate(0,.5px) rotate(-.5deg) + } + + 94% { + -webkit-transform: translate(0,2.5px) rotate(.5deg); + transform: translate(0,2.5px) rotate(.5deg) + } + + 0%,100% { + -webkit-transform: translate(0,0) rotate(0); + transform: translate(0,0) rotate(0) + } } \ No newline at end of file diff --git a/assets/js/miracles.min.js b/assets/js/miracles.min.js index 567b192..b1488eb 100644 --- a/assets/js/miracles.min.js +++ b/assets/js/miracles.min.js @@ -468,6 +468,34 @@ function getWordsNum() { time = Math.ceil(sLen / 450); idGetEl("readTip").innerHTML = "本文约 " + sLen + "字 阅读大概需要 " + time + " 分钟"; } +/** + * Build Time Echo + */ +function startTime(time = '2010-01-01') { + startTimeV = time; + var $time = new Date().getTime() - new Date(startTimeV); + if ($time < 0) return '0秒'; + let result = ''; + if ($time >= 365 * 86400000) { + result += parseInt($time / (365 * 86400000)) + ' 年 '; + $time = ($time % (365 * 86400000)); + } + if ($time >= 86400000) { + result += parseInt($time / 86400000) + ' 天 '; + $time = ($time % 86400000); + } + if ($time >= 3600000) { + result += parseInt($time / 3600000) + ' 小时 '; + $time = ($time % 3600000); + } + if ($time >= 60000) { + result += parseInt($time / 60000) + ' 分 '; + $time = ($time % 60000); + } + result += parseInt($time / 1000) + ' 秒 '; + $('#build-time').html(result); + buildTimeout = setTimeout('startTime(startTimeV)', 1000) +} /** * Copyright */ diff --git a/functions.php b/functions.php index 9490c0d..85b0afc 100644 --- a/functions.php +++ b/functions.php @@ -75,3 +75,17 @@ array_push($views, $cid); } echo $row['views']; } +/** + * 自动生成引用 + */ +function generate_require($files,$type,$cdn = NULL) { + if ($cdn) + $path = $cdn.themeVersion()."/"; + else $path = Helper::options()->themeUrl("","Miracles"); + foreach ($files as $file) { + if ($type == "js") + echo ""; + elseif ($type == "css") + echo ""; + } +} \ No newline at end of file diff --git a/includes/footer.php b/includes/footer.php index 66d4702..6b9b26e 100644 --- a/includes/footer.php +++ b/includes/footer.php @@ -3,9 +3,16 @@
@@ -13,35 +20,22 @@
- options->CDN && $this->options->CDN=1): ?> - - - - - - - - - - options->cat!=0 || $this->options->customModel!=''): ?> - - - - - - - - - - - + options->CDN?"https://cdn.jsdelivr.net/gh/BigCoke233/miracles@":""); + ?> - - - + + diff --git a/includes/head.php b/includes/head.php index cf25c22..03f982c 100644 --- a/includes/head.php +++ b/includes/head.php @@ -38,19 +38,10 @@ header('description=&'); ?> options->headerEcho(); ?> - options->CDN && $this->options->CDN=1): ?> - - - - - - - - - - - - + options->CDN?"https://cdn.jsdelivr.net/gh/BigCoke233/miracles@":""); + ?> diff --git a/libs/Options.php b/libs/Options.php index a94d509..cc305df 100644 --- a/libs/Options.php +++ b/libs/Options.php @@ -127,11 +127,18 @@ function themeConfig($form) { ]; $LoadingImage = new Typecho_Widget_Helper_Form_Element_Radio('loading_image', $LoadingOptions, 'block', _t('选择图片加载动画'),_t("
")); $form->addInput($LoadingImage); - + + //SiteBuildTime + $buildTime = new Typecho_Widget_Helper_Form_Element_Text('build_time', NULL, NULL, _t('在页脚输出建站至今时间'), _t('填写格式如2020-01-01的时间,将输出在站点信息之前,不想开启请留空。')); + $form->addInput($buildTime); + //AnimeFace + $AnimeFace = new Typecho_Widget_Helper_Form_Element_Text('anime_face', NULL, NULL, _t('在其之后输出一个蹦跶的颜文字'), _t('如果开启了建站时间将会输出在其之后,反之会输出在站点信息之后。在此写上你想展示的颜文字,多个颜文字用"&&"分割,每次刷新更换。如不想开启请留空。')); + $form->addInput($AnimeFace); + //developer - $headerEcho = new Typecho_Widget_Helper_Form_Element_Textarea('headerEcho', NULL, NULL, _t('

开发者设置

自定义头部信息'), _t('填写 html 代码,将输出在 <head> 标签中')); + $headerEcho = new Typecho_Widget_Helper_Form_Element_Textarea('headerEcho', NULL, NULL, _t('

开发者设置

自定义头部信息'), _t('填写 html 代码,将输出在 <head> 标签中,可以在这里写上统计代码')); $form->addInput($headerEcho); - $footerEcho = new Typecho_Widget_Helper_Form_Element_Textarea('footerEcho', NULL, NULL, _t('自定义页脚部信息'), _t('填写 html 代码,将输出在页脚的版权信息后')); + $footerEcho = new Typecho_Widget_Helper_Form_Element_Textarea('footerEcho', NULL, NULL, _t('自定义页脚部信息'), _t('填写 html 代码,将输出在页脚的版权信息之前')); $form->addInput($footerEcho); $cssEcho = new Typecho_Widget_Helper_Form_Element_Textarea('cssEcho', NULL, NULL, _t('自定义 CSS'), _t('填写 CSS 代码,输出在 head 标签结束之前的 style 标签内')); $form->addInput($cssEcho); -- cgit v1.2.3 From 10a300457816273792bf5df22bfb1a907650a956 Mon Sep 17 00:00:00 2001 From: outtime Date: Thu, 19 Dec 2019 13:52:20 +0800 Subject: =?UTF-8?q?=F0=9F=8E=ADAdd=EF=BC=9A=E6=B7=BB=E5=8A=A0QQ=E5=88=86?= =?UTF-8?q?=E4=BA=AB=E9=A1=B5=E9=9D=A2=E6=97=B6=E7=9A=84=E6=A0=87=E9=A2=98?= =?UTF-8?q?=E4=B8=8E=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- includes/head.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/includes/head.php b/includes/head.php index 03f982c..1876285 100644 --- a/includes/head.php +++ b/includes/head.php @@ -20,6 +20,8 @@ } ?> <?php Contents::title($this); ?> + + -- cgit v1.2.3 From ac788031c593bd89e283e24b00d2331927a1cc88 Mon Sep 17 00:00:00 2001 From: outtime Date: Thu, 19 Dec 2019 14:00:44 +0800 Subject: =?UTF-8?q?=F0=9F=94=A7Fix=EF=BC=9A=E4=BF=AE=E6=AD=A3=E6=9C=89?= =?UTF-8?q?=E5=85=B3=E8=B9=A6=E8=B7=B6=E9=A2=9C=E6=96=87=E5=AD=97=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- includes/footer.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/footer.php b/includes/footer.php index 6b9b26e..754d25d 100644 --- a/includes/footer.php +++ b/includes/footer.php @@ -5,7 +5,10 @@