This commit is contained in:
root
2026-03-04 00:23:03 +08:00
commit 6136d791f2
611 changed files with 65539 additions and 0 deletions

18
usr/themes/default/404.php Executable file
View File

@@ -0,0 +1,18 @@
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('header.php'); ?>
<div class="col-mb-12 col-tb-8 col-tb-offset-2">
<div class="error-page">
<h2 class="post-title">404 - <?php _e('页面没找到'); ?></h2>
<p><?php _e('你想查看的页面已被转移或删除了, 要不要搜索看看: '); ?></p>
<form method="post">
<p><input type="text" name="s" class="text" autofocus/></p>
<p>
<button type="submit" class="submit"><?php _e('搜索'); ?></button>
</p>
</form>
</div>
</div><!-- end #content-->
<?php $this->need('footer.php'); ?>

58
usr/themes/default/comments.php Executable file
View File

@@ -0,0 +1,58 @@
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<div id="comments">
<?php $this->comments()->to($comments); ?>
<?php if ($comments->have()): ?>
<h3><?php $this->commentsNum(_t('暂无评论'), _t('仅有一条评论'), _t('已有 %d 条评论')); ?></h3>
<?php $comments->listComments(); ?>
<?php $comments->pageNav(); ?>
<?php endif; ?>
<?php if ($this->allow('comment')): ?>
<div id="<?php $this->respondId(); ?>" class="respond">
<div class="cancel-comment-reply">
<?php $comments->cancelReply(); ?>
</div>
<h3 id="response"><?php _e('添加新评论'); ?></h3>
<form method="post" action="<?php $this->commentUrl() ?>" id="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="email" 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="url" 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="textarea" class="textarea"
required><?php $this->remember('text'); ?></textarea>
</p>
<p>
<button type="submit" class="submit"><?php _e('提交评论'); ?></button>
</p>
</form>
</div>
<?php else: ?>
<h3><?php _e('评论已关闭'); ?></h3>
<?php endif; ?>
</div>

14
usr/themes/default/footer.php Executable file
View File

@@ -0,0 +1,14 @@
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
</div><!-- end .row -->
</div>
</div><!-- end #body -->
<footer id="footer" role="contentinfo">
&copy; <?php echo date('Y'); ?> <a href="<?php $this->options->siteUrl(); ?>"><?php $this->options->title(); ?></a>.
<?php _e('由 <a href="https://typecho.org">Typecho</a> 强力驱动'); ?>.
</footer><!-- end #footer -->
<?php $this->footer(); ?>
</body>
</html>

View File

@@ -0,0 +1,77 @@
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
function themeConfig($form)
{
$logoUrl = new \Typecho\Widget\Helper\Form\Element\Text(
'logoUrl',
null,
null,
_t('站点 LOGO 地址'),
_t('在这里填入一个图片 URL 地址, 以在网站标题前加上一个 LOGO')
);
$form->addInput($logoUrl->addRule('url', _t('请填写一个合法的URL地址')));
$sidebarBlock = new \Typecho\Widget\Helper\Form\Element\Checkbox(
'sidebarBlock',
[
'ShowRecentPosts' => _t('显示最新文章'),
'ShowRecentComments' => _t('显示最近回复'),
'ShowCategory' => _t('显示分类'),
'ShowArchive' => _t('显示归档'),
'ShowOther' => _t('显示其它杂项')
],
['ShowRecentPosts', 'ShowRecentComments', 'ShowCategory', 'ShowArchive', 'ShowOther'],
_t('侧边栏显示')
);
$form->addInput($sidebarBlock->multiMode());
}
function postMeta(
\Widget\Archive $archive,
string $metaType = 'archive'
)
{
$titleTag = $metaType == 'archive' ? 'h2' : 'h1';
?>
<<?php echo $titleTag ?> class="post-title" itemprop="name headline">
<a itemprop="url"
href="<?php $archive->permalink() ?>"><?php $archive->title() ?></a>
</<?php echo $titleTag ?>>
<?php if ($metaType != 'page'): ?>
<ul class="post-meta">
<li itemprop="author" itemscope itemtype="http://schema.org/Person">
<?php _e('作者'); ?>: <a itemprop="name"
href="<?php $archive->author->permalink(); ?>"
rel="author"><?php $archive->author(); ?></a>
</li>
<li><?php _e('时间'); ?>:
<time datetime="<?php $archive->date('c'); ?>" itemprop="datePublished"><?php $archive->date(); ?></time>
</li>
<li><?php _e('分类'); ?>: <?php $archive->category(','); ?></li>
<?php if ($metaType == 'archive'): ?>
<li itemprop="interactionCount">
<a itemprop="discussionUrl"
href="<?php $archive->permalink() ?>#comments"><?php $archive->commentsNum(_t('暂无评论'), _t('1 条评论'), _t('%d 条评论')); ?></a>
</li>
<?php endif; ?>
</ul>
<?php endif; ?>
<?php
}
/*
function themeFields($layout)
{
$logoUrl = new \Typecho\Widget\Helper\Form\Element\Text(
'logoUrl',
null,
null,
_t('站点LOGO地址'),
_t('在这里填入一个图片URL地址, 以在网站标题前加上一个LOGO')
);
$layout->addItem($logoUrl);
}
*/

