在Typecho博客中显示天气,本站以handsome主题为例 首先注册心知天气获取api,注册地址https://www.seniverse.com/ 需要修改的文件在网站根目录/usr/themes/handsome/component/headnav.php 在第54行的下面将在心知天气获取到的代码添加进去即可 ```javascript ``` Loading... 在Typecho博客中显示天气,本站以handsome主题为例 首先注册心知天气获取api,注册地址https://www.seniverse.com/ 需要修改的文件在网站根目录/usr/themes/handsome/component/headnav.php 在第54行</form>的下面将在心知天气获取到的代码添加进去即可 ```javascript <!-- 知心天气--> <div id="tp-weather-widget" class="navbar-form navbar-form-sm navbar-left shift"></div> <script> (function(a,h,g,f,e,d,c,b){b=function(){d=h.createElement(g);c=h.getElementsByTagName(g)[0];d.src=e;d.charset="utf-8";d.async=1;c.parentNode.insertBefore(d,c)};a["SeniverseWeatherWidgetObject"]=f;a[f]||(a[f]=function(){(a[f].q=a[f].q||[]).push(arguments)});a[f].l=+new Date();if(a.attachEvent){a.attachEvent("onload",b)}else{a.addEventListener("load",b,false)}}(window,document,"script","SeniverseWeatherWidget","//cdn.sencdn.com/widget2/static/js/bundle.js?t="+parseInt((new Date().getTime() / 100000000).toString(),10))); window.SeniverseWeatherWidget('show', { flavor: "slim", location: "WS36TH3V9370", geolocation: true, language: "auto", unit: "c", theme: "light", token: "57f2d718-da81-4fed-98ee-bd019756d0fa", hover: "enabled", container: "tp-weather-widget" }) </script> <!-- 知心天气--> ``` 最后修改:2020 年 02 月 08 日 © 允许规范转载 打赏 赞赏作者 支付宝微信 赞 如果觉得我的文章对你有用,请随意赞赏
12 条评论
你好 我问下 您网站上右边这个下拉滑动效果怎么实现的 求助
那只小喵咪吗 就是用插件改的返回顶部
是那个插件 麻烦可以提供下吗
搜关键词 GoTop Typecho就可以找到了哈
心知天气有插件版了呢,handsome专用:https://github.com/6get-xiaofan/SenWeather
MyLove页面不错哦 还有这个云盘是怎么搞的
云盘用的NEXT Cloud程序,在服务器部署一下就可以啦
你这个天气的显示不居中了,我用的是7.3.1版本的handsome,加上这个显示更是错位。。
我这个天气本来就是没设置居中的哈哈哈
复制提示
document.body.oncopy = function() { if (window.getSelection().toString() && window.getSelection().toString().length > 5) {layer.msg('复制成功,若要转载请务必保留原文链接!');} };主题-->component-->footer.php
在前插入代码
```JavaScript
```
鼠标点击特效
(function(window,document,undefined){ var hearts = []; window.requestAnimationFrame = (function(){ return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (callback){ setTimeout(callback,1000/60); } })(); init(); function init(){ css(".heart{width: 10px;height: 10px;position: fixed;background: #f00;transform: rotate(45deg);-webkit-transform: rotate(45deg);-moz-transform: rotate(45deg);}.heart:after,.heart:before{content: '';width: inherit;height: inherit;background: inherit;border-radius: 50%;-webkit-border-radius: 50%;-moz-border-radius: 50%;position: absolute;}.heart:after{top: -5px;}.heart:before{left: -5px;}"); attachEvent(); gameloop(); } function gameloop(){ for(var i=0;i主题-->component-->footer.php
在前插入代码
```JavaScript
评论框打字特效
主题-->component-->footer.php
在前插入代码