Skip to content

Commit

Permalink
version1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
{{ouyangyanhuo}} committed Aug 15, 2021
1 parent 462120a commit af8623f
Show file tree
Hide file tree
Showing 21 changed files with 2,772 additions and 2 deletions.
10 changes: 10 additions & 0 deletions 404.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('header.php'); ?>
<main>
<section>
<div class="container">
<h1><span class="count">404</span> NOT FOUND</h1>
</div>
</section>
</main>
<?php $this->need('footer.php'); ?>
32 changes: 30 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,30 @@
# SmileTheme
A theme for Typecho
## SmileTheme介绍

一个为typecho移植的主题,源自于[hugo-tania](https://github.com/WingLim/hugo-tania)主题,原本是Hugo的主题,被移植到Typecho上

[![AdminMD](https://img.shields.io/badge/Magneto-SmileTheme-brightgreen?style=for-the-badge&logo=github)](https://www.symbk.cn/technology/523/)
![Version](https://img.shields.io/badge/Version-1.0-critical?style=for-the-badge&logo=gitee)
![Repo-size](https://img.shields.io/github/repo-size/ouyangyanhuo/SmileTheme?style=for-the-badge&logo=google)
![License](https://img.shields.io/github/license/ouyangyanhuo/SmileTheme?style=for-the-badge&logo=twitter)
![Stars](https://img.shields.io/github/stars/ouyangyanhuo/SmileTheme?style=for-the-badge&logo=Instagram)
![Forks](https://img.shields.io/github/forks/ouyangyanhuo/SmileTheme?style=for-the-badge&logo=facebook)

## 更新日志

1. 发布主题

## 编程语言

PHP

## 使用须知

请查看DOC

## 下载渠道

1.Gitte [https://gitee.com/Magnetokuwan/AdminMD](https://gitee.com/Magnetokuwan/SmileTheme) 适合国内(由GitHub同步至此)

2.GitHub [https://github.com/ouyangyanhuo/AdminMD](https://github.com/ouyangyanhuo/SmileTheme) 适合国外(主仓库)

## 使用截图
37 changes: 37 additions & 0 deletions author.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('header.php'); ?>
<main>
<header>
<div class="container">
<h1>作者</h1>
<p class="subtitle">这是<span class="count"><?php $this->archiveTitle(array('author' => _t('%s'),), ''); ?></span>所撰写所有的文章。</p>
</div>
</header>
<section>
<div class="container">
<section>
<section>
<div class="posts">
<?php while($this->next()): ?>
<div class="post">
<a href="<?php $this->permalink() ?>">
<div class="post-row">
<time><?php $this->date('M j'); ?></time>
<h3><?php $this->title() ?></h3>
</div>
</a>
</div>
<?php endwhile; ?>
</div>
</section>
</section>
</div>
<div class="container">
<nav class="flex container suggested">
<?php $this->pageLink('上一页','prev'); ?>
<?php $this->pageLink('下一页','next'); ?>
</nav>
</div>
</section>
</main>
<?php $this->need('footer.php'); ?>
37 changes: 37 additions & 0 deletions category.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('header.php'); ?>
<main>
<header>
<div class="container">
<h1>分类</h1>
<p class="subtitle">这是<span class="count"><?php $this->archiveTitle(array('category' => _t('%s')), ''); ?></span>分类下所有的文章。</p>
</div>
</header>
<section>
<div class="container">
<section>
<section>
<div class="posts">
<?php while($this->next()): ?>
<div class="post">
<a href="<?php $this->permalink() ?>">
<div class="post-row">
<time><?php $this->date('M j'); ?></time>
<h3><?php $this->title() ?></h3>
</div>
</a>
</div>
<?php endwhile; ?>
</div>
</section>
</section>
</div>
<div class="container">
<nav class="flex container suggested">
<?php $this->pageLink('上一页','prev'); ?>
<?php $this->pageLink('下一页','next'); ?>
</nav>
</div>
</section>
</main>
<?php $this->need('footer.php'); ?>
45 changes: 45 additions & 0 deletions comments.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<link rel="stylesheet" href="<?php $this->options->themeUrl('/main/comments.min.css'); ?>">
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<div id="comments">
<?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>
<h4 class="article-post"><?php _e('添加新评论'); ?></h4>
<form method="post" action="<?php $this->commentUrl() ?>" id="comment-form" class="comment-form" role="form">
<?php if($this->user->hasLogin()): ?>
<p><?php _e('登录身份: '); ?><a href="<?php $this->options->profileUrl(); ?>"><?php $this->user->screenName(); ?></a>. <a href="<?php $this->options->logoutUrl(); ?>" title="Logout"><?php _e('退出'); ?> &raquo;</a></p>
<?php else: ?>
<p>
<label for="author" class="required"><?php _e('称呼'); ?></label>
<input type="text" name="author" id="author" class="text" value="<?php $this->remember('author'); ?>" required />
</p>
<p>
<label for="mail"<?php if ($this->options->commentsRequireMail): ?> class="required"<?php endif; ?>><?php _e('Email'); ?></label>
<input type="text" name="mail" id="mail" class="text" value="<?php $this->remember('mail'); ?>"<?php if ($this->options->commentsRequireMail): ?> required<?php endif; ?> />
</p>
<p>
<label for="url"<?php if ($this->options->commentsRequireURL): ?> class="required"<?php endif; ?>><?php _e('网站'); ?></label>
<input type="text" name="url" id="url" class="text" placeholder="<?php _e('http://'); ?>" value="<?php $this->remember('url'); ?>"<?php if ($this->options->commentsRequireURL): ?> required<?php endif; ?> />
</p>
<?php endif; ?>
<p>
<label for="textarea" class="required"><?php _e('内容'); ?></label>
<textarea rows="8" cols="50" name="text" id="comment" class="textarea" required ><?php $this->remember('text'); ?></textarea>
</p>
<p>
<button type="submit" id="submit" class="submit"><?php _e('提交评论'); ?></button>
</p>
</form>
</div>
<?php if ($comments->have()): ?>
<h4 class="comments-title-article-post"><?php $this->commentsNum(_t('暂无评论'), _t('仅有一条评论'), _t('已有 %d 条评论')); ?></h4>
<a class="article-post"><?php $comments->listComments(); ?></a>
<?php $comments->pageNav('&laquo; 前一页', '后一页 &raquo;'); ?>
<?php endif; ?>
<?php else: ?>
<div class="alert info">当前页面的评论已被关闭。</div>
<?php endif; ?>
</div>
11 changes: 11 additions & 0 deletions footer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<footer class="footer flex">
<section class="container">
<nav class="footer-links">
<p><center>Copyright © 2021 Magneto<br>Theme <a href="https://www.symbk.cn" target="">SmileTheme</a> By Magneto</center></p>
</nav>
<?php if ($this->options->FooterHTML): ?>
<?php $this->options->FooterHTML() ?>
<?php endif; ?>
</section>
<script async="" src="<?php $this->options->themeUrl('/main/features.js'); ?>" data-enable-footnotes="true"></script>
</footer>
Loading

0 comments on commit af8623f

Please sign in to comment.