init submit

This commit is contained in:
YuhangQ 2022-11-18 10:56:51 +08:00
parent 5d6b32a85a
commit 9727b227f7
19 changed files with 2843 additions and 0 deletions

18
404.php Normal 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 class="form-control" type="text" name="s" class="text" autofocus/></p>
<p>
<button class="form-control btn btn-primary" type="submit" class="submit"><?php _e('搜索'); ?></button>
</p>
</form>
</div>
</div><!-- end #content-->
<?php $this->need('footer.php'); ?>

44
archive.php Normal file
View File

@ -0,0 +1,44 @@
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('header.php'); ?>
<?php $this->need('sidebar.php'); ?>
<div class="col-mb-12 col-9" id="main" role="main">
<h3 class="archive-title"><?php $this->archiveTitle([
'category' => _t('分类 %s 下的文章'),
'search' => _t('包含关键字 %s 的文章'),
'tag' => _t('标签 %s 下的文章'),
'author' => _t('%s 发布的文章')
], '', ''); ?></h3>
<?php if ($this->have()): ?>
<?php while ($this->next()): ?>
<article class="post" itemscope itemtype="http://schema.org/BlogPosting">
<h2 class="post-title" itemprop="name headline"><a itemprop="url"
href="<?php $this->permalink() ?>"><?php $this->title() ?></a>
</h2>
<ul class="post-meta">
<li><?php _e('时间: '); ?>
<time datetime="<?php $this->date('c'); ?>"
itemprop="datePublished"><?php $this->date(); ?></time>
</li>
<li><?php _e('分类: '); ?><?php $this->category(','); ?></li>
<li itemprop="interactionCount"><a
href="<?php $this->permalink() ?>#comments"><?php $this->commentsNum('评论', '1 条评论', '%d 条评论'); ?></a>
</li>
</ul>
<div class="post-content" itemprop="articleBody">
<?php $this->excerpt(200, '...'); ?>
</div>
</article>
<?php endwhile; ?>
<?php else: ?>
<article class="post">
<h2 class="post-title"><?php _e('没有找到内容'); ?></h2>
</article>
<?php endif; ?>
<?php $this->pageNav('&laquo; 前一页', '后一页 &raquo;'); ?>
</div><!-- end #main -->
<?php $this->need('footer.php'); ?>

60
comments.php Normal file
View File

@ -0,0 +1,60 @@
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<div id="comments">
<?php $this->comments()->to($comments); ?>
<?php if ($comments->have()): ?>
<h5><?php $this->commentsNum(_t('暂无评论'), _t('仅有一条评论'), _t('已有 %d 条评论')); ?></h5>
<div class="card">
<?php $comments->listComments(); ?>
</div
<?php $comments->pageNav('&laquo; 前一页', '后一页 &raquo;'); ?>
<?php endif; ?>
<?php if ($this->allow('comment')): ?>
<div id="<?php $this->respondId(); ?>" class="respond">
<div class="cancel-comment-reply">
<?php $comments->cancelReply(); ?>
</div>
<h5 id="response"><?php _e('添加新评论'); ?></h5>
<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" class="form-control" 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" class="form-control" 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" class="form-control" 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 class="form-control" rows="8" cols="50" name="text" id="textarea" class="textarea"
required><?php $this->remember('text'); ?></textarea>
</p>
<p>
<button type="submit" class="submit btn btn-primary"><?php _e('提交评论'); ?></button>
</p>
</form>
</div>
<?php else: ?>
<h3><?php _e('评论已关闭'); ?></h3>
<?php endif; ?>
</div>

14
footer.php Normal 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="http://www.typecho.org">Typecho</a> 强力驱动'); ?>.
</footer><!-- end #footer -->
<?php $this->footer(); ?>
</body>
</html>

44
functions.php Normal file
View File

@ -0,0 +1,44 @@
<?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);
$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 themeFields($layout)
{
$logoUrl = new \Typecho\Widget\Helper\Form\Element\Text(
'logoUrl',
null,
null,
_t('站点LOGO地址'),
_t('在这里填入一个图片URL地址, 以在网站标题前加上一个LOGO')
);
$layout->addItem($logoUrl);
}
*/

