Skip to content

Commit

Permalink
Change Something
Browse files Browse the repository at this point in the history
增加了一些似乎用不到但又可以用到的样式更新,并且优化了更多细节
  • Loading branch information
txperl committed Dec 17, 2017
1 parent f7b8495 commit 6752968
Show file tree
Hide file tree
Showing 9 changed files with 225 additions and 121 deletions.
4 changes: 2 additions & 2 deletions MoriGarden/config.php
@@ -1,7 +1,7 @@
<?php
$GLOBALS['api_url'] = 'http://mori.cafe/what/lea/'; //开发测试中,请勿更改此地址!
$GLOBALS['twitter'] = ''; //twitter screen_name | 如 txperl | 留空表示不开启
$GLOBALS['bangumi'] = ''; //bangumi user | 如 228091 | 留空表示不开启
$GLOBALS['twitter'] = 'txperl'; //twitter screen_name | 如 txperl | 留空表示不开启
$GLOBALS['bangumi'] = '228091'; //bangumi user | 如 228091 | 留空表示不开启

//说明
//MoriGarden是基于Thatsi的一个简单例子
Expand Down
196 changes: 112 additions & 84 deletions README.md
Expand Up @@ -7,13 +7,15 @@
>
> 欢迎体验使用
***Demo***: [Yumoe][1]

----------


### Moricolor Chapter I