569
usr/themes/default/grid.css Executable file
View File

@@ -0,0 +1,569 @@
/*
* Bento Grid System
* Source: https://github.com/fenbox/bento
* Version: 1.2.8
* Update: 2013.11.25
*/
.container, .row > [class*="col-"] {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box; }
.container {
margin-left: auto;
margin-right: auto;
padding-left: 10px;
padding-right: 10px; }
.row {
margin-right: -10px;
margin-left: -10px; }
.row > [class*="col-"] {
float: left;
min-height: 1px;
padding-right: 10px;
padding-left: 10px; }
.row > [class*="-push-"],
.row > [class*="-pull-"] {
position: relative; }
/*
* Mobile and up
*/
.col-mb-1 {
width: 8.33333%; }
.col-mb-2 {
width: 16.66667%; }
.col-mb-3 {
width: 25%; }
.col-mb-4 {
width: 33.33333%; }
.col-mb-5 {
width: 41.66667%; }
.col-mb-6 {
width: 50%; }
.col-mb-7 {
width: 58.33333%; }
.col-mb-8 {
width: 66.66667%; }
.col-mb-9 {
width: 75%; }
.col-mb-10 {
width: 83.33333%; }
.col-mb-11 {
width: 91.66667%; }
.col-mb-12 {
width: 100%; }
/*
* Tablet and up
*/
@media (min-width: 768px) {
.container {
max-width: 728px; }
.col-tb-1 {
width: 8.33333%; }
.col-tb-2 {
width: 16.66667%; }
.col-tb-3 {
width: 25%; }
.col-tb-4 {
width: 33.33333%; }
.col-tb-5 {
width: 41.66667%; }
.col-tb-6 {
width: 50%; }
.col-tb-7 {
width: 58.33333%; }
.col-tb-8 {
width: 66.66667%; }
.col-tb-9 {
width: 75%; }
.col-tb-10 {
width: 83.33333%; }
.col-tb-11 {
width: 91.66667%; }
.col-tb-12 {
width: 100%; }
.col-tb-offset-0 {
margin-left: 0%; }
.col-tb-offset-1 {
margin-left: 8.33333%; }
.col-tb-offset-2 {
margin-left: 16.66667%; }
.col-tb-offset-3 {
margin-left: 25%; }
.col-tb-offset-4 {
margin-left: 33.33333%; }
.col-tb-offset-5 {
margin-left: 41.66667%; }
.col-tb-offset-6 {
margin-left: 50%; }
.col-tb-offset-7 {
margin-left: 58.33333%; }
.col-tb-offset-8 {
margin-left: 66.66667%; }
.col-tb-offset-9 {
margin-left: 75%; }
.col-tb-offset-10 {
margin-left: 83.33333%; }
.col-tb-offset-11 {
margin-left: 91.66667%; }
.col-tb-offset-12 {
margin-left: 100%; }
.col-tb-pull-0 {
right: 0%; }
.col-tb-pull-1 {
right: 8.33333%; }
.col-tb-pull-2 {
right: 16.66667%; }
.col-tb-pull-3 {
right: 25%; }
.col-tb-pull-4 {
right: 33.33333%; }
.col-tb-pull-5 {
right: 41.66667%; }
.col-tb-pull-6 {
right: 50%; }
.col-tb-pull-7 {
right: 58.33333%; }
.col-tb-pull-8 {
right: 66.66667%; }
.col-tb-pull-9 {
right: 75%; }
.col-tb-pull-10 {
right: 83.33333%; }
.col-tb-pull-11 {
right: 91.66667%; }
.col-tb-pull-12 {
right: 100%; }
.col-tb-push-0 {
left: 0%; }
.col-tb-push-1 {
left: 8.33333%; }
.col-tb-push-2 {
left: 16.66667%; }
.col-tb-push-3 {
left: 25%; }
.col-tb-push-4 {
left: 33.33333%; }
.col-tb-push-5 {
left: 41.66667%; }
.col-tb-push-6 {
left: 50%; }
.col-tb-push-7 {
left: 58.33333%; }
.col-tb-push-8 {
left: 66.66667%; }
.col-tb-push-9 {
left: 75%; }
.col-tb-push-10 {
left: 83.33333%; }
.col-tb-push-11 {
left: 91.66667%; }
.col-tb-push-12 {
left: 100%; } }
/*
* Desktop and up
*/
@media (min-width: 992px) {
.container {
max-width: 952px; }
.col-1 {
width: 8.33333%; }
.col-2 {
width: 16.66667%; }
.col-3 {
width: 25%; }
.col-4 {
width: 33.33333%; }
.col-5 {
width: 41.66667%; }
.col-6 {
width: 50%; }
.col-7 {
width: 58.33333%; }
.col-8 {
width: 66.66667%; }
.col-9 {
width: 75%; }
.col-10 {
width: 83.33333%; }
.col-11 {
width: 91.66667%; }
.col-12 {
width: 100%; }
.col-offset-0 {
margin-left: 0%; }
.col-offset-1 {
margin-left: 8.33333%; }
.col-offset-2 {
margin-left: 16.66667%; }
.col-offset-3 {
margin-left: 25%; }
.col-offset-4 {
margin-left: 33.33333%; }
.col-offset-5 {
margin-left: 41.66667%; }
.col-offset-6 {
margin-left: 50%; }
.col-offset-7 {
margin-left: 58.33333%; }
.col-offset-8 {
margin-left: 66.66667%; }
.col-offset-9 {
margin-left: 75%; }
.col-offset-10 {
margin-left: 83.33333%; }
.col-offset-11 {
margin-left: 91.66667%; }
.col-offset-12 {
margin-left: 100%; }
.col-pull-0 {
right: 0%; }
.col-pull-1 {
right: 8.33333%; }
.col-pull-2 {
right: 16.66667%; }
.col-pull-3 {
right: 25%; }
.col-pull-4 {
right: 33.33333%; }
.col-pull-5 {
right: 41.66667%; }
.col-pull-6 {
right: 50%; }
.col-pull-7 {
right: 58.33333%; }
.col-pull-8 {
right: 66.66667%; }
.col-pull-9 {
right: 75%; }
.col-pull-10 {
right: 83.33333%; }
.col-pull-11 {
right: 91.66667%; }
.col-pull-12 {
right: 100%; }
.col-push-0 {
left: 0%; }
.col-push-1 {
left: 8.33333%; }
.col-push-2 {
left: 16.66667%; }
.col-push-3 {
left: 25%; }
.col-push-4 {
left: 33.33333%; }
.col-push-5 {
left: 41.66667%; }
.col-push-6 {
left: 50%; }
.col-push-7 {
left: 58.33333%; }
.col-push-8 {
left: 66.66667%; }
.col-push-9 {
left: 75%; }
.col-push-10 {
left: 83.33333%; }
.col-push-11 {
left: 91.66667%; }
.col-push-12 {
left: 100%; } }
/*
* Widescreen and up
*/
@media (min-width: 1200px) {
.container {
max-width: 1160px; }
.col-wd-1 {
width: 8.33333%; }
.col-wd-2 {
width: 16.66667%; }
.col-wd-3 {
width: 25%; }
.col-wd-4 {
width: 33.33333%; }
.col-wd-5 {
width: 41.66667%; }
.col-wd-6 {
width: 50%; }
.col-wd-7 {
width: 58.33333%; }
.col-wd-8 {
width: 66.66667%; }
.col-wd-9 {
width: 75%; }
.col-wd-10 {
width: 83.33333%; }
.col-wd-11 {
width: 91.66667%; }
.col-wd-12 {
width: 100%; }
.col-wd-offset-0 {
margin-left: 0%; }
.col-wd-offset-1 {
margin-left: 8.33333%; }
.col-wd-offset-2 {
margin-left: 16.66667%; }
.col-wd-offset-3 {
margin-left: 25%; }
.col-wd-offset-4 {
margin-left: 33.33333%; }
.col-wd-offset-5 {
margin-left: 41.66667%; }
.col-wd-offset-6 {
margin-left: 50%; }
.col-wd-offset-7 {
margin-left: 58.33333%; }
.col-wd-offset-8 {
margin-left: 66.66667%; }
.col-wd-offset-9 {
margin-left: 75%; }
.col-wd-offset-10 {
margin-left: 83.33333%; }
.col-wd-offset-11 {
margin-left: 91.66667%; }
.col-wd-offset-12 {
margin-left: 100%; }
.col-wd-pull-0 {
right: 0%; }
.col-wd-pull-1 {
right: 8.33333%; }
.col-wd-pull-2 {
right: 16.66667%; }
.col-wd-pull-3 {
right: 25%; }
.col-wd-pull-4 {
right: 33.33333%; }
.col-wd-pull-5 {
right: 41.66667%; }
.col-wd-pull-6 {
right: 50%; }
.col-wd-pull-7 {
right: 58.33333%; }
.col-wd-pull-8 {
right: 66.66667%; }
.col-wd-pull-9 {
right: 75%; }
.col-wd-pull-10 {
right: 83.33333%; }
.col-wd-pull-11 {
right: 91.66667%; }
.col-wd-pull-12 {
right: 100%; }
.col-wd-push-0 {
left: 0%; }
.col-wd-push-1 {
left: 8.33333%; }
.col-wd-push-2 {
left: 16.66667%; }
.col-wd-push-3 {
left: 25%; }
.col-wd-push-4 {
left: 33.33333%; }
.col-wd-push-5 {
left: 41.66667%; }
.col-wd-push-6 {
left: 50%; }
.col-wd-push-7 {
left: 58.33333%; }
.col-wd-push-8 {
left: 66.66667%; }
.col-wd-push-9 {
left: 75%; }
.col-wd-push-10 {
left: 83.33333%; }
.col-wd-push-11 {
left: 91.66667%; }
.col-wd-push-12 {
left: 100%; } }
/*
* Responsive kit
*/
@media (max-width: 767px) {
.kit-hidden-mb {
display: none; } }
@media (max-width: 991px) {
.kit-hidden-tb {
display: none; } }
@media (max-width: 1199px) {
.kit-hidden {
display: none; } }
/*
* Clearfix
*/
.clearfix, .row {
zoom: 1; }
.clearfix:before, .row:before, .clearfix:after, .row:after {
content: " ";
display: table; }
.clearfix:after, .row:after {
clear: both; }

