diff options
| author | 阔落 <45323514+BigCoke233@users.noreply.github.com> | 2019-03-24 18:02:47 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-24 18:02:47 +0800 |
| commit | 4353a0f3f12ca253285e3edf9f2206e526f112ce (patch) | |
| tree | efd983701eeba6622028563048927aa848d239e8 /includes/comments.php | |
| parent | 107e63005d013dd3caea541c921dcf8be415014e (diff) | |
Add files via upload
Diffstat (limited to 'includes/comments.php')
| -rw-r--r-- | includes/comments.php | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/includes/comments.php b/includes/comments.php new file mode 100644 index 0000000..3facb2a --- /dev/null +++ b/includes/comments.php @@ -0,0 +1,44 @@ +<br />
+<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
+<div id="comments" class="responsesWrapper">
+
+ <?php if($this->allow('comment')): ?>
+ <div id="<?php $this->respondId(); ?>" class="respond item">
+ <br />
+ <form method="post" action="<?php $this->commentUrl() ?>" id="comment-form" class="comment-form row" role="form">
+ <p class="comment-form-comment col-md-12">
+ <textarea rows="8" cols="50" name="text" id="owo-textarea" class="textarea" required ><?php $this->remember('text'); ?></textarea>
+ </p>
+
+ <?php if($this->user->hasLogin()): ?>
+ <p style="margin-left:16px"><?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 class="comment-form-author col-md-4">
+ <input placeholder="留下你的大名" type="text" name="author" id="author" class="text" value="<?php $this->remember('author'); ?>" required />
+ </p>
+ <p class="comment-form-email col-md-4">
+ <input placeholder="输入正确的邮箱地址,会为你保密" type="email" name="mail" id="mail" class="text" value="<?php $this->remember('mail'); ?>"<?php if ($this->options->commentsRequireMail): ?> required<?php endif; ?> />
+ </p>
+ <p class="comment-form-url col-md-4">
+ <input placeholder="http(s)://" 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; ?>
+ <?php $this->need('includes/owo.php'); ?>
+ <p class="form-submit col-md-12">
+ <button type="submit" class="submit btn btn-info " style="float:right;transition:all 0.5s;"><?php _e('提交评论'); ?></button>
+ </p>
+ </form>
+ </div>
+ <?php else: ?>
+ <h3><?php _e('评论已关闭'); ?></h3>
+ <?php endif; ?>
+
+ <?php $this->comments()->to($comments); ?>
+ <?php if ($comments->have()): ?>
+ <div class="comment-list-wrap">
+ <?php $comments->listComments(); ?>
+ </div>
+ <?php $comments->pageNav('« 前一页', '后一页 »'); ?>
+
+ <?php endif; ?>
+</div>
\ No newline at end of file |
