首页
关于
留言板
推荐
导航
Search
1
记一次使用GIT上传文件夹到Github的命令
185 阅读
2
github加速(国内镜像,加速下载)
40 阅读
3
Typecho 页面载入时间代码
36 阅读
4
记Joe美化
30 阅读
5
typecho海报插件
27 阅读
Marks
Search
标签搜索
Joe
美化
GitHub
镜像
Typecho
插件
Seirei
累计撰写
5
篇文章
累计收到
1
条评论
首页
栏目
Marks
页面
关于
留言板
推荐
导航
搜索到
3
篇与
美化
的结果
typecho海报插件
以下内容均为 复制粘贴 ,哪里不会可以点击文章最下方qq跳转联系博主,如果对你有所帮助就点个赞吧插件介绍:1.整个过程使用 GD 库来生成海报,所以不需要担心排版混乱。2.生成海报后,将它们保存在插件目录下的海报文件夹中,从而节省第二次生成时间。3.用 搏天api 的动漫图片作为 头图 ,每篇的文章都有不同的新鲜感。4.支持用户 自定义 按钮样式,方便相同的主题样式,不会突兀。插件安装:1.将插件上传到 /usr/plugins/ 并将其重命名为 ArticlePoster 2.修改post.php并在适当的位置添加挂载点代码(这里说一下代码放到 /usr/themes/Joe/post.php )文件中 第57行<?php ArticlePoster_Plugin::button($this->cid); ?>3.在后台插件设置中填写信息,确保填写自定义共享按钮样式,并在类中添加文章-海报-按钮4.如果没有将jquery引入到您的模板中,或者设置了上述过程,并且没有通过单击按钮得到响应,您可以开始加载jquery5.修改图标部分以查找/usr/plugins/ArticlePoster/js/core.js,,并修改注释部分中的图标样式{mtitle title="必备步骤"/}这一段代码必须添加到 usr/plugins/ArticlePoster/css/core.css 文件最顶部即可.haibaodiv{width:100%;margin-top: 16px;margin-bottom: 16px;text-align: center;} .haibaodiv button{color: white;background-color: #4e7cf2;width: 170px;height: 36px;border: 0px;border-radius: 22px;}{mtitle title="pjax 适配"/}如果主题有 pjax 回调可以直接填下以下代码(如果是joe就不需要这一步直接跳过 ::(你懂的) )$('.article-poster-button').on('click',function(){ create_poster(); }); $('[data-event=\'poster-close\']').on('click', function(){ $('.article-poster, .poster-popover-mask, .poster-popover-box').fadeOut() }); $('[data-event=\'poster-download\']').on('click', function(){ download_poster(); });按钮样式<script src="https://zn.ax/usr/plugins/ZFonts/libs/mdui/mdui.min.js'"></script><link rel="stylesheet" href="https://zn.ax/usr/plugins/ZFonts/libs/mdui/mdui.min.css"/><div class="haibaodiv" style="width:100%;margin-top: 16px;margin-bottom: 16px;text-align: center;"> <button class="article-poster-button mdui-btn mdui-btn-raised mdui-btn-dense mdui-color-theme-accent mdui-ripple">生成海报</button> </div>大功告成!!!原文来自: 《重点》typecho海报插件/全面讲解自定义头图教程找到插件目录 /service/api.php 在179行,把get_curl函数里面的内容直接换成你要换的图片链接就行了get_curl('https://www.bing.com'.json_decode(get_curl("https://www.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1"),true)['images'][0]['url'])自定义头像教程找到插件目录 /service/api.php 在191行,把get_curl函数里面的内容直接换成你要换的图片链接就行了get_curl('https://q1.qlogo.cn/g?b=qq&nk='.$info['artcleqqqq'].'&s=640')自定义海报字体教程找到插件目录 /service/inc/fonts/msyh.ttf 换成自己想要的字体就行了,记得名称要一样提示:更换字体可能会导致海报排版错误,有能力的自己搞定原文来自: Typecho教程 - ArticlePoster使用问题综合帖
2021年04月06日
27 阅读
1 评论
0 点赞
2021-03-17
记Joe美化
{mtitle title="Head标签内"/}自定义右键<!-- 自定义右键 --> <style type="text/css"> a {text-decoration: none;} div.usercm{background-repeat:no-repeat;background-position:center center;background-size:cover;background-color:#fff;font-size:13px!important;width:130px;-moz-box-shadow:1px 1px 3px rgba (0,0,0,.3);box-shadow:0px 0px 15px #333;position:absolute;display:none;z-index:10000;opacity:0.9;border-radius: 5px;} div.usercm ul{list-style-type:none;list-style-position:outside;margin:0px;padding:0px;display:block} div.usercm ul li{margin:0px;padding:0px;line-height:35px;} div.usercm ul li a{color:#666;padding:0 15px;display:block} div.usercm ul li a:hover{color:#fff;background:rgba(9,145,113,0.88);border-radius: 5px} div.usercm ul li a i{margin-right:10px} a.disabled{color:#c8c8c8!important;cursor:not-allowed} a.disabled:hover{background-color:rgba(255,11,11,0)!important} div.usercm{background:#fff !important;} </style> <div class="usercm" style="left: 199px; top: 5px; display: none;"> <ul> <li><a href="https://blog.seirei.top/"><i class="fa fa-home fa-fw"></i><span>首页</span></a></li> <li style="border-bottom:1px solid gray"><a href="javascript:window.location.reload();"><i class="fa fa-refresh fa-fw"></i><span>刷新</span></a></li> <li><a href="javascript:void(0);" onclick="getSelect();"><i class="fa fa-file fa-fw"></i><span>复制</span></a></li> <li><a href="javascript:void(0);" onclick="baiduSearch();"><i class="fa fa-search fa-fw"></i><span>百度</span></a></li> <li><a href="javascript:void(0);" onclick="googleSearch();"><i class="fa fa-google fa-fw"></i><span>谷歌</span></a></li> <li><a href="javascript:history.go(1);"><i class="fa fa-arrow-right fa-fw"></i><span>前进</span></a></li> <li><a href="javascript:history.go(-1);"><i class="fa fa-arrow-left fa-fw"></i><span>后退</span></a></li> <li><a href="https://blog.seirei.top/Links"><i class="fa fa-user fa-fw"></i><span>和我当邻居</span></a></li> <li><a href="https://blog.seirei.top/about"><i class="fa fa-pencil fa-fw"></i><span>给我留言吧</span></a></li> </ul> </div> <script type="text/javascript"> (function(a) { a.extend({ mouseMoveShow: function(b) { var d = 0, c = 0, h = 0, k = 0, e = 0, f = 0; a(window).mousemove(function(g) { d = a(window).width(); c = a(window).height(); h = g.clientX; k = g.clientY; e = g.pageX; f = g.pageY; h + a(b).width() >= d && (e = e - a(b).width() - 5); k + a(b).height() >= c && (f = f - a(b).height() - 5); a("html").on({ contextmenu: function(c) { 3 == c.which && a(b).css({ left: e, top: f }).show() }, click: function() { a(b).hide() } }) }) }, disabledContextMenu: function() { window.oncontextmenu = function() { return !1 } } }) })(jQuery); function getSelect() { "" == (window.getSelection ? window.getSelection() : document.selection.createRange().text) ? layer.msg("请选择需要复制的内容!") : document.execCommand("Copy") } function baiduSearch() { var a = window.getSelection ? window.getSelection() : document.selection.createRange().text; "" == a ? layer.msg("请选择需要百度的内容!") : window.open("https://www.baidu.com/s?wd=" + a) } function googleSearch() { var a = window.getSelection ? window.getSelection() : document.selection.createRange().text; "" == a ? layer.msg("请选择需要谷歌的内容!") : window.open("https://www.google.com/search?q=" + a) } $(function() { for (var a = navigator.userAgent, b = "Android;iPhone;SymbianOS;Windows Phone;iPad;iPod".split(";"), d = !0, c = 0; c < b.length; c++) if (0 < a.indexOf(b[c])) { d = !1; break } d && ($.mouseMoveShow(".usercm"), $.disabledContextMenu()) }); </script>来路访问与左下角<!-- 客户端信息 --> <style> /* 元素遮罩层不遮挡下方元素的代码 */ .zz_select{ -webkit-pointer-events: none; -moz-pointer-events: none; -ms-pointer-events: none; -o-pointer-events: none; pointer-events: none; } </style> <div class="zz_select" id="fps" style="z-index:5;position:fixed;bottom:3px;left:3px;color:#2196F3;font-size:10px;"></div> <script type="text/javascript" src="https://cdn.jsdelivr.net/gh/kaliisra/myblogstatic/kehuduan-js/fetch.min.js"></script> <script src="https://cdn.gmit.vip/layer/3.1.1/layer.js" type="text/javascript" charset="utf-8"></script> <script> /*网站打开提醒代码开始*/ $(function(){ if(1){ var t = document.createElement("a"); t.href = document.referrer; var msgTitle = t.hostname; var name = t.hostname.split(".")[1]; if("" !== document.referrer){ switch (name) { case 'bing': msgTitle = '必应搜索'; break; case 'baidu': msgTitle = '百度搜索'; break; case 'so': msgTitle = '360搜索'; break; case 'google': msgTitle = '谷歌搜索'; break; case 'sm': msgTitle = '神马搜索'; break; case 'sogou': msgTitle = '搜狗搜索'; break; default: msgTitle = t.hostname; }; }; var time = (new Date).getHours(); var msg = ''; 23 < time || time <= 5 ? msg = "你是夜猫子呀?这么晚还不睡觉,明天起的来嘛?": 5< time && time <= 7 ? msg = "早上好!一日之计在于晨,美好的一天就要开始了!": 7< time && time <= 11 ? msg = "上午好!工作顺利嘛,不要久坐,多起来走动走动哦!": 11< time && time <= 14 ? msg = "中午了,工作了一个上午,现在是午餐时间!": 14< time && time <= 17 ? msg = "午后很容易犯困呢,今天的运动目标完成了吗?": 17< time && time <= 19 ? msg = "傍晚了!窗外夕阳的景色很美丽呢,最美不过夕阳红~": 19< time && time <= 21 ? msg = "晚上好,今天过得怎么样?": 21< time && time <= 23 && (msg = "已经这么晚了呀,早点休息吧,晚安~"); $.ajax({ type:"get", url:"https://open.gmit.vip/web/api/UserInfo/", async:true, success:function(data){ window.info = data; if(!sessionStorage.getItem('tip')){ sessionStorage.setItem('tip', 1) layer.msg("Hi~ 来自"+ data.data.location + '~<br/>通过 '+msgTitle+' 进来的朋友!<br/>使用 '+ data.data.os +"<br/>"+ data.data.browser +' 访问本站!' + '<br/>' ); } var showFPS = (function(){ var requestAnimationFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(callback) { window.setTimeout(callback, 1000/60); }; var e,pe,pid,fps,last,offset,step,appendFps; fps = 0; last = Date.now(); step = function(){ offset = Date.now() - last; fps += 1; if( offset >= 1000 ){ last += offset; appendFps(fps); fps = 0; }; requestAnimationFrame( step ); }; appendFps = function(fps){ var settings = { timeout: 5000, logError: true }; $('#fps').html('<span style="float:left;">'+fps+'FPS</span><br/><span style="float:left;">'+window.info.data.os+'</span><br/><span style="float:left;margin-top:1px;">'+window.info.data.browser+'</span><br/><span style="float:left;margin-top:1px;">'+window.info.data.location+'</span><br/><span style="float:left;margin-top:1px;"></span>'); }; step(); })(); } }); }; }); </script> <!-- 客户端信息 end -->Instantpage预加载<script src="https://cdn.jsdelivr.net/gh/SeireiA/instant.page/instantpage.js" type="module"></script>
2021年03月17日
30 阅读
0 评论
0 点赞
Typecho 页面载入时间代码
{mtitle}记Joe更新频繁导致的代码丢失{/mtitle}Functions.php文件<?php function timer_start() { global $timestart; $mtime = explode( ' ', microtime() ); $timestart = $mtime[1] + $mtime[0]; return true; } timer_start(); function timer_stop( $display = 0, $precision = 3 ) { global $timestart, $timeend; $mtime = explode( ' ', microtime() ); $timeend = $mtime[1] + $mtime[0]; $timetotal = $timeend - $timestart; $r = number_format( $timetotal, $precision ); if ( $display ) echo $r; return $r; } ?>Footer.php文件适当位置加入即可<?php echo 'PHP加载: ',timer_stop(), ' s.';?> <!-- 调用Functions.php中的加载时间代码 -->例图
2021年03月03日
36 阅读
0 评论
0 点赞
首页
刷新
复制
百度
谷歌
前进
后退
和我当邻居
给我留言吧