940
github-markdown.css Normal file
View File

@ -0,0 +1,940 @@
.markdown-body {
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
margin: 0;
color: #24292f;
background-color: #ffffff;
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";
font-size: 16px;
line-height: 1.5;
word-wrap: break-word;
}
.markdown-body .octicon {
display: inline-block;
fill: currentColor;
vertical-align: text-bottom;
}
.markdown-body h1:hover .anchor .octicon-link:before,
.markdown-body h2:hover .anchor .octicon-link:before,
.markdown-body h3:hover .anchor .octicon-link:before,
.markdown-body h4:hover .anchor .octicon-link:before,
.markdown-body h5:hover .anchor .octicon-link:before,
.markdown-body h6:hover .anchor .octicon-link:before {
width: 16px;
height: 16px;
content: ' ';
display: inline-block;
background-color: currentColor;
-webkit-mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' version='1.1' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg>");
mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' version='1.1' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg>");
}
.markdown-body details,
.markdown-body figcaption,
.markdown-body figure {
display: block;
}
.markdown-body summary {
display: list-item;
}
.markdown-body [hidden] {
display: none !important;
}
.markdown-body a {
background-color: transparent;
color: #0969da;
text-decoration: none;
}
.markdown-body a:active,
.markdown-body a:hover {
outline-width: 0;
}
.markdown-body abbr[title] {
border-bottom: none;
text-decoration: underline dotted;
}
.markdown-body b,
.markdown-body strong {
font-weight: 600;
}
.markdown-body dfn {
font-style: italic;
}
.markdown-body h1 {
margin: .67em 0;
font-weight: 600;
padding-bottom: .3em;
font-size: 2em;
border-bottom: 1px solid hsla(210,18%,87%,1);
}
.markdown-body mark {
background-color: #fff8c5;
color: #24292f;
}
.markdown-body small {
font-size: 90%;
}
.markdown-body sub,
.markdown-body sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
.markdown-body sub {
bottom: -0.25em;
}
.markdown-body sup {
top: -0.5em;
}
.markdown-body img {
border-style: none;
max-width: 100%;
box-sizing: content-box;
background-color: #ffffff;
}
.markdown-body code,
.markdown-body kbd,
.markdown-body pre,
.markdown-body samp {
font-family: monospace,monospace;
font-size: 1em;
}
.markdown-body figure {
margin: 1em 40px;
}
.markdown-body hr {
box-sizing: content-box;
overflow: hidden;
background: transparent;
border-bottom: 1px solid hsla(210,18%,87%,1);
height: .25em;
padding: 0;
margin: 24px 0;
background-color: #d0d7de;
border: 0;
}
.markdown-body input {
font: inherit;
margin: 0;
overflow: visible;
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
.markdown-body [type=button],
.markdown-body [type=reset],
.markdown-body [type=submit] {
-webkit-appearance: button;
}
.markdown-body [type=button]::-moz-focus-inner,
.markdown-body [type=reset]::-moz-focus-inner,
.markdown-body [type=submit]::-moz-focus-inner {
border-style: none;
padding: 0;
}
.markdown-body [type=button]:-moz-focusring,
.markdown-body [type=reset]:-moz-focusring,
.markdown-body [type=submit]:-moz-focusring {
outline: 1px dotted ButtonText;
}
.markdown-body [type=checkbox],
.markdown-body [type=radio] {
box-sizing: border-box;
padding: 0;
}
.markdown-body [type=number]::-webkit-inner-spin-button,
.markdown-body [type=number]::-webkit-outer-spin-button {
height: auto;
}
.markdown-body [type=search] {
-webkit-appearance: textfield;
outline-offset: -2px;
}
.markdown-body [type=search]::-webkit-search-cancel-button,
.markdown-body [type=search]::-webkit-search-decoration {
-webkit-appearance: none;
}
.markdown-body ::-webkit-input-placeholder {
color: inherit;
opacity: .54;
}
.markdown-body ::-webkit-file-upload-button {
-webkit-appearance: button;
font: inherit;
}
.markdown-body a:hover {
text-decoration: underline;
}
.markdown-body hr::before {
display: table;
content: "";
}
.markdown-body hr::after {
display: table;
clear: both;
content: "";
}
.markdown-body table {
border-spacing: 0;
border-collapse: collapse;
display: block;
width: max-content;
max-width: 100%;
overflow: auto;
}
.markdown-body td,
.markdown-body th {
padding: 0;
}
.markdown-body details summary {
cursor: pointer;
}
.markdown-body details:not([open])>*:not(summary) {
display: none !important;
}
.markdown-body kbd {
display: inline-block;
padding: 3px 5px;
font: 11px ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;
line-height: 10px;
color: #24292f;
vertical-align: middle;
background-color: #f6f8fa;
border: solid 1px rgba(175,184,193,0.2);
border-bottom-color: rgba(175,184,193,0.2);
border-radius: 6px;
box-shadow: inset 0 -1px 0 rgba(175,184,193,0.2);
}
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
margin-top: 24px;
margin-bottom: 16px;
font-weight: 600;
line-height: 1.25;
}
.markdown-body h2 {
font-weight: 600;
padding-bottom: .3em;
font-size: 1.5em;
border-bottom: 1px solid hsla(210,18%,87%,1);
}
.markdown-body h3 {
font-weight: 600;
font-size: 1.25em;
}
.markdown-body h4 {
font-weight: 600;
font-size: 1em;
}
.markdown-body h5 {
font-weight: 600;
font-size: .875em;
}
.markdown-body h6 {
font-weight: 600;
font-size: .85em;
color: #57606a;
}
.markdown-body p {
margin-top: 0;
margin-bottom: 10px;
}
.markdown-body blockquote {
margin: 0;
padding: 0 1em;
color: #57606a;
border-left: .25em solid #d0d7de;
}
.markdown-body ul,
.markdown-body ol {
margin-top: 0;
margin-bottom: 0;
padding-left: 2em;
}
.markdown-body ol ol,
.markdown-body ul ol {
list-style-type: lower-roman;
}
.markdown-body ul ul ol,
.markdown-body ul ol ol,
.markdown-body ol ul ol,
.markdown-body ol ol ol {
list-style-type: lower-alpha;
}
.markdown-body dd {
margin-left: 0;
}
.markdown-body tt,
.markdown-body code {
font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;
font-size: 12px;
}
.markdown-body pre {
margin-top: 0;
margin-bottom: 0;
font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;
font-size: 12px;
word-wrap: normal;
}
.markdown-body .octicon {
display: inline-block;
overflow: visible !important;
vertical-align: text-bottom;
fill: currentColor;
}
.markdown-body ::placeholder {
color: #6e7781;
opacity: 1;
}
.markdown-body input::-webkit-outer-spin-button,
.markdown-body input::-webkit-inner-spin-button {
margin: 0;
-webkit-appearance: none;
appearance: none;
}
.markdown-body .pl-c {
color: #6e7781;
}
.markdown-body .pl-c1,
.markdown-body .pl-s .pl-v {
color: #0550ae;
}
.markdown-body .pl-e,
.markdown-body .pl-en {
color: #8250df;
}
.markdown-body .pl-smi,
.markdown-body .pl-s .pl-s1 {
color: #24292f;
}
.markdown-body .pl-ent {
color: #116329;
}
.markdown-body .pl-k {
color: #cf222e;
}
.markdown-body .pl-s,
.markdown-body .pl-pds,
.markdown-body .pl-s .pl-pse .pl-s1,
.markdown-body .pl-sr,
.markdown-body .pl-sr .pl-cce,
.markdown-body .pl-sr .pl-sre,
.markdown-body .pl-sr .pl-sra {
color: #0a3069;
}
.markdown-body .pl-v,
.markdown-body .pl-smw {
color: #953800;
}
.markdown-body .pl-bu {
color: #82071e;
}
.markdown-body .pl-ii {
color: #f6f8fa;
background-color: #82071e;
}
.markdown-body .pl-c2 {
color: #f6f8fa;
background-color: #cf222e;
}
.markdown-body .pl-sr .pl-cce {
font-weight: bold;
color: #116329;
}
.markdown-body .pl-ml {
color: #3b2300;
}
.markdown-body .pl-mh,
.markdown-body .pl-mh .pl-en,
.markdown-body .pl-ms {
font-weight: bold;
color: #0550ae;
}
.markdown-body .pl-mi {
font-style: italic;
color: #24292f;
}
.markdown-body .pl-mb {
font-weight: bold;
color: #24292f;
}
.markdown-body .pl-md {
color: #82071e;
background-color: #FFEBE9;
}
.markdown-body .pl-mi1 {
color: #116329;
background-color: #dafbe1;
}
.markdown-body .pl-mc {
color: #953800;
background-color: #ffd8b5;
}
.markdown-body .pl-mi2 {
color: #eaeef2;
background-color: #0550ae;
}
.markdown-body .pl-mdr {
font-weight: bold;
color: #8250df;
}
.markdown-body .pl-ba {
color: #57606a;
}
.markdown-body .pl-sg {
color: #8c959f;
}
.markdown-body .pl-corl {
text-decoration: underline;
color: #0a3069;
}
.markdown-body [data-catalyst] {
display: block;
}
.markdown-body g-emoji {
font-family: "Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
font-size: 1em;
font-style: normal !important;
font-weight: 400;
line-height: 1;
vertical-align: -0.075em;
}
.markdown-body g-emoji img {
width: 1em;
height: 1em;
}
.markdown-body::before {
display: table;
content: "";
}
.markdown-body::after {
display: table;
clear: both;
content: "";
}
.markdown-body>*:first-child {
margin-top: 0 !important;
}
.markdown-body>*:last-child {
margin-bottom: 0 !important;
}
.markdown-body a:not([href]) {
color: inherit;
text-decoration: none;
}
.markdown-body .absent {
color: #cf222e;
}
.markdown-body .anchor {
float: left;
padding-right: 4px;
margin-left: -20px;
line-height: 1;
}
.markdown-body .anchor:focus {
outline: none;
}
.markdown-body p,
.markdown-body blockquote,
.markdown-body ul,
.markdown-body ol,
.markdown-body dl,
.markdown-body table,
.markdown-body pre,
.markdown-body details {
margin-top: 0;
margin-bottom: 16px;
}
.markdown-body blockquote>:first-child {
margin-top: 0;
}
.markdown-body blockquote>:last-child {
margin-bottom: 0;
}
.markdown-body sup>a::before {
content: "[";
}
.markdown-body sup>a::after {
content: "]";
}
.markdown-body h1 .octicon-link,
.markdown-body h2 .octicon-link,
.markdown-body h3 .octicon-link,
.markdown-body h4 .octicon-link,
.markdown-body h5 .octicon-link,
.markdown-body h6 .octicon-link {
color: #24292f;
vertical-align: middle;
visibility: hidden;
}
.markdown-body h1:hover .anchor,
.markdown-body h2:hover .anchor,
.markdown-body h3:hover .anchor,
.markdown-body h4:hover .anchor,
.markdown-body h5:hover .anchor,
.markdown-body h6:hover .anchor {
text-decoration: none;
}
.markdown-body h1:hover .anchor .octicon-link,
.markdown-body h2:hover .anchor .octicon-link,
.markdown-body h3:hover .anchor .octicon-link,
.markdown-body h4:hover .anchor .octicon-link,
.markdown-body h5:hover .anchor .octicon-link,
.markdown-body h6:hover .anchor .octicon-link {
visibility: visible;
}
.markdown-body h1 tt,
.markdown-body h1 code,
.markdown-body h2 tt,
.markdown-body h2 code,
.markdown-body h3 tt,
.markdown-body h3 code,
.markdown-body h4 tt,
.markdown-body h4 code,
.markdown-body h5 tt,
.markdown-body h5 code,
.markdown-body h6 tt,
.markdown-body h6 code {
padding: 0 .2em;
font-size: inherit;
}
.markdown-body ul.no-list,
.markdown-body ol.no-list {
padding: 0;
list-style-type: none;
}
.markdown-body ol[type="1"] {
list-style-type: decimal;
}
.markdown-body ol[type=a] {
list-style-type: lower-alpha;
}
.markdown-body ol[type=i] {
list-style-type: lower-roman;
}
.markdown-body div>ol:not([type]) {
list-style-type: decimal;
}
.markdown-body ul ul,
.markdown-body ul ol,
.markdown-body ol ol,
.markdown-body ol ul {
margin-top: 0;
margin-bottom: 0;
}
.markdown-body li>p {
margin-top: 16px;
}
.markdown-body li+li {
margin-top: .25em;
}
.markdown-body dl {
padding: 0;
}
.markdown-body dl dt {
padding: 0;
margin-top: 16px;
font-size: 1em;
font-style: italic;
font-weight: 600;
}
.markdown-body dl dd {
padding: 0 16px;
margin-bottom: 16px;
}
.markdown-body table th {
font-weight: 600;
}
.markdown-body table th,
.markdown-body table td {
padding: 6px 13px;
border: 1px solid #d0d7de;
}
.markdown-body table tr {
background-color: #ffffff;
border-top: 1px solid hsla(210,18%,87%,1);
}
.markdown-body table tr:nth-child(2n) {
background-color: #f6f8fa;
}
.markdown-body table img {
background-color: transparent;
}
.markdown-body img[align=right] {
padding-left: 20px;
}
.markdown-body img[align=left] {
padding-right: 20px;
}
.markdown-body .emoji {
max-width: none;
vertical-align: text-top;
background-color: transparent;
}
.markdown-body span.frame {
display: block;
overflow: hidden;
}
.markdown-body span.frame>span {
display: block;
float: left;
width: auto;
padding: 7px;
margin: 13px 0 0;
overflow: hidden;
border: 1px solid #d0d7de;
}
.markdown-body span.frame span img {
display: block;
float: left;
}
.markdown-body span.frame span span {
display: block;
padding: 5px 0 0;
clear: both;
color: #24292f;
}
.markdown-body span.align-center {
display: block;
overflow: hidden;
clear: both;
}
.markdown-body span.align-center>span {
display: block;
margin: 13px auto 0;
overflow: hidden;
text-align: center;
}
.markdown-body span.align-center span img {
margin: 0 auto;
text-align: center;
}
.markdown-body span.align-right {
display: block;
overflow: hidden;
clear: both;
}
.markdown-body span.align-right>span {
display: block;
margin: 13px 0 0;
overflow: hidden;
text-align: right;
}
.markdown-body span.align-right span img {
margin: 0;
text-align: right;
}
.markdown-body span.float-left {
display: block;
float: left;
margin-right: 13px;
overflow: hidden;
}
.markdown-body span.float-left span {
margin: 13px 0 0;
}
.markdown-body span.float-right {
display: block;
float: right;
margin-left: 13px;
overflow: hidden;
}
.markdown-body span.float-right>span {
display: block;
margin: 13px auto 0;
overflow: hidden;
text-align: right;
}
.markdown-body code,
.markdown-body tt {
padding: .2em .4em;
margin: 0;
font-size: 85%;
background-color: rgba(175,184,193,0.2);
border-radius: 6px;
}
.markdown-body code br,
.markdown-body tt br {
display: none;
}
.markdown-body del code {
text-decoration: inherit;
}
.markdown-body pre code {
font-size: 100%;
}
.markdown-body pre>code {
padding: 0;
margin: 0;
word-break: normal;
white-space: pre;
background: transparent;
border: 0;
}
.markdown-body .highlight {
margin-bottom: 16px;
}
.markdown-body .highlight pre {
margin-bottom: 0;
word-break: normal;
}
.markdown-body .highlight pre,
.markdown-body pre {
padding: 16px;
overflow: auto;
font-size: 85%;
line-height: 1.45;
background-color: #f6f8fa;
border-radius: 6px;
}
.markdown-body pre code,
.markdown-body pre tt {
display: inline;
max-width: auto;
padding: 0;
margin: 0;
overflow: visible;
line-height: inherit;
word-wrap: normal;
background-color: transparent;
border: 0;
}
.markdown-body .csv-data td,
.markdown-body .csv-data th {
padding: 5px;
overflow: hidden;
font-size: 12px;
line-height: 1;
text-align: left;
white-space: nowrap;
}
.markdown-body .csv-data .blob-num {
padding: 10px 8px 9px;
text-align: right;
background: #ffffff;
border: 0;
}
.markdown-body .csv-data tr {
border-top: 0;
}
.markdown-body .csv-data th {
font-weight: 600;
background: #f6f8fa;
border-top: 0;
}
.markdown-body .footnotes {
font-size: 12px;
color: #57606a;
border-top: 1px solid #d0d7de;
}
.markdown-body .footnotes ol {
padding-left: 16px;
}
.markdown-body .footnotes li {
position: relative;
}
.markdown-body .footnotes li:target::before {
position: absolute;
top: -8px;
right: -8px;
bottom: -8px;
left: -24px;
pointer-events: none;
content: "";
border: 2px solid #0969da;
border-radius: 6px;
}
.markdown-body .footnotes li:target {
color: #24292f;
}
.markdown-body .footnotes .data-footnote-backref g-emoji {
font-family: monospace;
}
.markdown-body .task-list-item {
list-style-type: none;
}
.markdown-body .task-list-item label {
font-weight: 400;
}
.markdown-body .task-list-item.enabled label {
cursor: pointer;
}
.markdown-body .task-list-item+.task-list-item {
margin-top: 3px;
}
.markdown-body .task-list-item .handle {
display: none;
}
.markdown-body .task-list-item-checkbox {
margin: 0 .2em .25em -1.6em;
vertical-align: middle;
}
.markdown-body .contains-task-list:dir(rtl) .task-list-item-checkbox {
margin: 0 -1.6em .25em .2em;
}
.markdown-body ::-webkit-calendar-picker-indicator {
filter: invert(50%);
}

