老罗博客 - 网络 https://www.luosir.cn/category/net/ zh-CN Sat, 28 Jun 2025 21:41:00 +0800 Sat, 28 Jun 2025 21:41:00 +0800 折腾主题 https://www.luosir.cn/18.html https://www.luosir.cn/18.html Sat, 28 Jun 2025 21:41:00 +0800 老罗 多数情况没有长篇大论。参考别人主题,在首页增加一个说说模式。

]]>
4 https://www.luosir.cn/18.html#comments https://www.luosir.cn/feed/category/net/
格子背景css代码 https://www.luosir.cn/17.html https://www.luosir.cn/17.html Sat, 14 Jun 2025 11:51:46 +0800 老罗 body::before { background-image: linear-gradient(90deg, rgba(60, 10, 30, .04) 3%, transparent 0), linear-gradient(1turn, rgba(60, 10, 30, .04) 3%, transparent 0); background-size: 20px 20px; background-position: 50%; background-repeat: repeat; } ]]> 2 https://www.luosir.cn/17.html#comments https://www.luosir.cn/feed/category/net/ typecho主题设置添加备份和恢复功能 https://www.luosir.cn/16.html https://www.luosir.cn/16.html Thu, 12 Jun 2025 11:49:00 +0800 老罗 迷你日志主题十分简洁,一旦切换其他的主题设置就没了,为迷你日志主题添加主题备份和恢复功能。
一、确定文件备份的路径
在当前主题目录下建立 tmp 目录,赋予可写权限777,linux 系统赋权命令如下: chmod 777 -R tmp/
二、在主题 funcitons.php 文件的 themeConfig($form){} 方法中添加编写代码
通常将备份恢复的模块放在网页的最前面,将下面的代码,复制到themeConfig($form){}最前面就可以。

隐藏内容,请前往内页查看详情

]]>
12 https://www.luosir.cn/16.html#comments https://www.luosir.cn/feed/category/net/
html滚动公告栏美化代码 https://www.luosir.cn/14.html https://www.luosir.cn/14.html Sun, 08 Jun 2025 10:40:00 +0800 老罗
这里是滚动公告内容,可以从右向左滚动显示重要信息

隐藏内容,请前往内页查看详情

]]>
5 https://www.luosir.cn/14.html#comments https://www.luosir.cn/feed/category/net/
博客使用霞鹜文楷字体 https://www.luosir.cn/12.html https://www.luosir.cn/12.html Wed, 04 Jun 2025 11:25:00 +0800 老罗 代码放置于:设置-系统-自定义样式

body{font-family: "LXGW WenKai Screen", sans-serif !important;}

代码放置于:设置-系统-自定义脚本

function changeFont() { 
  const link = document.createElement("link");
  link.rel = "stylesheet";
  link.type = "text/css";
  link.href = "https://fastly.jsdelivr.net/npm/lxgw-wenkai-webfont@1.6.0/lxgwwenkai-light.css";
  document.head.append(link);
};
changeFont()

首先,在网页的标签内适当位置引入字体 CSS。如果你希望使用屏幕阅读优化版本,请使用第二行。第一行为原始字体文件。二者引入其一即可。

<link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/lxgw-wenkai-webfont/1.6.0/style.min.css" />
<link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/lxgw-wenkai-screen-webfont/1.7.0/style.min.css" />

CSS 镜像地址的源在 cdnjs,上方的代码 href 采用了中国大陆的 BootCDN 的源。如果你喜欢其他的 cdnjs 下游源,可以自己替换下。

接着,在你的 CSS 中设置字体。这根据上方引入何版本字体,设置不同的字体名称。同样地,二者选其一。

body {
    /* 原版 */
    font-family: "LXGW WenKai", sans-serif;
    /* 屏幕优化版 */
    font-family: "LXGW WenKai Screen", sans-serif;
}
]]>
16 https://www.luosir.cn/12.html#comments https://www.luosir.cn/feed/category/net/
memos笔记系统美化 https://www.luosir.cn/9.html https://www.luosir.cn/9.html Wed, 04 Jun 2025 11:13:00 +0800 老罗 界面美化
  1. 字体修改为霞鹜文楷
  2. 接入 bing 的每日壁纸,这样每天打开背景都不同
  3. 半透效果
  4. 一些无用选项的隐藏