#### 预览图
[Home1](https://dn-loliamp.qbox.me/1.png) & [Home2](https://dn-loliamp.qbox.me/2.png) & [Home3](https://dn-loliamp.qbox.me/4.png) & [Post](https://dn-loliamp.qbox.me/3.png)
[主页1](https://dn-loliamp.qbox.me/1.png) & [主页背景图](https://dn-loliamp.qbox.me/M11.png) & [MoriGarden](https://dn-loliamp.qbox.me/4.png) & [文章1](https://dn-loliamp.qbox.me/3.png) & [文章2](https://dn-loliamp.qbox.me/M21.png)

#### 细节

Expand All @@ -23,87 +25,102 @@

#### 一些食用方法

> **'config.php' 为主题全局配置文件**
> ``` php
> // 'on' 为开启
> // 'off'或留空 为关闭
>
> //Pages -换页导航中间的三条杠!
> $GLOBALS['tools_Pages_if'] = 'off'; //是否开启自定义链接
> $GLOBALS['tools_Pages'] = array(
> '{your_title}' => '{your_url}',
> 'Moricolor' => 'https://github.com/txperl/Moricolor-for-Typecho'
> );
>
> //底部小工具
> $GLOBALS['bottomTools'] = 'on'; //总
> $GLOBALS['bottomTools_hitokoto'] = 'on'; //一言
> $GLOBALS['bottomTools_category'] = 'on'; //分类
> $GLOBALS['bottomTools_tag'] = 'off'; //标签
> $GLOBALS['bottomTools_page'] = 'off'; //页面
> $GLOBALS['bottomTools_search'] = 'on'; //搜索
>
> //主页
> $GLOBALS['index_QuickPreview'] = '1'; //每页默认显示 X 个快速预览
> $GLOBALS['index_QuickPreview_Img'] = 'off'; //文章预览是否显示图片
>
> //样式
> $GLOBALS['style_TextBar'] = '1'; //文章页头部信息 | 1:功能按钮及分享按钮(文章目录导航仅支持 h3,h4 层级) | 0:纯文本
> $GLOBALS['style_TextIndent'] = 'off'; //首行缩进
> $GLOBALS['style_CommentShow'] = 'off'; //默认显示评论
> $GLOBALS['style_Color'] = 'normal'; //全局配色设定 | 下个版本开放 | 有生之年...
>
> //前方有怪兽!
> $GLOBALS['beta_MoriGarden'] = 'off'; //开启后请自行修改 ./MoriGarden/config.php 配置,否则会出事情的!
> ```
> **MoriGarden[Beta]**
> MoriGarden是基于Thatsi的一个简单例子
> 这个工具可将你的社交平台动态与博客同步,开启后位于主页底部
> 目前包含如下内容:
> twitter: 以时间轴顺序,获取对应id(是@后面的名称)的公开推文(墙内也可使用)
> bangumi: 以时间轴顺序,获取对应id(是@后面的名称)的在看番剧 (这个应该只有二次元迷会用得到吧,我反正是用了...)
> P.s. 因为测试阶段默认使用我个人注册的API TOKEN,所以请勿随意或恶意提交
> **本主题包含一套 Material Design 图标**
>
> 位于 './fonts/md'
>
> 详细情况请参考 [Material Design Iconic Font][2]
> **配色参考**
**'config.php' 为主题全局配置文件**
``` php
// 'on' 为开启
// 'off'或留空 为关闭

//Pages -换页导航中间的三条杠!
$GLOBALS['tools_Pages_if'] = 'off'; //是否开启自定义链接
$GLOBALS['tools_Pages'] = array(
'{your_title}' => '{your_url}',
'Moricolor' => 'https://github.com/txperl/Moricolor-for-Typecho'
);

//底部小工具
$GLOBALS['bottomTools'] = 'on'; //总
$GLOBALS['bottomTools_hitokoto'] = 'on'; //一言
$GLOBALS['bottomTools_category'] = 'on'; //分类
$GLOBALS['bottomTools_tag'] = 'off'; //标签
$GLOBALS['bottomTools_page'] = 'off'; //页面
$GLOBALS['bottomTools_search'] = 'on'; //搜索

//主页
$GLOBALS['index_QuickPreview'] = '1'; //每页默认显示 X 个快速预览
$GLOBALS['index_QuickPreview_Img'] = 'off'; //文章预览是否显示图片

//样式
$GLOBALS['style_TextBar'] = '1'; //文章页头部信息 | 1:功能按钮及分享按钮(文章目录导航仅支持 h3,h4 层级) | 0:纯文本
$GLOBALS['style_TextIndent'] = 'off'; //首行缩进
$GLOBALS['style_CommentShow'] = 'off'; //默认显示评论
$GLOBALS['style_BGPic'] = ''; //博客背景图设置(填入图片链接),留空为不开启
$GLOBALS['style_FontWeight'] = 'normal'; //字体粗细 | normal:默认 | lighter:细 | bolder:粗
//因有些背景图与原主题风格不同,你可以将'style_FontWeight'设置为 lighter 再更换一下配色,这样整体性会高一些

//配色 全局配色设定(请自行复制粘贴以下相应数组) | 初版,只包含小部分颜色调整(文章配色请自行在mori.css中更改)
//Mori(森) - array('Mori')
//H(类似黑) - array('','#546e7a','#90a4ae','#90a4ae')
//Q(应该青) - array('','#00838f','#00acc1','#00acc1')
//L(有点蓝) - array('#0277bd','#0288d1','#03a9f4','#90caf9')
//F(微微粉) - array('#f48fb1','#f48fb1','#f8bbd0','')
$GLOBALS['style_Color'] = array('Mori');
>
> - [Flat UI 设计规范配色][3]
> - [Material Design Color][4]
> **Zoom.js使用 [图片缩放]**
> ```html
> <img src="{img_url}" data-action="zoom" class="img-rounded img-responsive">
> ```
> **Prism.js使用 [代码高亮]**
> 只有部分语言适用,若想支持更多请去官网自行下载
> ```html
> <pre><code class="language-xxx">{your_code}</code></pre>
> ```
> &
> <pre><code class="language-html">
> ```{language}
> {your_code}
> ```
> </code></pre>
> **封面图设置**
> 在文章中加入
> ```html
> <!-- img_quick:img_url; -->
> ```
> 为了整体样式的美观性,建议 图片宽度 >= 980px
> **其他注意事项**
> 1.本主题引用了多个本地资源,若是访问速度明显下降,请自行将本地资源上传到CDN或使用其他解决方案
> 2.文章目录导航仅支持 h3,h4 层级
> 3.更多问题可以询问作者
//前方有怪兽!
$GLOBALS['beta_MoriGarden'] = 'off'; //开启后请自行修改 ./MoriGarden/config.php 配置,否则会出事情的!
```

**MoriGarden[Beta]**
MoriGarden是基于Thatsi的一个简单例子
这个工具可将你的社交平台动态与博客同步,开启后位于主页底部
目前包含如下内容:
twitter: 以时间轴顺序,获取对应id(是@后面的名称)的公开推文(墙内也可使用)
bangumi: 以时间轴顺序,获取对应id(是@后面的名称)的在看番剧 (这个应该只有二次元迷会用得到吧,我反正是用了...)
P.s. 因为测试阶段默认使用我个人注册的API TOKEN,所以请勿随意或恶意提交

**本主题包含一套 Material Design 图标**

位于 './fonts/md'

详细情况请参考 [Material Design Iconic Font][2]

**配色参考**

- [Flat UI 设计规范配色][3]
- [Material Design Color][4]

**Zoom.js使用 [图片缩放]**
```html
<img src="{img_url}" data-action="zoom" class="img-rounded img-responsive">
```

**Prism.js使用 [代码高亮]**
只有部分语言适用,若想支持更多请去官网自行下载
```html
<pre><code class="language-xxx">{your_code}</code></pre>
```
&
<pre><code class="language-html">
```{language}
{your_code}
```
</code></pre>

**封面图设置**
在文章中加入
```html
<!-- img_quick:img_url; -->
```
为了整体样式的美观性,建议 图片宽度 >= 980px

**配色与背景图与字体粗细相关**
目前配色只是一个初版,所以很不完善
关于背景图,设置一下淡灰风格的图片会显得不那么奇怪
字体粗细如果没有更改,但你添加了背景图,可以试着改成 lighter 或 bolder ,这样样式整体性会高一些

**其他注意事项**
1. 本主题引用了多个本地资源,若是访问速度明显下降,请自行将本地资源上传到CDN或使用其他解决方案
2. 文章目录导航仅支持 h3,h4 层级,并且手机端不会显示
3. 更多问题可以询问作者

----------

Expand All @@ -119,10 +136,21 @@

#### 更新日志
##### Chapter I

- **[v1.2]**
- 新增 博客背景图
- 新增 字体粗细选择(配合博客背景图一起使用效果更佳)
- 新增 评论分页样式(之前忘记写惹)
- 新增 非常少的配色选择
- 微调 `<h1>,<h2>,<h3>,<h4>,<h5>,<h6>,<a>,<li>,<blockquote>` 标签样式
- 优化 文章排版
- **[v1.1]**
- 新增 是否允许评论判断
- 更改 将字体源由 本地&七牛CDN 转至 Cloudflare
- 删除 多余本地文件
- **[v1.0]**
- 新增 归档页面折叠显示
- 新增 figure,figcaption标签样式
- 新增 文章页头部图片(封面图片) | 使用方式: <!-- img_quick:img_url; -->
- 新增 文章页头部图片(封面图片) | 使用方式: `<!-- img_quick:img_url; -->`
- 微调 移动端布局
- 取消 MoriGarden Weibo 解析
- 取消 首页分页反转
Expand Down Expand Up @@ -158,7 +186,7 @@
感谢。


[1]: https://github.com/txperl/Moricolor-for-Typecho
[1]: https://yumoe.com/
[2]: http://zavoloklom.github.io/material-design-iconic-font/index.html
[3]: http://www.bootcss.com/p/flat-ui/
[4]: https://www.materialpalette.com/colors
Expand Down
6 changes: 4 additions & 2 deletions comments.php
Expand Up @@ -70,7 +70,9 @@ function threadedComments($comments, $options) {
<hr>
<h6><?php $this->commentsNum(_t('暂无评论'), _t('仅有 1 条评论'), _t('已有 %d 条评论')); ?></h6>
<?php $comments->listComments(); ?>
<?php $comments->pageNav('&laquo;', '&raquo;'); ?>
<div style="text-align: center;margin-top: 20px;">
<?php $comments->pageNav('← Previous', 'Newer →', 1, '...', array('wrapTag' => 'ul', 'wrapClass' => 'pagination-plain', 'itemTag' => 'li', 'prevClass' => 'previous', 'nextClass' => 'next', 'currentClass' => 'active' )); ?>
</div>
<?php endif; ?>
<div id="<?php $this->respondId(); ?>" class="respond">
<div class="ccomment_reply">
Expand All @@ -83,7 +85,7 @@ function threadedComments($comments, $options) {
<p>已登入<a href="<?php $this->options->profileUrl(); ?>"><?php $this->user->screenName(); ?></a>. <a href="<?php $this->options->logoutUrl(); ?>" title="Logout">退出 &raquo;</a></p>
<?php else: ?>
<?php if($this->remember('author',true) != "" && $this->remember('mail',true) != "") : ?>
<span>欢迎 <?php $this->remember('author'); ?> 的到来 | <small style="cursor: pointer;" onclick="editinfo();"> 编辑资料</small></span>
<span>欢迎 <?php $this->remember('author'); ?> 的到来 | <small style="cursor: pointer;" onclick="editinfo();"> 编辑</small></span>
<div id ="ainfo" class="ainfo hinfo">
<?php else : ?>
<div class="ainfo">
Expand Down
12 changes: 11 additions & 1 deletion config.php
Expand Up @@ -25,7 +25,17 @@
$GLOBALS['style_TextBar'] = '1'; //文章页头部信息 | 1:功能按钮及分享按钮(文章目录导航仅支持 h3,h4 层级) | 0:纯文本
$GLOBALS['style_TextIndent'] = 'off'; //首行缩进
$GLOBALS['style_CommentShow'] = 'off'; //默认显示评论
$GLOBALS['style_Color'] = 'normal'; //全局配色设定 | 下个版本开放 | 有生之年...
$GLOBALS['style_BGPic'] = ''; //博客背景图设置(填入图片链接),留空为不开启
$GLOBALS['style_FontWeight'] = 'normal'; //字体粗细 | normal:默认 | lighter:细 | bolder:粗
//因有些背景图与原主题风格不同,你可以将'style_FontWeight'设置为 lighter 再更换一下配色,这样整体性会高一些

//配色 全局配色设定(请自行复制粘贴以下相应数组) | 初版,只包含小部分颜色调整(文章配色请自行在mori.css中更改)
//Mori(森) - array('Mori')
//H(类似黑) - array('','#546e7a','#90a4ae','#90a4ae')
//Q(应该青) - array('','#00838f','#00acc1','#00acc1')
//L(有点蓝) - array('#0277bd','#0288d1','#03a9f4','#90caf9')
//F(微微粉) - array('#f48fb1','#f48fb1','#f8bbd0','')
$GLOBALS['style_Color'] = array('Mori');

//前方有怪兽!
$GLOBALS['beta_MoriGarden'] = 'off'; //开启后请自行修改 ./MoriGarden/config.php 配置,否则会出事情的!
Expand Down

0 comments on commit 6752968

Please sign in to comment.