博文
目前显示的是 十一月, 2022的博文
.code { background:#f5f8fa; background-repeat:no-repeat; border: solid #5C7B90; border-width: 1px 1px 1px 20px; color: #000000; font: 13px 'Courier New', Courier, monospace; line-height: 16px; margin: 10px 0 10px 10px; max-height: 200px; min-height: 16px; overflow: auto; padding: 28px 10px 10px; width: 90%; } .code:hover { background-repeat:no-repeat; }
优化blogger在国内访问几个要点
1、屏蔽官方自动加载 将 <head> 替换为 <!--<head>--><head> 将 </head> 替换为 </head><!--</head>--> 将 </body> 替换为 <!--</body>--></body> 2、js资源替换 将原生的<b:template-script async='true' name='indie' version='1.0.0'/>注释掉,替换为 自己的 <script async='async' src='你的网址/themes/Contempo/js/3311276799-indie_compiled.js'/> 3、图标、头像设置 找到class='profile-img' < img class = 'profile-img' expr:alt = 'data:messages.myPhoto' expr:height = 'data:authorPhoto.height' expr:src = 'data:authorPhoto.image' expr:width = 'data:authorPhoto.width' /> 替换为 < img class = 'profile-img' src = "你的头像外链地址" > 感谢 陈YFの博客( ̄▽ ̄)" 提供 https://blog.cyfan.top/p/620f3e8d.html
解决blogger缩略图需要科学上网的问题
1、找到blogger源码中所有缩略图(data:post.featuredImage)的代码区,修改为以下代码: <b:if cond='data:post.featuredImage'> <!--判断文章内是否有图片,有则代码继续执行--> <div class='snippet-thumbnail'> <!--创建一个 div 容器,缩略图放置在这里--> <img class='post-thumbnail' sizes='(max-width: 800px) 20vw, 128px' src='../loadingimg.gif'/> <!--预先放置一个加载图片,增强用户体验--> <textarea class='post-text' style='display:none;'><data:post.body.escaped/></textarea> <!--这里放置文章全文,图片从中提取,样式设置为不显示--> </div> </b:if> 2、将 JS 代码放置于 </body> 标签前: <b:if cond='data:blog.pageType in {"index","searchQuery","searchLabel","archive"}'> <!--如果当前页是首页,搜索页,标签页,那么代码继续执行--> <script defer='defer'> //<![CDATA[ var postThumbnails = document.getElementsByClassName("post-thumbnail"); var postContents ...