首页
直播
电影
视频
更多
壁纸
留言
友链
关于
统计
推荐
我的影视
蜻蜓工具
蛙蛙工具
Ai照片工具
帮小忙
APi
二次元api
字节海api
颜色代码表
Search
1
飞牛fnos自动部署并自动更新ssl证书
209 阅读
2
飞牛OS通过compose安装苹果cmsv10
74 阅读
3
飞牛NAS自建影视-MoonTV
61 阅读
4
音乐收藏
51 阅读
5
飞牛Fnos装typecho(docker)
47 阅读
随手记
技术分享
教程分享
ubuntu
typecho
web前端
服务器
转载分享
影视
音乐
卡点伴奏
登录
Search
标签搜索
typecho
joe
web前端
ubuntu
教程
分享
服务器
无心 ૮₍°°₎ა 博客
累计撰写
43
篇文章
累计收到
2
条评论
首页
栏目
随手记
技术分享
教程分享
ubuntu
typecho
web前端
服务器
转载分享
影视
音乐
卡点伴奏
页面
直播
电影
视频
壁纸
留言
友链
关于
统计
推荐
我的影视
蜻蜓工具
蛙蛙工具
Ai照片工具
帮小忙
APi
二次元api
字节海api
颜色代码表
用户登录
登录
搜索到
43
篇与
无心博客
的结果
2025-05-26
typecho-joe主题添加手机端公告
添加后效果添加手机端代码位置:/usr/themes/Joe/public/header.php在 310 行处添加改代码即可即在以下代码后添加<div class="joe_header__slideout-author"> <img width="50" height="50" class="avatar lazyload" src="<?php _getAvatarLazyload(); ?>" data-src="<?php $this->options->JAside_Author_Avatar ? $this->options->JAside_Author_Avatar() : _getAvatarByMail($this->authorId ? $this->author->mail : $this->user->mail) ?>" alt="博主昵称" /> <div class="info"> <a class="link" href="<?php $this->options->JAside_Author_Link() ?>" target="_blank" rel="noopener noreferrer nofollow"><?php $this->options->JAside_Author_Nick ? $this->options->JAside_Author_Nick() : ($this->authorId ? $this->author->screenName() : $this->user->screenName()); ?></a> <p class="motto joe_motto"></p> </div> </div>添加手机端代码:<div class = item style="height:30px"> <svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="20" height="20"> <path d="M656.261 347.208a188.652 188.652 0 1 0 0 324.05v-324.05z" fill="#F4CA1C"></path> <path d="M668.35 118.881a73.35 73.35 0 0 0-71.169-4.06l-310.01 148.68a4.608 4.608 0 0 1-2.013.46h-155.11a73.728 73.728 0 0 0-73.728 73.636v349.64a73.728 73.728 0 0 0 73.728 73.636h156.554a4.68 4.68 0 0 1 1.94.43l309.592 143.196a73.702 73.702 0 0 0 104.668-66.82V181.206a73.216 73.216 0 0 0-34.453-62.326zM125.403 687.237v-349.64a4.608 4.608 0 0 1 4.608-4.608h122.035v358.882H130.048a4.608 4.608 0 0 1-4.644-4.634zm508.319 150.441a4.608 4.608 0 0 1-6.564 4.193L321.132 700.32V323.773l305.97-146.723a4.608 4.608 0 0 1 6.62 4.157v656.471zM938.26 478.72H788.01a34.509 34.509 0 1 0 0 69.018H938.26a34.509 34.509 0 1 0 0-69.018zM810.01 360.96a34.447 34.447 0 0 0 24.417-10.102l106.245-106.122a34.524 34.524 0 0 0-48.84-48.809L785.587 302.08a34.509 34.509 0 0 0 24.423 58.88zm24.417 314.609a34.524 34.524 0 1 0-48.84 48.814L891.832 830.52a34.524 34.524 0 0 0 48.84-48.809z" fill="#595BB3"></path> </svg> <a href="https://yumuing.top/" target="_blank" rel="noopener noreferrer nofollow"display: inline-block;>网安备案!关闭本站评论功能!</a> </div>
2025年05月26日
17 阅读
0 评论
1 点赞
2025-05-26
Typecho-Joe主题新增在线人数统计功能
成品如图1.修改functions.php,底部新增,文件路径:usr/themes/Joe;如果无法显示设置,则将以下joe_custom修改为joe_other// 在线人数设置 $onlinePersion = new Typecho_Widget_Helper_Form_Element_Select( 'onlinePersion', array( 'on' => '开启(默认)', 'off' => '关闭', ), 'on', '是否启用在线人数统计', '介绍:开启后,文章底部展示当前在线人数' ); $onlinePersion->setAttribute('class', 'joe_content joe_custom'); $form->addInput($onlinePersion->multiMode());2.修改footer.php文件,文件路径:/usr/themes/Joe/public①第一段,顶部新增<?php //首先你要有读写文件的权限,首次访问不显示,正常情况刷新即可 $online_log = "slzxrs.dat"; //保存人数的文件到根目录, $timeout = 30;//30秒内没动作者,认为掉线 $entries = file($online_log); $temp = array(); for ($i=0;$i<count($entries);$i++){ $entry = explode(",",trim($entries[$i])); if(($entry[0] != getenv('REMOTE_ADDR')) && ($entry[1] > time())) { array_push($temp,$entry[0].",".$entry[1]."\n"); //取出其他浏览者的信息,并去掉超时者,保存进$temp } } array_push($temp,getenv('REMOTE_ADDR').",".(time() + ($timeout))."\n"); //更新浏览者的时间 $slzxrs = count($temp); //计算在线人数 $entries = implode("",$temp); //写入文件 $fp = fopen($online_log,"w"); flock($fp,LOCK_EX); //flock() 不能在NFS以及其他的一些网络文件系统中正常工作 fputs($fp,$entries); flock($fp,LOCK_UN); fclose($fp); $tj= "在线人数:".$slzxrs."人"; ?>②第二段,中间新增<div class="item" style="margin: 10px; <?php if(Helper::options()->onlinePersion !== 'on') echo 'display:none;' ?>"> <?php echo $tj ?> </div>
2025年05月26日
26 阅读
0 评论
1 点赞
2025-05-26
Typecho-Joe主题实现手机端登录/注册功能
1.修改header.php文件,新增代码,文件路径:usr/themes/Joe/public<ul class="joe_header__slideout-menu panel-box" style="margin-top: 15px; <?php if(Helper::options()->login4Phone !== 'on') echo 'display:none;' ?>"> <li> <?php if ($this->user->hasLogin()) : ?> <a class="link panel" href="#" rel="nofollow"> <span><?php $this->user->screenName(); ?></span> <svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="15" height="15"> <path d="M231.594 610.125C135.087 687.619 71.378 804.28 64.59 935.994c-.373 7.25 3.89 23.307 30.113 23.307s33.512-16.06 33.948-23.301c6.861-114.025 63.513-214.622 148.5-280.346 3.626-2.804 16.543-17.618 3.24-39.449-13.702-22.483-40.863-12.453-48.798-6.08zm280.112-98.44v63.96c204.109 0 370.994 159.345 383.06 360.421.432 7.219 8.649 23.347 32.44 23.347s31.991-16.117 31.62-23.342c-12.14-236.422-207.676-424.386-447.12-424.386z" /> <path d="M319.824 319.804c0-105.974 85.909-191.883 191.882-191.883s191.883 85.91 191.883 191.883c0 26.57-5.405 51.88-15.171 74.887-5.526 14.809-2.082 31.921 20.398 38.345 23.876 6.822 36.732-8.472 41.44-20.583 11.167-28.729 17.294-59.973 17.294-92.65 0-141.297-114.545-255.842-255.843-255.842S255.863 178.506 255.863 319.804s114.545 255.843 255.843 255.843v-63.961c-105.973-.001-191.882-85.909-191.882-191.882z" /> <path d="M512 255.843s21.49-5.723 21.49-31.306S512 191.882 512 191.882c-70.65 0-127.921 57.273-127.921 127.922 0 3.322.126 6.615.375 9.875.264 3.454 14.94 18.116 37.044 14.425 22.025-3.679 26.6-21.93 26.6-21.93-.028-.788-.06-1.575-.06-2.37.001-35.325 28.637-63.961 63.962-63.961z" /> </svg> </a> <ul class="slides panel-body"> <li> <?php if ($this->user->group == 'administrator' || $this->user->group == 'editor' || $this->user->group == 'contributor') : ?> <a class="link" rel="noopener noreferrer nofollow" target="_blank" href="<?php $this->options->adminUrl("write-post.php"); ?>">撰写新文章</a> <?php endif; ?> </li> <li> <?php if ($this->user->group == 'administrator' || $this->user->group == 'editor' || $this->user->group == 'contributor') : ?> <a class="link" rel="noopener noreferrer nofollow" target="_blank" href="<?php $this->options->adminUrl("manage-posts.php"); ?>">管理文章</a> <?php endif; ?> </li> <li> <?php if ($this->user->group == 'administrator' || $this->user->group == 'editor') : ?> <a class="link" rel="noopener noreferrer nofollow" target="_blank" href="<?php $this->options->adminUrl("manage-comments.php"); ?>">管理评论</a> <?php endif; ?> </li> <li> <?php if ($this->user->group == 'administrator') : ?> <a class="link" rel="noopener noreferrer nofollow" target="_blank" href="<?php $this->options->adminUrl("options-theme.php"); ?>">修改外观</a> <?php endif; ?> </li> <li> <a class="link" rel="noopener noreferrer nofollow" target="_blank" href="<?php $this->options->adminUrl(); ?>">进入后台</a> </li> <li> <a class="link" rel="noopener noreferrer nofollow" href="<?php $this->options->logoutUrl(); ?>">退出登录</a> </li> </ul> <?php else : ?> <a class="link panel" href="#" rel="nofollow"> <span>用户登录</span> <svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="15" height="15"> <path d="M231.594 610.125C135.087 687.619 71.378 804.28 64.59 935.994c-.373 7.25 3.89 23.307 30.113 23.307s33.512-16.06 33.948-23.301c6.861-114.025 63.513-214.622 148.5-280.346 3.626-2.804 16.543-17.618 3.24-39.449-13.702-22.483-40.863-12.453-48.798-6.08zm280.112-98.44v63.96c204.109 0 370.994 159.345 383.06 360.421.432 7.219 8.649 23.347 32.44 23.347s31.991-16.117 31.62-23.342c-12.14-236.422-207.676-424.386-447.12-424.386z" /> <path d="M319.824 319.804c0-105.974 85.909-191.883 191.882-191.883s191.883 85.91 191.883 191.883c0 26.57-5.405 51.88-15.171 74.887-5.526 14.809-2.082 31.921 20.398 38.345 23.876 6.822 36.732-8.472 41.44-20.583 11.167-28.729 17.294-59.973 17.294-92.65 0-141.297-114.545-255.842-255.843-255.842S255.863 178.506 255.863 319.804s114.545 255.843 255.843 255.843v-63.961c-105.973-.001-191.882-85.909-191.882-191.882z" /> <path d="M512 255.843s21.49-5.723 21.49-31.306S512 191.882 512 191.882c-70.65 0-127.921 57.273-127.921 127.922 0 3.322.126 6.615.375 9.875.264 3.454 14.94 18.116 37.044 14.425 22.025-3.679 26.6-21.93 26.6-21.93-.028-.788-.06-1.575-.06-2.37.001-35.325 28.637-63.961 63.962-63.961z" /> </svg> </a> <ul class="slides panel-body"> <li> <a class="link" href="<?php $this->options->adminUrl('login.php'); ?>" target="_blank" rel="noopener noreferrer nofollow">登录</a> <?php if ($this->options->allowRegister) : ?> <a class="link" href="<?php $this->options->adminUrl('register.php'); ?>" target="_blank" rel="noopener noreferrer nofollow">注册</a> <?php endif; ?> </li> </ul> <?php endif; ?> </li> </ul>放在ul后面2.修改functions.php,最后新增,文件路径:usr/themes/Joe// 手机端登录 $login4Phone = new Typecho_Widget_Helper_Form_Element_Select( 'login4Phone', array( 'off' => '关闭(默认)', 'on' => '开启', ), 'on', '是否启用手机端登录功能', '介绍:开启后,手机端侧边栏将展示登录功能和登录后的操作' ); $login4Phone->setAttribute('class', 'joe_content joe_custom'); // 如果无法展示,则将joe_custom替换为joe_other $form->addInput($login4Phone->multiMode());
2025年05月26日
30 阅读
0 评论
1 点赞
2025-05-26
typecho-joe主题添加音乐分享
歌单播放{music-list id="8904187604" color="#1989fa" autoplay="autoplay"/}单曲播放{music id="192251" color="#00ffff" autoplay="autoplay"/}音乐搜索音乐地址 作者原地址失效了,所以替换播放插件地址就行了。,主要替换两个地方这是歌单 /usr/themes/Joe/assets/js/joe.short.min.js这是单曲 /usr/themes/Joe/assets/js/joe.short.js修改方法是用:https://www.nmssb.cn/usr/themes/Joe/163musicapi.php?id=(借用笔记堡地址)替换掉https://www.vvhan.com/usr/themes/Joe/NeteaseCloudMusicApi.php?id=(原作者地址)就好了也可以把附件里面的NeteaseCloudMusicApi.php,放在自己网站,然后修改地址为自己的网站地址。{cloud title="音乐文件" type="lz" url="https://hndy8.lanzoub.com/iPprk2y4komh" password="77mu"/}
2025年05月26日
29 阅读
0 评论
2 点赞
2025-05-26
鼠标点击出现爱心特效
<script> //鼠标点击出现爱心特效 (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<hearts.length;i++){ if(hearts[i].alpha <=0){ document.body.removeChild(hearts[i].el); hearts.splice(i,1); continue; } hearts[i].y--; hearts[i].scale += 0.004; hearts[i].alpha -= 0.013; hearts[i].el.style.cssText = "left:"+hearts[i].x+"px;top:"+hearts[i].y+"px;opacity:"+hearts[i].alpha+";transform:scale("+hearts[i].scale+","+hearts[i].scale+") rotate(45deg);background:"+hearts[i].color; } requestAnimationFrame(gameloop); } function attachEvent(){ var old = typeof window.onclick==="function" && window.onclick; window.onclick = function(event){ old && old(); createHeart(event); } } function createHeart(event){ var d = document.createElement("div"); d.className = "heart"; hearts.push({ el : d, x : event.clientX - 5, y : event.clientY - 5, scale : 1, alpha : 1, color : randomColor() }); document.body.appendChild(d); } function css(css){ var style = document.createElement("style"); style.type="text/css"; try{ style.appendChild(document.createTextNode(css)); }catch(ex){ style.styleSheet.cssText = css; } document.getElementsByTagName('head')[0].appendChild(style); } function randomColor(){ return "rgb("+(~~(Math.random()*255))+","+(~~(Math.random()*255))+","+(~~(Math.random()*255))+")"; } })(window,document); </script>
2025年05月26日
24 阅读
0 评论
1 点赞
2025-05-26
博客添加实时显示FPS帧率代码
网页上实时显示 FPS(每秒帧数)帧率,不知道有什么用,可能好的电脑才能看出区别吧。<script> jQuery(document).ready(function($){ $('body').before('<div id="fps" style="position: fixed;right: 20px;color: #fff;line-height: 1;z-index:10000;padding: 5px 8px;"></div>'); 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) { console.log(fps + ' FPS'); $('#fps').html(fps + ' FPS'); }; step(); })(); }); </script>
2025年05月26日
18 阅读
0 评论
1 点赞
2025-05-26
简单统计今天、本月和总访问量php代码
编写一个名为 stat.php 的文件,编写如下代码:<?php // 今天、本月和总访问量 function stats() { $visits = []; $now = time(); // 统计今天访问量 $today = strtotime(date('Y-m-d', $now)); $visits['today'] = file_exists('stat.txt') ? file_get_contents('stat.txt') : 0; $visits['today'] += 1; file_put_contents('stat.txt', $visits['today']); // 统计本月访问量 $month = strtotime(date('Y-m', $now)); $visits['month'] = file_exists('month_stat.txt') ? file_get_contents('month_stat.txt') : 0; $visits['month'] += 1; file_put_contents('month_stat.txt', $visits['month']); // 统计总访问量 $visits['all'] = file_exists('all_stat.txt') ? file_get_contents('all_stat.txt') : 0; $visits['all'] += 1; file_put_contents('all_stat.txt', $visits['all']); return $visits; } // 输出统计结果 $visits = stats(); echo "今天访问量:" . $visits['today'] . "次<br>"; echo "本月访问量:" . $visits['month'] . "次<br>"; echo "总访问量:" . $visits['all'] . "次<br>"; ?>访问 stat.php 文件,您将看到今天、本月和总访问量的统计结果。当有多个用户同时访问时,访问量会自动累加。若要清除访问量记录,只需删除 stat.txt、month_stat.txt 和 all_stat.txt 文件即可。这个示例仅统计了今天、本月和总访问量,并未实现实时统计。如需实时展示访问量,您可以结合 PHP 缓存技术或其他实时统计方法。同时,为了保证数据安全,请确保文件权限设置合适,并使用 PHP 的文件操作函数。
2025年05月26日
25 阅读
0 评论
1 点赞
2025-05-26
前端api接口随机图片
樱花:https://www.dmoe.cc/random.php夏沫博客:https://cdn.seovx.com/?mom=302https://cdn.seovx.com/d/?mom=302https://cdn.seovx.com/ha/?mom=302搏天api:https://api.btstu.cn/sjbz/api.php姬长信API:----每日bing:https://api.isoyu.com/bing_images.php----美女图片壁纸:https://api.isoyu.com/mm_images.php----网红专栏壁纸:https://api.isoyu.com/beibei_images.php----动态IP签名图片:https://api.isoyu.com/ip_images.php?signature=早安----ARU(阿鲁)表情包:https://api.isoyu.com/ARU_GIF_S.php樱道:https://api.r10086.com/动漫综合1.php (网站中有更多api接口)保罗|API:https://api.paugram.com/wallpaper/墨天逸:https://api.mtyqx.cn/tapi/random.phpEEE.DOG:https://api.yimian.xyz/img岁月小筑:https://img.xjh.me/random_img.php东方Project:https://img.paulzzh.tech/touhou/randomxyg随即图:https://api.likepoems.com/星港随机图片API:https://xg.x-xh.cn/?p=251(网站中有更多api接口)2、api网站整合2.1 樱花网址:https://www.dmoe.cc/2.2 晓晴博客网址:https://www.toubiec.cn/318.html源码项目地址:https://www.toubiec.cn/99.html2.3 Unsplash Image API官方网址:https://source.unsplash.com/API地址:https://source.unsplash.com/random简单的嵌入Unsplash图片,可以登录Unsplash账号设置,也可以自定义筛选接口的图片类型2.4 夏沫博客网址:https://cdn.seovx.com/在线古风美图二次元API接口2.5 搏天api网址:https://api.btstu.cn/doc/sjbz.php随机输出各类壁纸2.6 姬长信API网址:https://api.isoyu.com/姬长信API For Docker 一个基于多种编程语言开源免费不限制提供生活常用,出行服务,开发工具,金融服务,通讯服务和公益大数据的平台.2.7 樱道网址:https://img.r10086.com/2.8 小歪API网址:https://api.ixiaowai.cn/2.9 保罗|API网址:https://api.paugram.com/help/wallpaper生成适合 Single 主题的白底动漫壁纸2.10 墨天逸网址:https://api.mtyqx.cn/2.11 EEE.DOG网址:https://www.eee.dog/tech/rand-pic-api.html本API基于华为云对象存储,使用华为CDN云加速,全球平均下载速度达10MB/s。API中已收录1100+张二次元图片,20+张Bing壁纸(每日自动抓取),150+张二次元头像,10+张图床上传图片。2.12 岁月小筑网址:https://img.xjh.me/2.13 东方Project网址:https://img.paulzzh.tech/2.14 xyg随即图(本站)网址:https://api.likepoems.com/2.15 星港随机图片API网址:https://xg.x-xh.cn/?p=251
2025年05月26日
12 阅读
0 评论
1 点赞
1
...
4
5
6