Ps:如需要在默认主题使用时光机查看下文
为你的typecho博客添加时光机
什么是时光机
答:类似于说说动态
什么主题可以用
答:所有typecho主题通用
...
网站副标题的字体斜改为正常
这个斜体是ccs效果,所以想要改为正常要动style.css
(主题ccs)进去修改如下内容
原
.description {
margin: .5em 0 0;
color: #999;
font-style: italic;
}
改
.description {
margin: .5em 0 0;
color: #999;
font-style: normal;
}
改好清缓存即可.
去除前台登录入口
sidebar.php
文件删除如下内容
<?php if ($this->user->hasLogin()): ?>
<li class="last"><a href="<?php $this->options->adminUrl(); ?>"><?php _e('进入后台'); ?>
(<?php $this->user->screenName(); ?>)</a></li>
<li><a href="<?php $this->options->logoutUrl(); ?>"><?php _e('退出'); ?></a></li>
<?php else: ?>
<li class="last"><a href="<?php $this->options->adminUrl('login.php'); ?>"><?php _e('登录'); ?></a>
</li>
在移动端填加搜索框
在主题文件header.php
(顶部搜索)在
<a<?php if ($this->is('index')): ?> class="current"<?php endif; ?>
href="<?php $this->options->siteUrl(); ?>"><?php _e('首页'); ?></a>
<?php \Widget\Contents\Page\Rows::alloc()->to($pages); ?>
下面
或在footer.php
文件(尾部搜索)
<footer id="footer" role="contentinfo">
© <?php echo date('Y'); ?> <a href="<?php $this->options->siteUrl(); ?>"><?php $this->options->title(); ?></a>.
<?php _e('由 <a href="https://typecho.org">Typecho</a> 强力驱动'); ?>.
前面
加入以下内容
<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('<i class="fas fa-search"></i>'); ?></button>
</form>