/* 修改字体 */
body{font-family: "LXGW WenKai Screen", sans-serif !important;}
/* 修改Memo字号 */
.memo-wrapper .text-base { font-size: 0.95rem}
/* 修改代码块字号 */
.text-sm { font-size: 0.85rem; }
/* 隐藏 通知 选项卡 */
#header-inbox { display: none;}
/* 隐藏 个人资料 选项卡 */
#header-profile { display: none; }
/* 隐藏 探索 选项卡 */
/* #header-explore { display: none;} */
/* 隐藏 about 选项卡 */
#header-about { display: none; }
/* 修改编辑器字体为等宽 */
textarea { font-family: 'Courier New', Courier, monospace;}
/* 隐藏via memos */
body .flex.flex-row.justify-between.items-center > .text-gray-500.dark:text-gray-400 { display: none;}
/* share memos width */
.share-memo-dialog>.dialog-container { width: auto; }

/* sidebar */
.w-56 { width: 12rem;}
/* comment */
.pt-16 { padding-top: 2rem; }

blockquote{
    border: 1px solid #246ad1 !important;
    border-left: 4px solid #246ad1 !important;
    position:relative;
 }
 .blockquote-center{ background: none; }

 /* #root>div:nth-child(1)  */
 body
 {
    background-image: url('https://bing.immmmm.com/img/bing?region=zh-CN&type=image');
    background-position: buttom;
    backdrop-filter: blur(10px);
    background-size: contain;
}


#root main,#root header,#root aside {
    background-color: rgba(244 244 245 / 60%) !important;
    background: content-box !important;
    border-radius: 5px !important;
}

#root main,#root header,#root aside>div:nth-child(2),#root aside>div:nth-child(3)
{
    background-color: white;
    border-radius: 5px;
}

.px-2{
    background: content-box !important;
}
.border-r {
    border-right-width: 0px !important;
}

/* 移动端顶栏 */
.sm\:pt-2 {
    background: unset !important;
    --tw-backdrop-blur: auto !important
}
/* 顶栏文字 */
/* .text-gray-700{
    color: snow !important;
}*/

/* 设置滚动条的样式 */
::-webkit-scrollbar {
  width: 5px !important;
  height: 5px !important;
}
/* 滚动槽 */
::-webkit-scrollbar-track {
  background: #eee !important;
}
/* 滚动条滑块 */
::-webkit-scrollbar-thumb {
  border-radius: 5px !important;
  background-color: #ccc !important;
}
::-webkit-scrollbar-thumb:hover {
  background-color: rgb(247, 149, 51) !important;
}
function changeFont() {
  const link = document.createElement("link");
  link.rel = "stylesheet";
  link.type = "text/css";
  link.href = "https://cdn.staticfile.org/lxgw-wenkai-screen-webfont/1.7.0/lxgwwenkaiscreen.css";
  document.head.append(link);
};
changeFont()
]]>
5 https://www.luosir.cn/9.html#comments https://www.luosir.cn/feed/category/net/
Typecho解决插件菜单堆叠问题 https://www.luosir.cn/11.html https://www.luosir.cn/11.html Sun, 01 Jun 2025 11:43:00 +0800 老罗 插件删除后插件生成的菜单栏还在,其实出现这种问题的原因有两个,一是用户问题,用户插件没有禁用,插件文件夹就被删除了,导致插件无法正常禁用,二是开发者问题,开发者在禁用插件的函数里忘记写删除菜单栏的方法了。大部分问题原因都是前者哈,文章就介绍个一劳永逸的方法,原理就是把正常的没有任何插件的博客,数据库里表里的内容复制出来替换下,然后后台菜单就等于恢复出厂设置了...也就解决了

备份

操作前先备份一下数据库,准备好后悔药,然后再跟随教程走。

编辑数据库表

打开数据库typecho_options表,找到name等于panelTable这行,点击编辑,然后再value行值那里填写如下内容

a:2:{s:5:"child";a:2:{i:1;a:0:{}i:3;a:0:{}}s:4:"file";a:0:{}}
]]>
5 https://www.luosir.cn/11.html#comments https://www.luosir.cn/feed/category/net/