前言
适用于handsome主题
代码修改位置
/usr/themes/handsome/component/sidebar.php
大概在85行左右插入以下代码
代码在此
<section id="blog_qrurl" class="widget widget_categories wrapper-md clear">
<script type="text/javascript" src="//static.runoob.com/assets/qrcode/qrcode.min.js"></script>
<div id="qrcode"><h5 class="widget-title m-t-none text-md">
<!--svg图形-->
<img src="https://cos.xpblog.cn/cos-for-xpbloger/various/svg/flower.svg" style="height: 1.6em;">
手机阅读</h5></div>
<style>
#qrcode img{
max-width: 80%;
}
@media (max-width: 767px){
#qrcode{
display: none;
}
}
</style>
<div id="qrcode">
<script>
var elText = window.location.href;
new QRCode(document.getElementById("qrcode"), elText);
</script><div style="text-align:center">扫描二维码,在手机上阅读!</div></div>
</section>
1 条评论
记录一下自己美化博客的过程