Skip to content
This repository has been archived by the owner on May 29, 2022. It is now read-only.

Commit

Permalink
pre: ver0.6 add a project information page. add and fix some bugs. up…
Browse files Browse the repository at this point in the history
…date readme.
  • Loading branch information
Innei committed Jun 12, 2019
1 parent d5498c2 commit 7337129
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 7 deletions.
23 changes: 18 additions & 5 deletions README.md
Expand Up @@ -26,7 +26,7 @@ You can also go to this url <https://paul.ren>, called Paul's Home ,to visit its

## Before Start

This is a theme for typecho, which suit to write diary and display your home page.
This is a theme for Typecho, which suit to write diary and display your home page.

This theme stems from <https://paul.ren>, this is not perfect now, probably had more bugs. Cause of them, on the one hand, because of the Typecho's limit.On the other hand, time is in a hurry.

Expand All @@ -52,7 +52,7 @@ recent blog articles parse according to RSS url which you fill out.

recent diaries will exhibit four items, every items output about 50 words.

works according to if it is exsits, and display them.
works according to if it is exists, and display them.

## Diary Page

Expand All @@ -64,7 +64,7 @@ diary page: you should create independent page, select the `日记页面` templa

works page: you should create independent page, select the `作品页面` template, slug must to fill `project`, and the content format should write like following.

```json
```json5
[{
"name": "project one", // name
"img": "", // img url, if none, will display default img
Expand All @@ -84,11 +84,24 @@ says page: you should create independent page, select the `语录页面` templat
生命的本质是苦难的。我不追求天赐荣华富贵,那会让我诚惶诚恐,消受不起,只是觉得,每天睁开眼睛发现自己还活着,没有缺胳膊少腿,还可以通过自己的努力和命运的黑色幽默较量搏斗,还可以勇敢的有尊严地与困难较量,这种感觉很踏实。———— 《愿你历经千帆,归来仍是少年》
```

## Copyright & Opensource
project information page: you can create a independent page which used `作品介绍页` template, this template will render page like <https://paul.ren/project/style>. And the format also used JSON.

```json5
{
"info": "示例介绍", // information
"project_img": "", // project image, if none, will used default image.
"url": "https://works.paugram.com/style", // url
"doc_url": "", // document url, if none, will not display it.
"imgs": ["https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3344978418,213176529&fm=27&gp=0.jpg","https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3689685426,1442582010&fm=27&gp=0.jpg"], // images
"body": "<p>Kico Style 是一个简洁的前端样式框架,只提供页面布局等基础功能。代码轻量、不冗余,适合前端初学者和探索者。</p>" // content body.
}
```

## Copyright & Open Source

Belong to @Dreamer-Paul. MIT Licence.

## Used Opensource
## Used Open Source

- fontawesome 4
- Kico Style
Expand Down
2 changes: 1 addition & 1 deletion page-note.php
Expand Up @@ -46,7 +46,7 @@
<?php $posts->content(); ?>
</div>
<div class="note-inform">
<span class="user"><?php $this->user->name(); ?></span>
<span class="user"><?php $posts->author(); ?></span>
<span class="views" title="阅读次数"><i class="fa fa-leaf"
aria-hidden="true"></i> <?php echo get_views_num($posts) ?></span>
</div>
Expand Down
36 changes: 36 additions & 0 deletions page-works_info.php
@@ -0,0 +1,36 @@
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php
/**
* 作品介绍页
*
* @author innei
* @package custom
*/
?>
<?php $this->need('header.php') ?>
<?php $parse = json_decode($this->text, true) ?>
<main>
<nav class="navigation">
<a href="javascript:window.history.back()" class="active">返回</a>
</nav>
<section class="page">
<section class="project-head">
<?php $parse['project_img']?print_r('<img src="'.$parse['project_img'].'" />'):print_r('<img src="'.$this->options->themeUrl.'/src/img/Kico.jpg"/>') ?>
<h1><?php $this->title() ?></h1>
<p><?php print_r($parse['info']) ?></p>
<p>
<?php $parse['url'] ? print_r('<a href="' . $parse['url'] . '" class="btn blue" target="_blank">预览站点</a>') : print_r('<button class="btn blue" disabled>此项目不提供预览</button>') ?>
<?php $parse['doc_url'] ? print_r('<a href="' . $parse['url'] . '" class="btn blue" target="_blank">文档站点</a>') : print_r('') ?>
</p>
</section>
<section class="project-screenshot">
<?php foreach ($parse['imgs'] as $key => $url):
print_r('<img src="' . $url . '"/>');
endforeach;
?>
</section>
<article>
<?php print_r($parse['body']) ?>
</section>
</main>
<?php $this->need('footer.php') ?>
3 changes: 2 additions & 1 deletion page.php
Expand Up @@ -30,11 +30,12 @@
<main class="is-article">
<nav class="navigation">
<a href="<?php $this->options->siteUrl(); ?>">首页</a>
<?php if ($index_about): ?><a href="<?php echo $index_about ?>" class="active">关于</a><?php endif ?>
<?php if ($index_about): ?><a href="<?php echo $index_about ?>">关于</a><?php endif ?>
<?php if ($index_donate): ?><a href="<?php echo $index_donate ?>">赞助</a> <?php endif; ?>
<?php if ($index_dream): ?><a href="<?php echo $index_dream ?>">心愿</a> <?php endif; ?>
</nav>
<article>
<h1><?php $this->title() ?></h1>
<?php $this->content() ?>
<div class="paul-note">
<div class="note-action">
Expand Down

0 comments on commit 7337129

Please sign in to comment.