parent
f23e6fad65
commit
3cc50df415
|
@ -96,7 +96,7 @@ function threadedComments($comments, $options) {
|
|||
</div>
|
||||
<div class="comment--meta">
|
||||
<div class="comment--author"><?php echo $comments->author; ?><span class="dot"></span>
|
||||
<div class="comment--time"><?php $comments->date('Y-m-d'); ?></div>
|
||||
<div class="comment--time"><?php $comments->date('Y-m-d H:i'); ?></div>
|
||||
<span class="comment-reply-link u-cursorPointer">
|
||||
<?php $comments->reply('<svg viewBox="0 0 24 24" width="14" height="14" aria-hidden="true" class="" ><g><path d="M12 3.786c-4.556 0-8.25 3.694-8.25 8.25s3.694 8.25 8.25 8.25c1.595 0 3.081-.451 4.341-1.233l1.054 1.7c-1.568.972-3.418 1.534-5.395 1.534-5.661 0-10.25-4.589-10.25-10.25S6.339 1.786 12 1.786s10.25 4.589 10.25 10.25c0 .901-.21 1.77-.452 2.477-.592 1.731-2.343 2.477-3.917 2.334-1.242-.113-2.307-.74-3.013-1.647-.961 1.253-2.45 2.011-4.092 1.78-2.581-.363-4.127-2.971-3.76-5.578.366-2.606 2.571-4.688 5.152-4.325 1.019.143 1.877.637 2.519 1.342l1.803.258-.507 3.549c-.187 1.31.761 2.509 2.079 2.629.915.083 1.627-.356 1.843-.99.2-.585.345-1.224.345-1.83 0-4.556-3.694-8.25-8.25-8.25zm-.111 5.274c-1.247-.175-2.645.854-2.893 2.623-.249 1.769.811 3.143 2.058 3.319 1.247.175 2.645-.854 2.893-2.623.249-1.769-.811-3.144-2.058-3.319z"></path></g></svg>'); ?>
|
||||
</span>
|
||||
|
|
|
@ -38,8 +38,12 @@ function themeConfig($form) {
|
|||
$form->addInput($showProfile);
|
||||
$showallwords = new Typecho_Widget_Helper_Form_Element_Radio('showallwords',
|
||||
array('0'=> _t('否'), '1'=> _t('是')),
|
||||
'0', _t('是否显示归档字数统计'), _t('选择“是”将归档页面显示全站总字数。'));
|
||||
'0', _t('是否显示归档字数统计'), _t('选择“是”将在归档页面显示全站总字数。'));
|
||||
$form->addInput($showallwords);
|
||||
$showrelated = new Typecho_Widget_Helper_Form_Element_Radio('showrelated',
|
||||
array('0'=> _t('否'), '1'=> _t('是')),
|
||||
'0', _t('是否显示相关文章'), _t('选择“是”将在文章页面显示相关文章。'));
|
||||
$form->addInput($showrelated);
|
||||
}
|
||||
function get_post_view($archive) {
|
||||
$cid = $archive->cid;
|
||||
|
|
5
post.php
5
post.php
|
@ -68,6 +68,11 @@
|
|||
<?php if ($this->options->showProfile): ?>
|
||||
<?php $this->need('profile.php'); ?>
|
||||
<?php endif; ?>
|
||||
<!-- 相关文章-->
|
||||
<?php if ($this->options->showrelated): ?>
|
||||
<?php $this->need('related.php'); ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<!-- 判断如果禁止评论则不显示评论的div -->
|
||||
<?php if ($this->allow('comment')): ?>
|
||||
<?php $this->need('comments.php'); ?>
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
<div class="related--content">
|
||||
<h3 class="related--posts__title">相关文章</h3>
|
||||
<div class="post--single__related">
|
||||
<?php $this->related(6)->to($relatedPosts); ?>
|
||||
|
||||
<?php while ($relatedPosts->next()): ?>
|
||||
<div class="post--single__related__item">
|
||||
<a href="<?php $relatedPosts->permalink(); ?>">
|
||||
<div class="post--single__related__item__img">
|
||||
</div>
|
||||
<div class="post--single__related__item__title">
|
||||
<?php $relatedPosts->title(25); ?>
|
||||
</div>
|
||||
<div class="meta">
|
||||
<time class="humane--time"><?php $relatedPosts->date('Y-m-d'); ?></time>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<?php endwhile; ?>
|
||||
</div>
|
||||
</div>
|
Loading…
Reference in New Issue