65
usr/themes/default/header.php Executable file
View File

@@ -0,0 +1,65 @@
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="<?php $this->options->charset(); ?>">
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title><?php $this->archiveTitle([
'category' => _t('分类 %s 下的文章'),
'search' => _t('包含关键字 %s 的文章'),
'tag' => _t('标签 %s 下的文章'),
'author' => _t('%s 发布的文章')
], '', ' - '); ?><?php $this->options->title(); ?></title>
<!-- 使用url函数转换相关路径 -->
<link rel="stylesheet" href="<?php $this->options->themeUrl('normalize.css'); ?>">
<link rel="stylesheet" href="<?php $this->options->themeUrl('grid.css'); ?>">
<link rel="stylesheet" href="<?php $this->options->themeUrl('style.css'); ?>">
<!-- 通过自有函数输出HTML头部信息 -->
<?php $this->header(); ?>
</head>
<body>
<header id="header" class="clearfix">
<div class="container">
<div class="row">
<div class="site-name col-mb-12 col-9">
<?php if ($this->options->logoUrl): ?>
<a id="logo" href="<?php $this->options->siteUrl(); ?>">
<img src="<?php $this->options->logoUrl() ?>" alt="<?php $this->options->title() ?>"/>
</a>
<?php else: ?>
<a id="logo" href="<?php $this->options->siteUrl(); ?>"><?php $this->options->title() ?></a>
<p class="description"><?php $this->options->description() ?></p>
<?php endif; ?>
</div>
<div class="site-search col-3 kit-hidden-tb">
<form id="search" method="post" action="<?php $this->options->siteUrl(); ?>" role="search">
<label for="s" class="sr-only"><?php _e('搜索关键字'); ?></label>
<input type="text" id="s" name="s" class="text" placeholder="<?php _e('输入关键字搜索'); ?>"/>
<button type="submit" class="submit"><?php _e('搜索'); ?></button>
</form>
</div>
<div class="col-mb-12">
<nav id="nav-menu" class="clearfix" role="navigation">
<a<?php if ($this->is('index')): ?> class="current"<?php endif; ?>
href="<?php $this->options->siteUrl(); ?>"><?php _e('首页'); ?></a>
<?php \Widget\Contents\Page\Rows::alloc()->to($pages); ?>
<?php while ($pages->next()): ?>
<a<?php if ($this->is('page', $pages->slug)): ?> class="current"<?php endif; ?>
href="<?php $pages->permalink(); ?>"
title="<?php $pages->title(); ?>"><?php $pages->title(); ?></a>
<?php endwhile; ?>
</nav>
</div>
</div><!-- end .row -->
</div>
</header><!-- end #header -->
<div id="body">
<div class="container">
<div class="row">

