Loading... ## 前言 想必大家看到我的博客,但是你们觉得这个主题好看吗?想不想知道我用的是什么博客、什么主题还有插件吗下面我会一一介绍 ## 博客程序 使用的是[Typecho][1] ## 关于主题 主题用的是[handsome][2] 这个主题简洁而且支持[pjax][3] ### 主题设置 不知道你们注意到了吗当网页失去焦点时上面的标题会变这是用自定义js做的,当然别的主题也应该可以自定义js ```js var OriginTitile=document.title;var titleTime;document.addEventListener("visibilitychange",function(){if(document.hidden){OriginTitile=document.title;document.title="怎么走了(;´д`)ゞ";clearTimeout(titleTime)}else{document.title="回来了ヾ(◍°∇°◍)ノ゙嘻嘻";titleTime=setTimeout(function(){document.title=OriginTitile},2000)}}); ``` 这是我的可以根据自己喜好改哦 ### 关于一言 我当时不懂接口所以我在服务器更目录创建了个txt文档,然后将这个txt文档的地址放在一言接口就行了[看我写接口](https://www.zigao.info/archives/8.html "看我写接口") ## 关于插件 1.[Access][5]可以生成访客统计但是用了CDN后无法看到真实IP可以在config.inc.php文件中添加下面代码即可,我用的是[cloudflare][6]其他CDN可能有区别 ```php if(isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { $list = explode(',',$_SERVER['HTTP_X_FORWARDED_FOR']); $_SERVER['REMOTE_ADDR'] = $list[0]; } ``` 2.[Copyright][7]版权小尾巴生成但是你会发现复制也会带上版权可以在主题footer.php中合适的位置添加 ```html <script> document.body.addEventListener('copy', function (e) { if (window.getSelection().toString() && window.getSelection().toString().length > 1) { setClipboardText(e); alert('请严格使用© 本作品采用知识共享署名 4.0 国际许可协议使用本文章,商用请联系作者。谢谢~(。・`ω´・)'); } }); function setClipboardText(event) { var clipboardData = event.clipboardData || window.clipboardData; if (clipboardData) { event.preventDefault(); var htmlData = '' + window.getSelection().toString() + '<br>-----------------------------------------------------------<br>' + '著作权归作者所有<br>' + '商业转载请联系作者获得授权<br>' + '非商业转载请使用知识共享署名 4.0 国际许可协议<br>' + '作者:Zi Gao<br>' + '链接:' + window.location.href + '<br>' + '来源:<?php $this->options->siteUrl(); ?><br>' + '-----------------------------------------------------------'; var textData = '' + window.getSelection().toString() + '\n-----------------------------------------------------------' + '\n著作权归作者所有\n' + '商业转载请联系作者获得授权\n' + '非商业转载请使用知识共享署名 4.0 国际许可协议\n' + '作者:<?php $this->author() ?>\n' + '链接:' + window.location.href + '\n' + '来源:<?php $this->options->siteUrl(); ?>' + '\n-----------------------------------------------------------'; clipboardData.setData('text/html', htmlData); clipboardData.setData('text/plain',textData); } } </script> ``` 但是这样有点烦人我已经没用了 3. [DynamicLines][8]背景线条 4. [Sitemap][9]这个浏览量高了也不会崩 5. [HoerMouse][10]鼠标插件 6. [Pio][11]干物妹就是这个插件 7. [RobotsPlus][12]可以看到是否有爬虫来访 9. [SmartSpam][13]因为用pjax会关闭评论反垃圾插件所以用这个 10. [AMP-MIP][14]SEO插件,一键推送AMP和MIP到百度 ## 最后 更多魔改的地方[看我][15] 应为都是外链所以404了可以复制插件名字百度一下 [1]: http://typecho.org/ [2]: https://handsome.ihewro.com/ [3]: https://github.com/defunkt/jquery-pjax [4]: https://www.zigao.info/usr/uploads/2020/02/1209501121.png [5]: https://plugins.typecho.me/plugins/access.html [6]: https://www.cloudflare.com/ [7]: https://github.com/Yves-X/Copyright-for-Typecho [8]: https://plugins.typecho.me/plugins/DynamicLines.html [9]: https://github.com/invelop/Typecho-HPSitemap [10]: https://gitee.com/HoeXhe/HoerMouse [11]: https://docs.paul.ren/ [12]: https://plugins.typecho.me/plugins/robots-plus.html [13]: https://plugins.typecho.me/plugins/smart-spam.html [14]: https://gitee.com/SimonH/typecho-gitwidget [15]: https://www.zigao.info/248 [14]: https://github.com/holmesian/Typecho-AMPa Last modification:July 8, 2022 © Allow specification reprint Support Appreciate the author AliPayWeChat Like 0 大哥给点钱吧~ヽ(・ω・´メ)(微信 支付宝 QQ都是一个码哦~