mirror of
https://github.com/typecho/typecho.git
synced 2025-04-21 02:01:52 +02:00
improve: post detail layout
This commit is contained in:
parent
fef2ec2377
commit
d7465f1cff
@ -2,7 +2,7 @@
|
||||
<div id="comments">
|
||||
<?php $this->comments()->to($comments); ?>
|
||||
<?php if ($comments->have()): ?>
|
||||
<h2 class="text-center"><?php $this->commentsNum(_t('暂无评论'), _t('仅有一条评论'), _t('已有 %d 条评论')); ?></h2>
|
||||
<h2 class="text-center"><?php $this->commentsNum(_t('暂无评论'), _t('1 条评论'), _t('%d 条评论')); ?></h2>
|
||||
|
||||
<?php $comments->listComments(array(
|
||||
'commentStatus' => _t('你的评论正等待审核'),
|
||||
@ -32,7 +32,7 @@
|
||||
<div class="grid">
|
||||
<input type="text" placeholder="<?php _e('名字'); ?>" name="author" id="author" value="<?php $this->remember('author'); ?>" required/>
|
||||
<input type="email" placeholder="<?php _e('Email'); ?>" name="mail" id="mail" value="<?php $this->remember('mail'); ?>"<?php if ($this->options->commentsRequireMail): ?> required<?php endif; ?> />
|
||||
<input type="url" placeholder="<?php _e('网站'); ?><?php if (!($this->options->commentsRequireUrl)): ?><?php _e('(选填)'); ?><?php endif; ?>" name="url" id="url" placeholder="<?php _e('https://'); ?>" value="<?php $this->remember('url'); ?>"<?php if ($this->options->commentsRequireUrl): ?> required<?php endif; ?> />
|
||||
<input type="url" placeholder="<?php _e('网站 http://'); ?><?php if (!($this->options->commentsRequireUrl)): ?><?php _e('(选填)'); ?><?php endif; ?>" name="url" id="url" placeholder="<?php _e('https://'); ?>" value="<?php $this->remember('url'); ?>"<?php if ($this->options->commentsRequireUrl): ?> required<?php endif; ?> />
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<button type="submit"><?php _e('提交评论'); ?></button>
|
||||
|
@ -31,7 +31,7 @@ function postMeta(
|
||||
<ul class="entry-meta list-inline text-muted">
|
||||
<li class="feather-calendar"><time datetime="<?php $archive->date('c'); ?>" itemprop="datePublished"><?php $archive->date(); ?></time></li>
|
||||
<li class="feather-folder"><?php $archive->category(', '); ?></li>
|
||||
<li class="feather-message"><a href="<?php $archive->permalink() ?>#comments" itemprop="discussionUrl"><?php $archive->commentsNum(_t('暂无评论'), _t('仅有一条评论'), _t('已有 %d 条评论')); ?></a></li>
|
||||
<li class="feather-message"><a href="<?php $archive->permalink() ?>#comments" itemprop="discussionUrl"><?php $archive->commentsNum(_t('暂无评论'), _t('1 条评论'), _t('%d 条评论')); ?></a></li>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</header>
|
||||
|
@ -11,20 +11,16 @@
|
||||
<p itemprop="keywords"><?php _e('标签'); ?>:<?php $this->tags(', ', true, _t('无')); ?></p>
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
|
||||
<div class="grid post-next">
|
||||
<div>
|
||||
<div class="text-muted">« <?php _e('上一篇'); ?></div>
|
||||
<?php $this->thePrev('%s', _t('没有了')); ?>
|
||||
<div class="grid post-next">
|
||||
<div>
|
||||
← <?php $this->thePrev('%s', _t('没有了')); ?>
|
||||
</div>
|
||||
<div class="text-end">
|
||||
<?php $this->theNext('%s', _t('没有了')); ?> →
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-end">
|
||||
<div class="text-muted"><?php _e('下一篇'); ?> »</div>
|
||||
<?php $this->theNext('%s', _t('没有了')); ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-thin">
|
||||
<?php $this->need('comments.php'); ?>
|
||||
</div>
|
||||
</main>
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,6 +1,10 @@
|
||||
@import "pico";
|
||||
|
||||
// Global Set
|
||||
:root {
|
||||
--border-radius: 0.5rem;
|
||||
}
|
||||
|
||||
body {
|
||||
cursor: auto;
|
||||
}
|
||||
@ -255,13 +259,11 @@ h1, h2, h3, h4, h5 { line-height: 1.25; }
|
||||
|
||||
.post-next {
|
||||
border-top: 1px solid var(--muted-border-color);
|
||||
border-bottom: 1px solid var(--muted-border-color);
|
||||
padding: calc(var(--spacing) * 1.5) 0;
|
||||
margin: var(--block-spacing-vertical) 0;
|
||||
|
||||
a {
|
||||
color: var(--h5-color);
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
|
||||
@ -290,10 +292,10 @@ h1, h2, h3, h4, h5 { line-height: 1.25; }
|
||||
}
|
||||
|
||||
.comment-by-author > .comment-author::after {
|
||||
content: "AU";
|
||||
content: "OP";
|
||||
margin-left: .25rem;
|
||||
color: var(--muted-color);
|
||||
padding: 0 var(--border-radius);
|
||||
padding: 0 .375rem;
|
||||
border: 1px solid var(--muted-color);
|
||||
font-size: .75rem;
|
||||
border-radius: var(--border-radius);
|
||||
@ -346,7 +348,7 @@ h1, h2, h3, h4, h5 { line-height: 1.25; }
|
||||
}
|
||||
|
||||
#response {
|
||||
margin: 0 0 calc(var(--spacing) / 2);
|
||||
margin-bottom: var(--spacing);
|
||||
}
|
||||
|
||||
#cancel-comment-reply-link {
|
||||
|
Loading…
x
Reference in New Issue
Block a user