Binary file not shown.

After

Width:  |  Height:  |  Size: 303 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 437 B

43
usr/themes/default/index.php Executable file
View File

@@ -0,0 +1,43 @@
<?php
/**
* Default theme for Typecho
*
* @package Typecho Replica Theme
* @author Typecho Team
* @version 1.2
* @link http://typecho.org
*/
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
$this->need('header.php');
?>
<div class="col-mb-12 col-8" id="main" role="main">
<?php if (!($this->is('index')) && !($this->is('post'))): ?>
<h3 class="archive-title"><?php $this->archiveTitle([
'category' => _t('分类 %s 下的文章'),
'search' => _t('包含关键字 %s 的文章'),
'tag' => _t('标签 %s 下的文章'),
'author' => _t('%s 发布的文章')
], '', ''); ?></h3>
<?php endif; ?>
<?php if ($this->have()): ?>
<?php while ($this->next()): ?>
<article class="post" itemscope itemtype="http://schema.org/BlogPosting">
<?php postMeta($this); ?>
<div class="post-content" itemprop="articleBody">
<?php $this->content(_t('阅读剩余部分')); ?>
</div>
</article>
<?php endwhile; ?>
<?php else: ?>
<article class="post">
<h2 class="post-title"><?php _e('没有找到内容'); ?></h2>
</article>
<?php endif; ?>
<?php $this->pageNav('&laquo; ' . _t('前一页'), _t('后一页') . ' &raquo;'); ?>
</div><!-- end #main-->
<?php $this->need('sidebar.php'); ?>
<?php $this->need('footer.php'); ?>

