Skip to content

Commit

Permalink
Chapter I
Browse files Browse the repository at this point in the history
学习快乐
  • Loading branch information
txperl committed Aug 25, 2017
1 parent ff82213 commit ab7aca4
Show file tree
Hide file tree
Showing 11 changed files with 126 additions and 95 deletions.
7 changes: 3 additions & 4 deletions MoriGarden/config.php
@@ -1,15 +1,14 @@
<?php
$GLOBALS['api_url'] = 'http://what.airs.im/lea/'; //测试开发中,请勿改变此地址
$GLOBALS['api_url'] = 'http://what.airs.im/lea/'; //开发测试中,请勿更改此地址
$GLOBALS['twitter'] = ''; //twitter screen_name | 如 txperl | 留空表示不开启
$GLOBALS['bangumi'] = ''; //bangumi user | 如 228091 | 留空表示不开启
$GLOBALS['weibo'] = ''; //weibo screen_name | 如 Multiverse_h | 留空表示不开启

//说明
//MoriGarden是基于Thatsi的一个简单例子
//目前包含如下内容:
//twitter: 以时间轴顺序,获取对应id(是@后面的名称)的公开推文(墙内也可使用)
//bangumi: 以时间轴顺序,获取对应id(是@后面的名称)的在看番剧 (这个应该只有二次元迷会用得到吧,我反正是用了...)
//weibo: 以时间轴顺序,获取对应id的公开微博
//bangumi: 以时间轴顺序,获取对应id(是@后面的名称)的在看番剧(这个应该只有二次元迷会用得到吧,我反正是用了...)
//weibo: 未开放
//instagram: none
//P.s. 因为测试阶段默认使用我个人注册的API TOKEN,所以请勿随意或恶意提交
?>
19 changes: 0 additions & 19 deletions MoriGarden/getThatsi.php
Expand Up @@ -17,25 +17,6 @@
echo '<center><div class="tarc-t"><div class="tarc-tile">'.$text.'</div></div></center>';
}
}
//weibo
if ($GLOBALS['weibo']!='') {
$weib = $data[2];
$weib = json_decode($weib, true);
$weib = $weib['statuses'];
$num = count($weib);

echo '<h5 style="font-weight:normal;margin-bottom:20px;margin-top:30px;pmargin-left:-10px;">Weibo</h5>';
for ($i=0; $i < $num; $i++) {
$text=$weib[$i]['text'];
$time=$weib[$i]['created_at'];
if ($text=='转发微博') {
$text=$weib[$i]['retweeted_status']['text'];
$time=$weib[$i]['retweeted_status']['created_at'];
}

echo '<center><div class="tarc-t"><div class="tarc-tile" style="text-align:left;">'.$text.'</div></div></center>';
}
}
//bangumi
if ($GLOBALS['bangumi']!='') {
$bgm = $data[1];
Expand Down
93 changes: 45 additions & 48 deletions README.md
Expand Up @@ -3,17 +3,17 @@

如同她的名字一样,给人以一种自然、恬静的文字阅读体验。

> 你现在看到的只是此版本的提前预览版本,还有很多需要完善的地方。
> Moricolor Chapter I 现已发布
>
> 原先预计发布的 WordPress 版本因时间因素取消惹...
> 欢迎体验使用
----------


### Moricolor Chapter I

#### 预览图
[Home1](https://dn-loliamp.qbox.me/image/blog/FireShot%20Capture%208%20-%20%E6%A3%AE%E3%81%AE%E8%89%B2%20-%20https___yumoe.com_.png) & [Home2](https://dn-loliamp.qbox.me/image/blog/FireShot%20Capture%207%20-%20%E6%A3%AE%E3%81%AE%E8%89%B2%20-%20https___yumoe.com_.png) & [Post](https://dn-loliamp.qbox.me/image/blog/FireShot%20Capture%209%20-%20Typecho%20Theme%20Moricolor%20-%20%E6%A3%AE%E4%B9%8B%E8%89%B2%20-%20%E6%A3%AE%E3%81%AE%E8%89%B2%20-%20https___yumoe.com_archives_moricolor.html%20%281%29.png)
[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)

#### 细节

Expand All @@ -25,35 +25,36 @@

> **'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['style_TextBar'] = '1'; //文章页头部信息 | 1:功能按钮及分享按钮 (文章目录导航仅支持 h3,h4 层级) 0:纯文本
>$GLOBALS['style_TextIndent'] = 'on'; //首行缩进
>$GLOBALS['style_CommentShow'] = 'off'; //默认显示评论
>$GLOBALS['style_Color'] = 'normal'; //全局配色设定 | 下个版本开放
>
>//前方有怪兽!
>$GLOBALS['beta_MoriGarden'] = 'off'; //开启后请自行修改 ./MoriGarden/config.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]**
Expand All @@ -62,7 +63,6 @@
> 目前包含如下内容:
> twitter: 以时间轴顺序,获取对应id(是@后面的名称)的公开推文(墙内也可使用)
> bangumi: 以时间轴顺序,获取对应id(是@后面的名称)的在看番剧 (这个应该只有二次元迷会用得到吧,我反正是用了...)
> weibo: 以时间轴顺序,获取对应id的公开微博
> P.s. 因为测试阶段默认使用我个人注册的API TOKEN,所以请勿随意或恶意提交
> **本主题包含一套 Material Design 图标**
Expand Down Expand Up @@ -118,40 +118,37 @@
- [Prism.js][10]

#### 更新日志
##### beta5

##### Chapter I

- 新增 归档页面折叠显示
- 新增 figure,figcaption标签样式
- 新增 文章页头部图片(封面图片) | 使用方式: <!-- img_quick:img_url; -->
- 微调 移动端布局
- 取消 MoriGarden Weibo 解析
- 取消 首页分页反转
- **[beta5]**
- 新增 文章页头部样式设置
- 新增 webkit自定义滚动条
- 微调 部分样式(归档页面tag,主页小工具排版,文章排版与字体大小)
- 微调 其他细节

###### beta4

- **[beta4]**
- 全新 文章页面头部样式
- 新增 TextBar
- 新增 文章目录导航(仅支持 h3,h4 层级)
- 优化 评论层级样式

###### beta3

- **[beta3]**
- 测试 Moricolor后花园_基于Thatsi
- 新增 默认显示评论设置
- 新增 自定义Pages导航设置(换页导航中间的三条杠杠)
- 修复 插件无法显示BUG

###### beta2

- **[beta2]**
- 全新 归档页面设计
- 新增 段落缩进设置
- 新增 标签云(归档页面中)
- 新增 小工具_Tag,Page
- 更改 主页月份显示方式(3个字母简写)
- 修复 评论作者信息编辑BUG

###### beta1

- All

#### 写在最后

本程序源代码可任意修改并任意使用,但禁止商业化用途。一旦使用,任何不可知事件都与原作者无关,原作者不承担任何后果。
Expand Down
6 changes: 3 additions & 3 deletions config.php
Expand Up @@ -19,13 +19,13 @@

//主页
$GLOBALS['index_QuickPreview'] = '1'; //每页默认显示 X 个快速预览
$GLOBALS['index_PagingReversal'] = 'off'; //主页分页反转 &关闭: 第三页:< (第二页) >:第一页 &开启后: 第一页:< (第二页) >:第三页
$GLOBALS['index_QuickPreview_Img'] = 'off'; //文章预览是否显示图片

//样式
$GLOBALS['style_TextBar'] = '1'; //文章页头部信息 | 1:功能按钮及分享按钮 (文章目录导航仅支持 h3,h4 层级) 0:纯文本
$GLOBALS['style_TextBar'] = '1'; //文章页头部信息 | 1:功能按钮及分享按钮(文章目录导航仅支持 h3,h4 层级) | 0:纯文本
$GLOBALS['style_TextIndent'] = 'off'; //首行缩进
$GLOBALS['style_CommentShow'] = 'off'; //默认显示评论
$GLOBALS['style_Color'] = 'normal'; //全局配色设定 | 下个版本开放
$GLOBALS['style_Color'] = 'normal'; //全局配色设定 | 下个版本开放 | 有生之年...

//前方有怪兽!
$GLOBALS['beta_MoriGarden'] = 'off'; //开启后请自行修改 ./MoriGarden/config.php 配置,否则会出事情的!
Expand Down
42 changes: 41 additions & 1 deletion css/mori.css
Expand Up @@ -62,16 +62,47 @@ html::-webkit-scrollbar-thumb:hover{background-color:#ddd;}
.text-bar a:hover,.text-bar a:visited,.text-bar a:focus {
color: #34495e;
}
.cover-image {
background-size: cover;
background-repeat: no-repeat;
background-position: center;
margin-bottom: 3em;
height: 50vw;
width: 100vw;
position: relative;
left: 50%;
-webkit-transform: translateX(-50%);
-moz-transform: translateX(-50%);
-ms-transform: translateX(-50%);
-o-transform: translateX(-50%);
max-width: 100vw;
}
@media (min-width: 768px){
.cover-image {
height: 40vw;
max-height: 400px;
}
}
.post-content p,.post-content li {
font-size: 16px;
letter-spacing: .6px;
text-align: justify;
}
.post-content figcaption {
text-align: center;
color: #999;
font-style: italic;
font-size: 15px;
margin-top: 10px;
margin-bottom: 15px;
font-weight: 300;
}
.post-content h3 {
font-size: 37px;
margin-left: -1px;
}
.post-content h4 {
font-size: 26px;
font-size: 23px;
color:#78909c;
font-weight: 400;
margin-top: 30px;
Expand All @@ -84,11 +115,13 @@ html::-webkit-scrollbar-thumb:hover{background-color:#ddd;}
margin-top: 30px;
margin-bottom: 20px;
margin-left: -3px;
font-size: 24px;
}
.post-content h6{
color:#78909c;
font-weight: normal;
font-size: 23px;
font-weight: 300;
margin-left: -2px;
}
.post-content h4::before{
Expand Down Expand Up @@ -249,6 +282,9 @@ html::-webkit-scrollbar-thumb:hover{background-color:#ddd;}
.post-info a::before {
content: '# ';
}
.post-info .post-info-n a::before {
content: '';
}
/* --- */
.arc-t {
width:33.3%;
Expand Down Expand Up @@ -301,6 +337,10 @@ html::-webkit-scrollbar-thumb:hover{background-color:#ddd;}
.comment_reply {
display: block !important;
}
.post-content ul,.post-list,.tags-list {
margin-left: -1em;
margin-right: 1em;
}
}
.tarc-t {
width:90%;
Expand Down
10 changes: 8 additions & 2 deletions functions.php
@@ -1,6 +1,6 @@
<?php
ini_set("error_reporting","E_ALL & ~E_NOTICE");
function img_postthumb($cid) {
function img_postthumb($cid,$type=0) {
$db = Typecho_Db::get();
$rs = $db->fetchRow($db->select('table.contents.text')
->from('table.contents')
Expand All @@ -18,7 +18,13 @@ function img_postthumb($cid) {
break;

case $allPics = 1:
echo '<img src="'.$img_src.'" class="img-rounded img-responsive" style="box-shadow: 0 2px 15px 1px rgba(0,0,0,0.1);">'; //当找到一个src地址的时候,输出缩略图
if ($type==0) {
echo '<img src="'.$img_src.'" class="img-rounded img-responsive" style="box-shadow: 0 2px 15px 1px rgba(0,0,0,0.1);">';
} elseif($type==1) {
echo '<div class="cover-image" style="background-image: url(\''.$img_src.'\');"></div>';
}elseif($type==2){
echo '';
}//当找到一个src地址的时候,输出缩略图
break;

default:
Expand Down
4 changes: 3 additions & 1 deletion header.php
Expand Up @@ -8,6 +8,7 @@
echo '</style>';
echo "\n";
}
$index_img=$GLOBALS['index_Image'];
?>
<head>
<meta charset="utf-8">
Expand Down Expand Up @@ -45,5 +46,6 @@
<p class="description"><?php $this->options->description() ?></p>
<hr>
</div>
<?php endif; ?>
<?php endif; ?>

</header>
24 changes: 10 additions & 14 deletions index.php
Expand Up @@ -5,13 +5,13 @@
* 本项目属于 ProjectNatureSimple
* @package Moricolor
* @author Trii Hsia
* @version Chapter I beta5
* @version Chapter I
* @link https://yumoe.com/
*/

if (!defined('__TYPECHO_ROOT_DIR__')) exit;
$this->need('header.php');
$i=0;
$this->need('header.php');
$i=0;
?>

<div id="main" class="container">
Expand Down Expand Up @@ -39,7 +39,13 @@
</dt>
<dd><a itemtype="url" href="<?php $this->permalink() ?>"><?php $this->title() ?></a></span></dd>
<dd class="<?php echo $collapse ?>" id="<?php echo $i ?>">
<?php echo img_postthumb($this->cid); ?>
<?php
if ($GLOBALS['index_QuickPreview_Img']=='on') {
img_postthumb($this->cid);
} else {
img_postthumb($this->cid,2);
}
?>
<small><?php $this->excerpt(200,' ······'); ?></small>
</dd>
</dl>
Expand All @@ -51,13 +57,8 @@
<ul class="pager">
<li class="previous">
<?php
if ($GLOBALS['index_PagingReversal']=='on') {
$this->pageLink('<span><i class="fui-arrow-left"></i></span>');
if($this->is('index') && $this->_currentPage == 1){echo '<a title="没有惹" data-toggle="tooltip"><span><i class="fui-arrow-left"></i></span></a>';}
} else {
$this->pageLink('<span><i class="fui-arrow-left"></i></span>','next');
if($this->is('index') && $this->_currentPage == $totalpages){echo '<a title="没有惹" data-toggle="tooltip"><span><i class="fui-arrow-left"></i></span></a>';}
}
?>
</li>

Expand Down Expand Up @@ -87,13 +88,8 @@

<li class="next">
<?php
if ($GLOBALS['index_PagingReversal']=='on') {
$this->pageLink('<span><i class="fui-arrow-right"></i></span>','next');
if($this->is('index') && $this->_currentPage == $totalpages){echo '<a title="没有惹" data-toggle="tooltip"><span><i class="fui-arrow-right"></i></span></a>';}
} else {
$this->pageLink('<span><i class="fui-arrow-right"></i></span>');
if($this->is('index') && $this->_currentPage == 1){echo '<a title="没有惹" data-toggle="tooltip"><span><i class="fui-arrow-right"></i></span></a>';}
}
?>
</li>
</ul>
Expand Down

0 comments on commit ab7aca4

Please sign in to comment.