569
grid.css Normal 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; }

76
header.php Normal file
View File

@ -0,0 +1,76 @@
<?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 href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-Zenh87qX5JnK2Jl0vWa8Ck2rdkQ2Bzep5IDxbcnCeuOxjzrPF/et3URy9Bv1WTRi" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-OERcA2EqjJCMA+/3y+gxIOqMEjwtxJY7qPCqsdltbNJuaOe923+mo//f6V8Qbsw3" crossorigin="anonymous"></script>
<script src="<?php $this->options->themeUrl('prism.js'); ?>"></script>
<link rel="stylesheet" href="<?php $this->options->themeUrl('github-markdown.css'); ?>">
<link rel="stylesheet" href="<?php $this->options->themeUrl('grid.css'); ?>">
<link rel="stylesheet" href="<?php $this->options->themeUrl('style.css'); ?>">
<link rel="stylesheet" href="<?php $this->options->themeUrl('prism.css'); ?>">
<!-- 通过自有函数输出HTML头部信息 -->
<?php $this->header(); ?>
</head>
<body>
<header id="header" class="clearfix">
<nav class="navbar navbar-expand-lg">
<div class="container">
<a class="navbar-brand" href="<?php $this->options->siteUrl(); ?>"><?php $this->options->title() ?></a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a<?php if ($this->is('index')): ?> class="nav-link active" <?php else: ?> class="nav-link" <?php endif; ?> aria-current="page" href="<?php $this->options->siteUrl(); ?>"><?php _e('首页'); ?></a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
分类
</a>
<ul class="dropdown-menu">
<?php $this->widget('Widget_Metas_Category_List')
->parse('<li><a class="dropdown-item" href="{permalink}">{name} ({count}篇)</a> </li>'); ?>
</ul>
</li>
<?php \Widget\Contents\Page\Rows::alloc()->to($pages); ?>
<?php while ($pages->next()): ?>
<li class="nav-item">
<a<?php if ($this->is('page', $pages->slug)): ?> class="nav-link active" <?php else: ?> class="nav-link" <?php endif; ?> aria-current="page" href="<?php $pages->permalink(); ?>"><?php $pages->title(); ?></a>
</li>
<?php endwhile; ?>
</ul>
<form class="d-flex" method="post" action="<?php $this->options->siteUrl(); ?>" role="search">
<input class="form-control me-2" name="s" type="search" placeholder="<?php _e('输入关键字搜索'); ?>" aria-label="Search">
<button class="btn btn-outline-success" type="submit">Search</button>
</form>
</div>
</div>
</nav>
</header><!-- end #header -->
<div id="body">
<div class="container">
<div class="row">