341
usr/themes/default/normalize.css vendored Executable file
View File

@@ -0,0 +1,341 @@
/*! normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */
/* Document
========================================================================== */
/**
* 1. Correct the line height in all browsers.
* 2. Prevent adjustments of font size after orientation changes in iOS.
*/
html {
line-height: 1.15; /* 1 */
-webkit-text-size-adjust: 100%; /* 2 */
}
/* Sections
========================================================================== */
/**
* Remove the margin in all browsers.
*/
body {
margin: 0;
}
/**
* Correct the font size and margin on `h1` elements within `section` and
* `article` contexts in Chrome, Firefox, and Safari.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
/* Grouping content
========================================================================== */
/**
* 1. Add the correct box sizing in Firefox.
* 2. Show the overflow in Edge and IE.
*/
hr {
box-sizing: content-box; /* 1 */
height: 0; /* 1 */
overflow: visible; /* 2 */
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
pre {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/* Text-level semantics
========================================================================== */
/**
* Remove the gray background on active links in IE 10.
*/
a {
background-color: transparent;
}
/**
* 1. Remove the bottom border in Chrome 57-
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
*/
abbr[title] {
border-bottom: none; /* 1 */
text-decoration: underline; /* 2 */
text-decoration: underline dotted; /* 2 */
}
/**
* Add the correct font weight in Chrome, Edge, and Safari.
*/
b,
strong {
font-weight: bolder;
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
samp {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/**
* Add the correct font size in all browsers.
*/
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` elements from affecting the line height in
* all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
/* Embedded content
========================================================================== */
/**
* Remove the border on images inside links in IE 10.
*/
img {
border-style: none;
}
/* Forms
========================================================================== */
/**
* 1. Change the font styles in all browsers.
* 2. Remove the margin in Firefox and Safari.
*/
button,
input,
optgroup,
select,
textarea {
font-family: inherit; /* 1 */
font-size: 100%; /* 1 */
line-height: 1.15; /* 1 */
margin: 0; /* 2 */
}
/**
* Show the overflow in IE.
* 1. Show the overflow in Edge.
*/
button,
input { /* 1 */
overflow: visible;
}
/**
* Remove the inheritance of text transform in Edge, Firefox, and IE.
* 1. Remove the inheritance of text transform in Firefox.
*/
button,
select { /* 1 */
text-transform: none;
}
/**
* Correct the inability to style clickable types in iOS and Safari.
*/
button,
[type="button"],
[type="reset"],
[type="submit"] {
-webkit-appearance: button;
}
/**
* Remove the inner border and padding in Firefox.
*/
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
border-style: none;
padding: 0;
}
/**
* Restore the focus styles unset by the previous rule.
*/
button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
outline: 1px dotted ButtonText;
}
/**
* Correct the padding in Firefox.
*/
fieldset {
padding: 0.35em 0.75em 0.625em;
}
/**
* 1. Correct the text wrapping in Edge and IE.
* 2. Correct the color inheritance from `fieldset` elements in IE.
* 3. Remove the padding so developers are not caught out when they zero out
* `fieldset` elements in all browsers.
*/
legend {
box-sizing: border-box; /* 1 */
color: inherit; /* 2 */
display: table; /* 1 */
max-width: 100%; /* 1 */
padding: 0; /* 3 */
white-space: normal; /* 1 */
}
/**
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/
progress {
vertical-align: baseline;
}
/**
* Remove the default vertical scrollbar in IE 10+.
*/
textarea {
overflow: auto;
}
/**
* 1. Add the correct box sizing in IE 10.
* 2. Remove the padding in IE 10.
*/
[type="checkbox"],
[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
/**
* Correct the cursor style of increment and decrement buttons in Chrome.
*/
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto;
}
/**
* 1. Correct the odd appearance in Chrome and Safari.
* 2. Correct the outline style in Safari.
*/
[type="search"] {
-webkit-appearance: textfield; /* 1 */
outline-offset: -2px; /* 2 */
}
/**
* Remove the inner padding in Chrome and Safari on macOS.
*/
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* 1. Correct the inability to style clickable types in iOS and Safari.
* 2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
-webkit-appearance: button; /* 1 */
font: inherit; /* 2 */
}
/* Interactive
========================================================================== */
/*
* Add the correct display in Edge, IE 10+, and Firefox.
*/
details {
display: block;
}
/*
* Add the correct display in all browsers.
*/
summary {
display: list-item;
}
/* Misc
========================================================================== */
/**
* Add the correct display in IE 10+.
*/
template {
display: none;
}
/**
* Add the correct display in IE 10.
*/
[hidden] {
display: none;
}

15
usr/themes/default/page.php Executable file
View File

@@ -0,0 +1,15 @@
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('header.php'); ?>
<div class="col-mb-12 col-8" id="main" role="main">
<article class="post" itemscope itemtype="http://schema.org/BlogPosting">
<?php postMeta($this, 'page'); ?>
<div class="post-content" itemprop="articleBody">
<?php $this->content(); ?>
</div>
</article>
<?php $this->need('comments.php'); ?>
</div><!-- end #main-->
<?php $this->need('sidebar.php'); ?>
<?php $this->need('footer.php'); ?>

22
usr/themes/default/post.php Executable file
View File

@@ -0,0 +1,22 @@
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('header.php'); ?>
<div class="col-mb-12 col-8" id="main" role="main">
<article class="post" itemscope itemtype="http://schema.org/BlogPosting">
<?php postMeta($this, 'post'); ?>
<div class="post-content" itemprop="articleBody">
<?php $this->content(); ?>
</div>
<p itemprop="keywords" class="tags"><?php _e('标签'); ?>: <?php $this->tags(', ', true, 'none'); ?></p>
</article>
<?php $this->need('comments.php'); ?>
<ul class="post-near">
<li>上一篇: <?php $this->thePrev('%s', _t('没有了')); ?></li>
<li>下一篇: <?php $this->theNext('%s', _t('没有了')); ?></li>
</ul>
</div><!-- end #main-->
<?php $this->need('sidebar.php'); ?>
<?php $this->need('footer.php'); ?>

BIN
usr/themes/default/screenshot.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

63
usr/themes/default/sidebar.php Executable file
View File

@@ -0,0 +1,63 @@
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<div class="col-mb-12 col-offset-1 col-3 kit-hidden-tb" id="secondary" role="complementary">
<?php if (!empty($this->options->sidebarBlock) && in_array('ShowRecentPosts', $this->options->sidebarBlock)): ?>
<section class="widget">
<h3 class="widget-title"><?php _e('最新文章'); ?></h3>
<ul class="widget-list">
<?php \Widget\Contents\Post\Recent::alloc()
->parse('<li><a href="{permalink}">{title}</a></li>'); ?>
</ul>
</section>
<?php endif; ?>
<?php if (!empty($this->options->sidebarBlock) && in_array('ShowRecentComments', $this->options->sidebarBlock)): ?>
<section class="widget">
<h3 class="widget-title"><?php _e('最近回复'); ?></h3>
<ul class="widget-list">
<?php \Widget\Comments\Recent::alloc()->to($comments); ?>
<?php while ($comments->next()): ?>
<li>
<a href="<?php $comments->permalink(); ?>"><?php $comments->author(false); ?></a>: <?php $comments->excerpt(35, '...'); ?>
</li>
<?php endwhile; ?>
</ul>
</section>
<?php endif; ?>
<?php if (!empty($this->options->sidebarBlock) && in_array('ShowCategory', $this->options->sidebarBlock)): ?>
<section class="widget">
<h3 class="widget-title"><?php _e('分类'); ?></h3>
<?php \Widget\Metas\Category\Rows::alloc()->listCategories('wrapClass=widget-list'); ?>
</section>
<?php endif; ?>
<?php if (!empty($this->options->sidebarBlock) && in_array('ShowArchive', $this->options->sidebarBlock)): ?>
<section class="widget">
<h3 class="widget-title"><?php _e('归档'); ?></h3>
<ul class="widget-list">
<?php \Widget\Contents\Post\Date::alloc('type=month&format=F Y')
->parse('<li><a href="{permalink}">{date}</a></li>'); ?>
</ul>
</section>
<?php endif; ?>
<?php if (!empty($this->options->sidebarBlock) && in_array('ShowOther', $this->options->sidebarBlock)): ?>
<section class="widget">
<h3 class="widget-title"><?php _e('其它'); ?></h3>
<ul class="widget-list">
<?php if ($this->user->hasLogin()): ?>
<li class="last"><a href="<?php $this->options->adminUrl(); ?>"><?php _e('进入后台'); ?>
(<?php $this->user->screenName(); ?>)</a></li>
<li><a href="<?php $this->options->logoutUrl(); ?>"><?php _e('退出'); ?></a></li>
<?php else: ?>
<li class="last"><a href="<?php $this->options->adminUrl('login.php'); ?>"><?php _e('登录'); ?></a>
</li>
<?php endif; ?>
<li><a href="<?php $this->options->feedUrl(); ?>"><?php _e('文章 RSS'); ?></a></li>
<li><a href="<?php $this->options->commentsFeedUrl(); ?>"><?php _e('评论 RSS'); ?></a></li>
<li><a href="https://typecho.org">Typecho</a></li>
</ul>
</section>
<?php endif; ?>
</div><!-- end #sidebar -->

500
usr/themes/default/style.css Executable file
View File

@@ -0,0 +1,500 @@
/* ------------------------------------
* Typecho Default Theme
*
* @author Typecho Team
* @link http: //typecho.org/
* @update 2013-10-28
* --------------------------------- */
/* ------------------
* Global style
* --------------- */
body {
background-color: #FFF;
color: #444;
/*font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;*/
font-family: "Droid Serif", Georgia, "Times New Roman", "PingFang SC", "Hiragino Sans GB", "Source Han Sans CN", "WenQuanYi Micro Hei","Microsoft Yahei", serif;
font-size: 87.5%;
}
a {
color: #3354AA;
text-decoration: none;
}
a:hover, a:active {
color: #444;
}
pre, code {
background: #F3F3F3;
font-family: Menlo, Monaco, Consolas, "Lucida Console", "Courier New", monospace;
font-size: .92857em;
}
code { padding: 2px 4px; color: #B94A48; }
pre {
padding: 8px;
overflow: auto;
max-height: 400px;
}
pre code {
display: block;
padding: 3px;
color: #444;
}
blockquote {
margin: 1em 0;
padding-left: 1.5em;
border-left: 4px solid #eee;
color: #666;
}
table {
border: 1px solid #ddd;
width: 100%;
}
table th,
table td {
padding: 5px 10px;
border: 1px solid #eee;
}
table th {
background: #f3f3f3;
}
h1, h2, h3, h4, h5, h6 {
font-family: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "WenQuanYi Micro Hei","Microsoft Yahei", sans-serif;
}
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
textarea {
padding: 5px;
border: 1px solid #E9E9E9;
width: 100%;
border-radius: 2px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
textarea {
resize: vertical;
}
/* Special link style */
.post-meta a,
.post-content a,
.widget a,
.comment-content a {
border-bottom: 1px solid #EEE;
}
.post-meta a:hover,
.post-content a:hover,
.widget a:hover,
.comment-content a:hover {
border-bottom-color: transparent;
}
/* ------------------
* Header
* --------------- */
#header {
padding-top: 35px;
border-bottom: 1px solid #EEE;
}
#logo {
color: #333;
font-size: 2.5em;
}
#logo img {
max-height: 64px;
}
.description {
margin: .5em 0 0;
color: #999;
font-style: italic;
}
/* Navigation menu */
#nav-menu {
margin: 25px 0 0;
padding: 0;
}
#nav-menu a {
display: block;
margin-right: -1px;
padding: 0 20px;
border: 1px solid #EEE;
border-bottom: none;
height: 32px;
line-height: 32px;
color: #444;
float: left;
}
#nav-menu a:hover,
#nav-menu .current {
background: #F6F6F6;
}
/* Search */
#search {
position: relative;
margin-top: 15px;
}
#search input {
padding-right: 30px;
}
#search button {
position: absolute;
right: 4px;
top: 2px;
border: none;
padding: 0;
width: 24px;
height: 24px;
background: transparent url(img/icon-search.png) no-repeat center center;
direction: ltr; /* fix RTL language */
text-indent: -9999em;
}
@media
(-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
#search button {
background-image: url(img/icon-search@2x.png);
-webkit-background-size: 24px 24px;
-moz-background-size: 24px 24px;
-o-background-size: 24px 24px;
background-size: 24px 24px;
}
}
/* ------------------
* Main
* --------------- */
.post {
padding: 15px 0 20px;
border-bottom: 1px solid #EEE;
}
.post-title {
margin: .83em 0;
font-size: 1.4em;
}
.post-meta {
margin-top: -0.5em;
padding: 0;
color: #999;
font-size: .92857em;
}
.post-meta li {
display: inline-block;
margin: 0 8px 0 0;
padding-left: 12px;
border-left: 1px solid #EEE;
}
.post-meta li:first-child {
margin-left: 0;
padding-left: 0;
border: none;
}
.post-content {
line-height: 1.5;
}
.post .tags {
clear: both;
}
.post-near {
list-style: none;
margin: 30px 0;
padding: 0;
color: #999;
}
.post-near li {
margin: 10px 0;
}
.archive-title {
margin: 1em 0 -1em;
padding-top: 20px;
color: #999;
font-size: 1em;
}
.more {
text-align: center;
}
.more a {
border: none;
}
.protected .text {
width: 50%;
}
/* Page nav */
.page-navigator {
list-style: none;
margin: 25px 0;
padding: 0;
text-align: center;
}
.page-navigator li {
display: inline-block;
margin: 0 4px;
}
.page-navigator a {
display: inline-block;
padding: 0 10px;
height: 30px;
line-height: 30px;
}
.page-navigator a:hover {
background: #EEE;
text-decoration: none;
}
.page-navigator .current a {
color: #444;
background: #EEE;
}
/* ------------------
* Comment list
* --------------- */
#comments {
padding-top: 15px;
}
.comment-list, .comment-list ol {
list-style: none;
margin: 0;
padding: 0;
}
.comment-list li {
padding: 14px;
margin-top: 10px;
border: 1px solid #EEE;
}
.comment-list li.comment-level-odd {
background: #F6F6F3;
}
.comment-list li.comment-level-even {
background: #FFF;
}
.comment-list li.comment-by-author {
background: #FFF9E8;
}
.comment-list li .comment-reply {
text-align: right;
font-size: .92857em;
}
.comment-meta a {
color: #999;
font-size: .92857em;
}
.comment-author {
display: block;
margin-bottom: 3px;
color: #444;
}
.comment-author .avatar {
float: left;
margin-right: 10px;
}
.comment-author cite {
font-weight: bold;
font-style: normal;
}
/* Comment reply */
.comment-list .respond {
margin-top: 15px;
border-top: 1px solid #EEE;
}
.respond .cancel-comment-reply {
float: right;
margin-top: 15px;
font-size: .92857em;
}
#comment-form label {
display: block;
margin-bottom: .5em;
font-weight: bold;
}
#comment-form .required:after {
content: " *";
color: #C00;
}
/* ------------------
* secondary
* --------------- */
#secondary {
padding-top: 15px;
word-wrap: break-word;
}
.widget {
margin-bottom: 30px;
}
.widget-list {
list-style: none;
padding: 0;
}
.widget-list li {
margin: 5px 0;
line-height: 1.6;
}
.widget-list li ul {
margin-left: 15px;
}
/* ------------------
* Footer
* --------------- */
#footer {
padding: 3em 0;
line-height: 1.5;
text-align: center;
color: #999;
}
/* -----------------
* Error page
* -------------- */
.error-page {
margin-top: 100px;
margin-bottom: 100px;
}
/* -----------------
* Content format
*--------------- */
.post-content, .comment-content {
line-height: 1.5;
word-wrap: break-word;
}
.post-content h2, .comment-content h2 {
font-size: 1.28571em;
}
.post-content img, .comment-content img,
.post-content video, .comment-content video {
max-width: 100%;
}
.post-content a img,
.comment-content a img {
background: #FFF;
position: relative;
bottom: -4px; /* hidden img parent link border */
}
.post-content hr, .comment-content hr {
margin: 2em auto;
width: 100px;
border: 1px solid #E9E9E9;
border-width: 2px 0 0 0;
}
/* -----------------
* Misc
*--------------- */
.aligncenter, div.aligncenter {
display: block;
margin-left: auto;
margin-right: auto;
}
.alignleft {
float: left;
}
.alignright {
float: right;
}
img.alignleft {
margin: 0 15px 0 0;
}
img.alignright {
margin: 0 0 0 15px;
}
/* -----------------
* Responsive
*--------------- */
@media (max-width: 767px) {
body {
font-size: 81.25%;
}
#nav-menu a {
float: none;
display: inline-block;
margin: 0 -2px;
}
}
@media (max-width: 768px) {
#header,
.post-title,
.post-meta {
text-align: center;
}
}
@media (min-width: 992px) {
}
@media (min-width: 1200px) {
.container {
max-width: 952px;
}
}
/*
* Hide from both screenreaders and browsers: h5bp.com/u
*/
.hidden {
display: none !important;
visibility: hidden; }
/*
* Hide only visually, but have it available for screenreaders: h5bp.com/v
*/
.sr-only {
border: 0;
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px; }
/*
* Extends the .sr-only class to allow the element to be focusable
* when navigated to via the keyboard: h5bp.com/p
*/
.sr-only.focusable:active,
.sr-only.focusable:focus {
clip: auto;
height: auto;
margin: 0;
overflow: visible;
position: static;
width: auto; }
/*
* Hide visually and from screenreaders, but maintain layout
*/
.invisible {
visibility: hidden; }