Skip to content

Commit

Permalink
First Commit
Browse files Browse the repository at this point in the history
这个主题的第一个版本
  • Loading branch information
Dreamer-Paul committed Aug 3, 2017
0 parents commit 5499bf7
Show file tree
Hide file tree
Showing 25 changed files with 4,904 additions and 0 deletions.
14 changes: 14 additions & 0 deletions 404.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('header.php'); ?>

<main class="container">
<div class="wrap">
<div class="error-page">
<h1>404</h1>
<p>找不到页面啦</p>
<img src="<?php $this->options->themeUrl('img/404.png'); ?>"/>
</div>
</div>
</main>

<?php $this->need('footer.php'); ?>
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2017 Dreamer-Paul

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Single
一个简洁大气,含夜间模式的 Typecho 博客模板。

## 使用方法
1. Star 本项目
2. Clone 本项目
3. 上传本主题,并放置在 `usr/themes/` 目录下
4. 登录你的 Typecho 后台,并进行安装即可食用~

## 项目故事
详见我的博文:[Single 主题与单身狗](https://hi-paul.space/talk/single-theme-and-single-dog.html)

## 开源协议
本项目采用 MIT 开源协议进行授权,并在其基础上须保留原作者的版权注释(CSS、JS 等文件),当然能在页尾写上主题地址就是最好的。

如支持我的话请 Star 本项目或前往 [我的博客](https://hi-paul.space) 给予赞助。

## 使用的开源项目
- [Kico Style](https://github.com/Dreamer-Paul/Kico-Style)
- [Font Awesome](https://github.com/FortAwesome/Font-Awesome)
32 changes: 32 additions & 0 deletions archive.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('header.php'); ?>

<main class="container">
<div class="wrap min">
<section class="home-title">
<h1><?php $this->archiveTitle(array(
'category' => _t('“%s”'),
'search' => _t('含关键词“%s”的文章'),
'tag' => _t('含标签“%s”的文章'),
'author' => _t('“%s”发布的文章')
), '', ''); ?></h1>
<?php if ($this->is('category')) : ?><span><?php echo $this->getDescription(); ?><?php endif; ?>
</section>
<section class="home-posts">
<?php while($this->next()): ?>
<div class="post-item">
<h2><a href="<?php $this->permalink() ?>"><?php $this->title() ?></a></h2>
<p><?php $this->excerpt(100); ?></p>
<div class="post-meta">
<time class="date"><?php $this->date('Y.m.d'); ?></time>
<span class="category"><?php $this->category(''); ?></span>
<span class="comments"><?php $this->commentsNum('%d °C'); ?></span>
</div>
</div>
<?php endwhile; ?>
</section>
<?php $this->pageNav('&laquo;', '&raquo;'); ?>
</div>
</main>

<?php $this->need('footer.php'); ?>
57 changes: 57 additions & 0 deletions comments.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<section id="comments" class="post-comments">
<h3><?php $this->commentsNum(_t('没有评论'), _t('只有一条评论 (QwQ)'), _t('已有 %d 条评论')); ?></h3>
<?php $this->comments()->to($comments); ?>
<?php if($this->allow('comment')): ?>
<div id="<?php $this->respondId(); ?>" class="respond">
<div class="cancel-comment-reply">
<?php $comments->cancelReply(); ?>
</div>

<form method="post" action="<?php $this->commentUrl() ?>" id="comment-form" role="form">
<div class="row">
<?php if($this->user->hasLogin()): ?>
<div class="col-m-12">
<p><?php _e('已登录:'); ?><a href="<?php $this->options->profileUrl(); ?>"><?php $this->user->screenName(); ?></a>. <a href="<?php $this->options->logoutUrl(); ?>" title="登出"><?php _e('登出'); ?> &raquo;</a></p>
<p>
<label for="textarea">内容 *:</label>
<textarea rows="2" name="text" id="textarea" required=""><?php $this->remember('text'); ?></textarea>
</p>
<p>
<button type="submit" class="btn small">写好了!</button>
</p>
</div>
<?php else: ?>
<div class="col-m-6">
<p>
<label for="author">昵称 *:</label>
<input type="text" name="author" id="author" value="<?php $this->remember('author'); ?>" required="">
</p>
<p>
<label for="mail">电邮 *:</label>
<input type="email" name="mail" id="mail" value="<?php $this->remember('mail'); ?>"<?php if ($this->options->commentsRequireMail): ?> required<?php endif; ?>>
</p>
<p>
<label for="url">网站:</label>
<input type="url" name="url" id="url" placeholder="http://" value="<?php $this->remember('url'); ?>"<?php if ($this->options->commentsRequireURL): ?> required<?php endif; ?>>
</p>
</div>
<div class="col-m-6">
<p>
<label for="textarea">内容 *:</label>
<textarea rows="5" name="text" id="textarea" required=""><?php $this->remember('text'); ?></textarea>
</p>
<p>
<button type="submit" class="btn small">写好了!</button>
</p>
</div>
<?php endif; ?>
</div>
</form>
</div>
<?php endif; ?>
<?php if ($comments->have()): ?>
<?php $comments->listComments(); ?>
<?php $comments->pageNav('&laquo; 前一页', '后一页 &raquo;'); ?>
<?php endif; ?>
</section>
Loading

0 comments on commit 5499bf7

Please sign in to comment.