文章归档页面搜索功能

This commit is contained in:
Skywt2003 2021-08-16 09:39:35 +08:00
parent 33e379476c
commit 9ad682a323
2 changed files with 12 additions and 7 deletions

View File

@ -11,6 +11,18 @@ $this->need('header.php');
<div class="col mt-5" id="main" role="main"> <div class="col mt-5" id="main" role="main">
<article> <article>
<h1 class="font-weight-bold post-title">文章归档</h1> <h1 class="font-weight-bold post-title">文章归档</h1>
<form class="form-inline mb-3" id="search" method="post" action="<?php $this->options->siteUrl(); ?>" role="search">
<label class="sr-only" for="s">搜索文章</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">
<i class="fa fa-search"></i>
</span>
</div>
<input type="text" id="s" name="s" class="form-control" placeholder="输入关键字搜索" />
</div>
<button type="submit" class="form-control btn btn-default">搜索</button>
</form>
<?php Typecho_Widget::widget('Widget_Stat')->to($stat);?><?php $stat->publishedPostsNum() ?> 篇文章,<?php echo allOfCharacters();?> 文字。 <?php Typecho_Widget::widget('Widget_Stat')->to($stat);?><?php $stat->publishedPostsNum() ?> 篇文章,<?php echo allOfCharacters();?> 文字。
<hr> <hr>
<?php <?php

View File

@ -64,13 +64,6 @@
<p class="description text-gray"><?php $this->options->description() ?></p> <p class="description text-gray"><?php $this->options->description() ?></p>
<?php endif; ?> <?php endif; ?>
</div> </div>
<!--<div class="site-search col-3 kit-hidden-tb">-->
<!-- <form id="search" method="post" action="<?php $this->options->siteUrl(); ?>" role="search">-->
<!-- <label for="s" class="sr-only"><?php _e('搜索关键字'); ?></label>-->
<!-- <input type="text" id="s" name="s" class="text" placeholder="<?php _e('输入关键字搜索'); ?>" />-->
<!-- <button type="submit" class="submit"><?php _e('搜索'); ?></button>-->
<!-- </form>-->
<!--</div>-->
</div><!-- end .row --> </div><!-- end .row -->
</div> </div>
</header><!-- end #header --> </header><!-- end #header -->