BIN
img/head.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

BIN
img/icon-search.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 303 B

BIN
img/icon-search@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 437 B

44
index.php Normal file
View File

@ -0,0 +1,44 @@
<?php
/**
* 基于typecho 1.2 默认主题修改
*
* @package yuhangq.com
* @author YuhangQ
* @version 0.1
* @link https://yuhangq.com
*/
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
$this->need('header.php');
?>
<?php $this->need('sidebar.php'); ?>
<div class="col-mb-12 col-9" id="main" role="main">
<?php while ($this->next()): ?>
<article class="post" itemscope itemtype="http://schema.org/BlogPosting">
<h2 class="post-title" itemprop="name headline">
<a itemprop="url"
href="<?php $this->permalink() ?>"><?php $this->title() ?></a>
</h2>
<ul class="post-meta">
<li><?php _e('时间: '); ?>
<time datetime="<?php $this->date('c'); ?>" itemprop="datePublished"><?php $this->date(); ?></time>
</li>
<li><?php _e('分类: '); ?><?php $this->category(','); ?></li>
<li itemprop="interactionCount">
<a itemprop="discussionUrl"
href="<?php $this->permalink() ?>#comments"><?php $this->commentsNum('评论', '1 条评论', '%d 条评论'); ?></a>
</li>
</ul>
<div class="post-content" itemprop="articleBody">
<?php $this->excerpt(200, '...'); ?>
</div>
</article>
<?php endwhile; ?>
<?php $this->pageNav('&laquo; 前一页', '后一页 &raquo;'); ?>
</div><!-- end #main-->
<?php $this->need('footer.php'); ?>

