mirror of
https://github.com/typecho/typecho.git
synced 2025-03-19 01:19:40 +01:00
修改表单
语意化结构优化
This commit is contained in:
parent
c617578f48
commit
1fe96bb708
@ -7,7 +7,7 @@
|
||||
<h2 class="post-title"><a href="<?php $this->permalink() ?>"><?php $this->title() ?></a></h2>
|
||||
<div class="post-meta">
|
||||
<span><?php _e('作者:'); ?><?php $this->author(); ?></span>
|
||||
<span><?php _e('发布时间:'); ?><?php $this->date('F j, Y'); ?></span>
|
||||
<span><?php _e('时间:'); ?><?php $this->date('F j, Y'); ?></span>
|
||||
<?php _e('分类:'); ?><?php $this->category(','); ?>
|
||||
</div>
|
||||
<div class="post-content">
|
||||
@ -21,7 +21,7 @@
|
||||
</article>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php $this->pageNav(); ?>
|
||||
<?php $this->pageNav('« 前一页', '后一页 »'); ?>
|
||||
</div><!-- end #main -->
|
||||
|
||||
<?php $this->need('sidebar.php'); ?>
|
||||
|
@ -1,9 +1,9 @@
|
||||
<div id="comments">
|
||||
<?php $this->comments()->to($comments); ?>
|
||||
<?php if ($comments->have()): ?>
|
||||
<h4><?php $this->commentsNum(_t('当前暂无评论'), _t('仅有一条评论'), _t('已有 %d 条评论')); ?> »</h4>
|
||||
<h3><?php $this->commentsNum(_t('暂无评论'), _t('仅有 1 条评论'), _t('已有 %d 条评论')); ?></h3>
|
||||
|
||||
<?php $comments->pageNav(); ?>
|
||||
<?php $comments->pageNav('« 前一页', '后一页 »'); ?>
|
||||
|
||||
<?php $comments->listComments(); ?>
|
||||
|
||||
@ -16,10 +16,10 @@
|
||||
<?php $comments->cancelReply(); ?>
|
||||
</div>
|
||||
|
||||
<h4 id="response"><?php _e('添加新评论'); ?> »</h4>
|
||||
<h3 id="response"><?php _e('添加新评论'); ?></h3>
|
||||
<form method="post" action="<?php $this->commentUrl() ?>" id="comment-form">
|
||||
<?php if($this->user->hasLogin()): ?>
|
||||
<p>Logged in as <a href="<?php $this->options->profileUrl(); ?>"><?php $this->user->screenName(); ?></a>. <a href="<?php $this->options->logoutUrl(); ?>" title="Logout"><?php _e('退出'); ?> »</a></p>
|
||||
<p><?php _e('登录身份:'); ?><a href="<?php $this->options->profileUrl(); ?>"><?php $this->user->screenName(); ?></a>. <a href="<?php $this->options->logoutUrl(); ?>" title="Logout"><?php _e('退出'); ?> »</a></p>
|
||||
<?php else: ?>
|
||||
<p>
|
||||
<label for="author"><?php _e('称呼'); ?><span class="required">*</span></label>
|
||||
@ -27,15 +27,15 @@
|
||||
</p>
|
||||
<p>
|
||||
<label for="mail"><?php _e('电子邮件'); ?><?php if ($this->options->commentsRequireMail): ?><span class="required">*</span><?php endif; ?></label>
|
||||
<input type="text" name="mail" id="mail" class="text" size="15" value="<?php $this->remember('mail'); ?>" />
|
||||
<input type="email" name="mail" id="mail" class="text" size="15" value="<?php $this->remember('mail'); ?>" />
|
||||
</p>
|
||||
<p>
|
||||
<label for="url"><?php _e('网站'); ?><?php if ($this->options->commentsRequireURL): ?><span class="required">*</span><?php endif; ?></label>
|
||||
<input type="text" name="url" id="url" class="text" size="15" value="<?php $this->remember('url'); ?>" />
|
||||
<input type="url" name="url" id="url" class="text" size="15" value="<?php $this->remember('url'); ?>" />
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
<p><textarea rows="5" cols="50" name="text" class="textarea"><?php $this->remember('text'); ?></textarea></p>
|
||||
<p><input type="submit" value="<?php _e('提交评论'); ?>" class="submit" /></p>
|
||||
<p><textarea rows="8" cols="50" name="text" class="textarea"><?php $this->remember('text'); ?></textarea></p>
|
||||
<p><button type="submit" class="submit"><?php _e('提交评论'); ?></button></p>
|
||||
</form>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
|
@ -27,7 +27,7 @@
|
||||
</article>
|
||||
<?php endwhile; ?>
|
||||
|
||||
<?php $this->pageNav(); ?>
|
||||
<?php $this->pageNav('« 前一页', '后一页 »'); ?>
|
||||
</div><!-- end #main-->
|
||||
|
||||
<?php $this->need('sidebar.php'); ?>
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
<div class="col-mb-12 col-8" id="main">
|
||||
<article class="post">
|
||||
<h2 class="post-title"><a href="<?php $this->permalink() ?>"><?php $this->title() ?></a></h2>
|
||||
<h1 class="post-title"><a href="<?php $this->permalink() ?>"><?php $this->title() ?></a></h1>
|
||||
<div class="post-content">
|
||||
<?php $this->content(); ?>
|
||||
</div>
|
||||
|
@ -2,16 +2,16 @@
|
||||
|
||||
<div class="col-mb-12 col-8" id="main">
|
||||
<article class="post">
|
||||
<h2 class="post-title"><a href="<?php $this->permalink() ?>"><?php $this->title() ?></a></h2>
|
||||
<h1 class="post-title"><a href="<?php $this->permalink() ?>"><?php $this->title() ?></a></h1>
|
||||
<div class="post-meta">
|
||||
<span><?php _e('作者:'); ?><?php $this->author(); ?></span>
|
||||
<span><?php _e('发布时间:'); ?><?php $this->date('F j, Y'); ?></span>
|
||||
<span><?php _e('时间:'); ?><?php $this->date('F j, Y'); ?></span>
|
||||
<?php _e('分类:'); ?><?php $this->category(','); ?>
|
||||
</div>
|
||||
<div class="post-content">
|
||||
<?php $this->content(); ?>
|
||||
</div>
|
||||
<div class="tags"><?php _e('标签'); ?>: <?php $this->tags(', ', true, 'none'); ?></div>
|
||||
<p class="tags"><?php _e('标签:'); ?><?php $this->tags(', ', true, 'none'); ?></p>
|
||||
</article>
|
||||
|
||||
<?php $this->need('comments.php'); ?>
|
||||
|
@ -9,17 +9,19 @@
|
||||
</section>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (0): ?>
|
||||
<?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 $this->widget('Widget_Comments_Recent')->to($comments); ?>
|
||||
<?php while($comments->next()): ?>
|
||||
<li><a href="<?php $comments->permalink(); ?>"><?php $comments->author(false); ?></a>: <?php $comments->excerpt(50, '...'); ?></li>
|
||||
<li><a href="<?php $comments->permalink(); ?>"><?php $comments->author(false); ?></a>:<?php $comments->excerpt(35, '...'); ?></li>
|
||||
<?php endwhile; ?>
|
||||
</ul>
|
||||
</section>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (empty($this->options->sidebarBlock) || in_array('ShowCategory', $this->options->sidebarBlock)): ?>
|
||||
<section class="widget">
|
||||
|
@ -39,7 +39,8 @@ pre, code {
|
||||
font-family: Menlo, Monaco, Consolas, "Lucida Console", "Courier New", monospace;
|
||||
}
|
||||
|
||||
input[type="text"], input[type="email"], input[type="url"] {
|
||||
input[type="text"], input[type="email"], input[type="url"],
|
||||
textarea {
|
||||
padding: 5px;
|
||||
border: 1px solid #E3E3E0;
|
||||
width: 100%;
|
||||
@ -49,6 +50,9 @@ input[type="text"], input[type="email"], input[type="url"] {
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
textarea {
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
/* ------------------
|
||||
* header
|
||||
@ -115,6 +119,8 @@ input[type="text"], input[type="email"], input[type="url"] {
|
||||
border-bottom: 1px solid #E9E9E6;
|
||||
}
|
||||
.post-title {
|
||||
margin: .83em 0;
|
||||
font-size: 1.5em;
|
||||
}
|
||||
.post-meta {
|
||||
margin-top: -0.5em;
|
||||
@ -134,6 +140,28 @@ input[type="text"], input[type="email"], input[type="url"] {
|
||||
}
|
||||
|
||||
/* = pages nav */
|
||||
|
||||
.page-navigator {
|
||||
list-style: none;
|
||||
margin: 30px 0 0;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
}
|
||||
.page-navigator li {
|
||||
display: inline;
|
||||
margin: 0 10px;
|
||||
}
|
||||
.page-navigator a {
|
||||
display: inline-block;
|
||||
padding: 0 5px;
|
||||
height: 24px;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.page-navigator .current a {
|
||||
color: #444;
|
||||
}
|
||||
|
||||
/* ------------------
|
||||
* comment list
|
||||
* --------------- */
|
||||
@ -176,7 +204,7 @@ ol.comment-list li .comment-reply a {
|
||||
border: none;
|
||||
color: #aaa;
|
||||
}
|
||||
ol.comment-list li .comment-reply a: hover {
|
||||
ol.comment-list li .comment-reply a:hover {
|
||||
color: #444;
|
||||
}
|
||||
.comment-meta {
|
||||
@ -206,7 +234,6 @@ ol.comment-list li .respond {
|
||||
padding-top: 10px;
|
||||
}
|
||||
#comment-form {
|
||||
padding-right: 8px;
|
||||
}
|
||||
.respond .cancel-comment-reply {
|
||||
float: right;
|
||||
@ -215,7 +242,7 @@ ol.comment-list li .respond {
|
||||
border: none;
|
||||
color: #aaa;
|
||||
}
|
||||
.respond .cancel-comment-reply a: hover {
|
||||
.respond .cancel-comment-reply a:hover {
|
||||
color: #444;
|
||||
}
|
||||
#comment-form label {
|
||||
@ -226,20 +253,14 @@ ol.comment-list li .respond {
|
||||
color: #C04E37;
|
||||
padding-left: 5px;
|
||||
}
|
||||
#comment-form .text {
|
||||
width: 100%;
|
||||
margin-right: 15px;
|
||||
}
|
||||
#comment-form textarea {
|
||||
width: 100%;
|
||||
height: 180px;
|
||||
}
|
||||
|
||||
/* ------------------
|
||||
* sidebar
|
||||
* --------------- */
|
||||
#sidebar {
|
||||
padding-top: 20px;
|
||||
word-break: break-all;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
.widget {
|
||||
margin-bottom: 30px;
|
||||
@ -265,7 +286,7 @@ ol.comment-list li .respond {
|
||||
padding-bottom: 30px;
|
||||
line-height: 1.5;
|
||||
text-align: center;
|
||||
color: #666;
|
||||
color: #888;
|
||||
}
|
||||
#footer a {
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user