Loading... ## 前言 最近在handsome正版用户交流社区看到了一个 [路迅先生][1]写的教程里面是在底栏加入 但是我觉得不够醒目所以我在侧栏加入了 觉得可以写一篇文章 ## 正文 ### 0x01左侧边栏 找到`usr/themes/handsome/component/aside.php`文件 找到 ```php <?php $mypattern1 = "<li data-original-title=\"{title}\" data-toggle=\"tooltip\" data-placement=\"top\"><a href=\"{url}\" target=\"_blank\"><span>{name}</span></a></li>"; Handsome_Plugin::output($mypattern1, 0, "ten");?> </ul> </li> <?php endif; ?> </ul> </nav> <!-- nav --> ``` 在下面加入 ```html <div align="center"> <a href="https://travellings.now.sh/" target="blank" title="开往-友链接力"><img src="https://travellings.now.sh/assets/logo.gif" alt="开往-友链接力" width="150"style=""></a> </div> ``` ### 0x02右侧边栏 找到`usr/themes/handsome/component/sidebar.php`文件 *<p style="color:#D3D3D3">此侧修改根据[公众号入口][2]修改而来</p>* 找到 ```php <?php if ($this->options->adContentSidebar != ""): ?> <!--广告位置--> <section id="a_d_sidebar" class="widget widget_categories wrapper-md clear"> <h5 class="widget-title m-t-none text-md"><?php _me("广告") ?></h5> <?php $this->options->adContentSidebar(); ?> </section> ``` 上方加入 ```html <section id="a_d_sidebar" class="widget widget_categories wrapper-md clear"> <h5 class="widget-title m-t-none text-md"><?php _me("开往-友链接力") ?></h5> <a href="https://travellings.now.sh/" target="blank" title="开往-友链接力"><img src="https://travellings.now.sh/assets/logo.gif" alt="开往-友链接力" width="150"style=""></a> </section> ``` ## 后记 好啦,在喜欢的位置加入吧 [1]: https://lxxs.xyz/archives/59/ [2]: https://www.ddsiot.cn/archives/325.html Last modification:July 8, 2022 © Allow specification reprint Support Appreciate the author AliPayWeChat Like 0 大哥给点钱吧~ヽ(・ω・´メ)(微信 支付宝 QQ都是一个码哦~
2 comments
左侧边栏不是可以直接在handsome主题设置中设置吗
是的,但是这种方法可以加上图标 ::QQ:Y.qq1::