20
page.php Normal file
View File

@ -0,0 +1,20 @@
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('header.php'); ?>
<?php $this->need('sidebar.php'); ?>
<div class="col-mb-12 col-9" id="main" role="main">
<article class="post" itemscope itemtype="http://schema.org/BlogPosting">
<h1 class="post-title" itemprop="name headline">
<a itemprop="url"
href="<?php $this->permalink() ?>"><?php $this->title() ?></a>
</h1>
<div class="post-content markdown-body" itemprop="articleBody">
<?php $this->content(); ?>
</div>
</article>
<?php $this->need('comments.php'); ?>
</div><!-- end #main-->
<?php $this->need('footer.php'); ?>

33
post.php Normal file
View File

@ -0,0 +1,33 @@
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('header.php'); ?>
<?php $this->need('sidebar.php'); ?>
<div class="col-mb-12 col-9" id="main" role="main">
<article class="post" itemscope itemtype="http://schema.org/BlogPosting">
<h1 class="post-title" itemprop="name headline">
<a itemprop="url"
href="<?php $this->permalink() ?>"><?php $this->title() ?></a>
</h1>
<ul class="post-meta">
<li><?php _e('时间: '); ?>
<time datetime="<?php $this->date('c'); ?>" itemprop="datePublished"><?php $this->date(); ?></time>
</li>
<li><?php _e('分类: '); ?><?php $this->category(','); ?></li>
</ul>
<div class="post-content markdown-body" 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', '没有了'); ?></li>
<li>下一篇: <?php $this->theNext('%s', '没有了'); ?></li>
</ul>
</div><!-- end #main-->
<?php $this->need('footer.php'); ?>

163
prism.css Normal file
View File

@ -0,0 +1,163 @@
/*
Prism.js GitHub-like theme derived from
https://www.samclarke.com/assets/migrating-to-hugo/github.html
*/
code[class*="language-"], pre[class*="language-"] {
color: #333;
background: none;
font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.4;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
/* Code blocks */
pre[class*="language-"] {
padding: .8em;
overflow: auto;
border: 1px solid #ddd;
border-radius: 3px;
background: #fff;
}
/* Inline code */
:not(pre)>code[class*="language-"] {
padding: .1em;
border-radius: .3em;
white-space: normal;
background: #f5f5f5;
}
.token.comment, .token.blockquote {
color: #969896;
}
.token.cdata {
color: #183691;
}
.token.doctype, .token.punctuation, .token.variable, .token.macro.property {
color: #333;
}
.token.operator, .token.important, .token.keyword, .token.rule, .token.builtin {
color: #a71d5d;
}
.token.string, .token.url, .token.regex, .token.attr-value {
color: #183691;
}
.token.property, .token.number, .token.boolean, .token.entity, .token.atrule, .token.constant, .token.symbol, .token.command, .token.code {
color: #0086b3;
}
.token.tag, .token.selector, .token.prolog {
color: #63a35c;
}
.token.function, .token.namespace, .token.pseudo-element, .token.class, .token.class-name, .token.pseudo-class, .token.id, .token.url-reference .token.variable, .token.attr-name {
color: #795da3;
}
.token.entity {
cursor: help;
}
.token.title, .token.title .token.punctuation {
font-weight: bold;
color: #1d3e81;
}
.token.list {
color: #ed6a43;
}
.token.inserted {
background-color: #eaffea;
color: #55a532;
}
.token.deleted {
background-color: #ffecec;
color: #bd2c00;
}
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}
/* JSON */
.language-json .token.property {
color: #183691;
}
.language-markup .token.tag .token.punctuation {
color: #333;
}
/* CSS */
code.language-css, .language-css .token.function {
color: #0086b3;
}
/* YAML */
.language-yaml .token.atrule {
color: #63a35c;
}
code.language-yaml {
color: #183691;
}
/* Ruby */
.language-ruby .token.function {
color: #333;
}
/* Markdown */
.language-markdown .token.url {
color: #795da3;
}
/* Makefile */
.language-makefile .token.symbol {
color: #795da3;
}
.language-makefile .token.variable {
color: #183691;
}
.language-makefile .token.builtin {
color: #0086b3;
}
/* Bash */
.language-bash .token.keyword {
color: #0086b3;
}

300
prism.js Normal file

File diff suppressed because one or more lines are too long

BIN
screenshot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

62
sidebar.php Normal file
View File

@ -0,0 +1,62 @@
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<div class="col-mb-12 col-3 kit-hidden-tb" id="secondary" role="complementary">
<img class="head-pic" src="<?php $this->options->themeUrl('img/head.jpg'); ?>"></img>
<h1></h1>
<h5>YuhangQ</h5>
<p>A student of Jilin University. Like C/C++、SAT、EDA</p>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-envelope-fill" viewBox="0 0 16 16">
<path d="M.05 3.555A2 2 0 0 1 2 2h12a2 2 0 0 1 1.95 1.555L8 8.414.05 3.555ZM0 4.697v7.104l5.803-3.558L0 4.697ZM6.761 8.83l-6.57 4.027A2 2 0 0 0 2 14h12a2 2 0 0 0 1.808-1.144l-6.57-4.027L8 9.586l-1.239-.757Zm3.436-.586L16 11.801V4.697l-5.803 3.546Z"/>
</svg>
i@yuhangq.com
<br />
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-github" viewBox="0 0 16 16">
<path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8z"/>
</svg>
<a href="https://github.com/YuhangQ">YuhangQ</a>
<hr />
<?php if (!empty($this->options->sidebarBlock) && in_array('ShowRecentComments', $this->options->sidebarBlock)): ?>
<section class="widget">
<h5 class="widget-title"><?php _e('最近回复'); ?></h5>
<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('ShowOther', $this->options->sidebarBlock)): ?>
<section class="widget">
<h5 class="widget-title"><?php _e('其它'); ?></h5>
<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="http://www.typecho.org">Typecho</a></li>
</ul>
</section>
<?php endif; ?>
</div><!-- end #sidebar -->

456
style.css Normal file
View File

@ -0,0 +1,456 @@
/* ------------------------------------
* 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-size: 87.5%; */
}
.head-pic {
height: 150px;
width: 150px;
border: 2px solid #F3F3F3; /*border: 1px solid #000000;*/
-webkit-border-radius: 50%;
border-radius: 50%
}
a {
color: rgb(54, 54, 54) !important;
text-decoration: none !important;
}
a:hover, a:active {
color: rgb(54, 54, 54)!important;
text-decoration: underline !important;
}
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: 800px;
}
pre code {
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%;
-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;*/
background-color: rgb(243, 248, 252);
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;
}
/* 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%;
}
/* ------------------
* 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;
}
.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) {
#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; }