优化文件结构

This commit is contained in:
biss committed 2026-06-18 21:22:17 +08:00
1 parent d98d2989cb
commit 5678b95f6f
45 files changed
+9 -6

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
---
title: 和朋友们的故事
cover: https://pic.biss.click/image/eb65954d-3076-41bf-b890-c357884231c7.webp
category: 杂谈
tags: 生活
abbrlink: a31d95d9
date: 2026-01-05 13:14:16
summary: >-
这篇文章讲述了作者与朋友们的故事,以及他通过挂号信和电子贺卡与朋友们保持联系的经历。作者描述了自己对这种传统通信方式的喜爱,尽管现在网络发达,但他仍然觉得挂号信具有独特的魅力。文章中提到了作者去年上半年开始给朋友们写信,下半年因忙碌而减少,年底时尝试使用AI工具创作电子贺卡。作者感慨大学时间的快速流逝,以及朋友们之间的疏远。尽管如此,作者认为这是必然的事情,并无悲伤之处,只是单纯的感慨。最后,作者表示下次有时间会在文章中更新更多内容。
---
最近一直忙于学习(~~虽然也没怎么好好学~~),所以一直忘了网站的更新;现在闲下来了,又不知道该写点什么;就写写我和朋友们的故事吧。
因为一次偶然的突发奇想,解锁了挂号信这种奇奇怪怪的通信方式,虽然现在网络发达,但感觉这种方式有一种独特的魅力。所以从去年开始就断断续续地给朋友们写信,这是一些挂号信收据:
<center><img src="https://pic.biss.click/i/2026/01/05/y08m0d.jpg" alt="一些挂号信收据" /></center>
这应该是去年上半年的一张图片,下半年也在零散的发,只不过下半年比较忙,没发多少。到年底的时候呢又想着写一点贺年信,当然感觉自己的水平下降,写不出什么好的文章。于是开始着手准备电子版贺卡,当然完全使用了AI工具,自己写太麻烦,也没什么精力去写,于是就有了下面的电子贺卡:
<center><img src="https://pic.biss.click/i/2026/01/05/ys91t1.png" alt="电子贺卡" /></center>
之后呢,又写了其他一些有趣的功能,但好像不是这篇文章的重点;
再写信和创作电子贺卡是感慨万分,进入大学之后时间似乎变得十分快,感觉除了几个天天联系的好友之外,其他人都慢慢疏远了,不过这也是必然的事情,也没什么可悲伤的,只是感慨罢了。
怎么说,就这样吧,下次有时间再在这篇文章里更新。
+291
View File
@@ -0,0 +1,291 @@
---
title: 添加网站左上角菜单
cover: https://pic.biss.click/image/a40baba1-b296-4b3b-a781-da45bffb1b95.webp
categories: 建站手札
series: webcustom
tags:
- 网站
abbrlink: '7e921903'
summary: >-
这篇文章详细介绍了如何在柳神的网站上添加一个自定义的左上角菜单,包括菜单的结构、样式以及响应式设计。作者提供了具体的HTML和CSS代码示例,展示了如何实现一个包含多个链接和功能的导航栏,同时确保在不同屏幕尺寸下的适配性。此外,还解释了一些关键的CSS属性和JavaScript交互效果,以实现平滑的菜单显示和隐藏。通过这些步骤,用户可以轻松地自定义和美化网站的顶部导航栏,提升用户体验。
date: 2026-02-10 07:11:14
---
看到柳神的网站有这种菜单,但是没有写魔改教程,只好自己慢慢摸索了。
{% link liushen,liushen,https://blog.liushen.fun %}
预计做好后是这种效果:
![示意图](https://pic.biss.click/image/8d374eff-8817-4337-86ed-5909ff0eefaa.webp)
首先,修改```\themes\butterfly\layout\includes\header\nav.pug```:
```pug
nav#nav
//- 左侧区域:包含指纹菜单和网站名
span#blog-info
#ls-menu-container
i.fas.fa-fingerprint
#ls-menu-panel
.ls-section
.ls-title 😀 个人网站
.ls-grid
a(href="/") #[i.fas.fa-rss] 个人博客
a(href="https://github.com/bishshi") #[i.fab.fa-github] Github
.ls-section
.ls-title 😎 常用服务
.ls-grid
a(href="https://git.biss.click/biss") #[i.fas.fa-code] 代码仓库
a(href="https://mm.biss.click") #[i.fas.fa-pen-nib] 日常yy
a(href="https://statstic.biss.click") #[i.fas.fa-users] 访客统计
a(href="https://pic.biss.click") #[i.fas.fa-image] 图床
a(href="https://chat.biss.click") #[i.fas.fa-robot] AI网站
.ls-section
.ls-title 🛸 实用工具
.ls-grid
a(href="https://cover.biss.click") #[i.fas.fa-palette] 封面设计
a.nav-site-title(href=url_for('/'))
if theme.nav.logo
img.site-icon(src=url_for(theme.nav.logo) alt='Logo')
if theme.nav.display_title
span.site-name=config.title
//- 中间区域:关键!必须在 nav 下一级,以便 JS 切换类名
if globalPageType === 'post' && theme.nav.display_post_title
a.nav-page-title(href='javascript:void(0);' onclick='btf.scrollToDest(0, 500)')
span.site-name=(page.title || config.title)
//- 右侧区域
#nav-right
if theme.menu
#menus
!= partial('includes/header/menu_item', {}, {cache: true})
if theme.search.use || true
#random-post-button
a.site-page.social-icon#random-post-link(href='javascript:void(0);' onclick='randomPost()')
i.fas.fa-solid.fa-shuffle
#search-button
a.site-page.social-icon.search-typesense-trigger
i.fas.fa-search.fa-fw
#toggle-menu
span.site-page
i.fas.fa-bars.fa-fw
```
在合适的目录下新建```nav.css```(例如```\themes\butterfly\source\css\nav.css```),这份css是磨砂玻璃的样式:
```css
#nav-right{
flex:1 1 auto;
justify-content: flex-end;
margin-left: auto;
display: flex;
flex-wrap:nowrap;
}
/* 导航栏居中 */
#sidebar #sidebar-menus .menus_items .menus_item {
margin: 10px 0;
}
#sidebar #sidebar-menus .menus_items a.site-page {
padding-left: 0;
}
#sidebar #sidebar-menus .menus_items .site-page {
position: relative;
display: block;
padding: 6px 30px 6px 22px;
color: var(--font-color);
font-size: 1.15em;
border: var(--style-border-always);
background: var(--icat-card-bg);
font-size: 14px;
border-radius: 12px;
}
#sidebar #sidebar-menus .menus_items .site-page i:first-child {
text-align: left;
padding-left: 10px;
}
#nav #menus {
display: flex;
justify-content: center;
width: 100%;
position: absolute;
left: 0;
margin: 0;
transform: translateZ(0);
}
#nav #blog-info {
flex-wrap: nowrap;
display: flex;
align-items: center;
z-index: 102;
max-width: fit-content;
}
@media screen and (max-width: 900px) {
#nav {
padding: 0 15px;
}
#nav-group {
padding: 0 0.2rem;
}
#rightside {
right: -42px;
}
}
/* IPAD菜单栏调整 */
/* 1. 容器溢出穿透 */
#nav, #blog-info, #nav-group {
overflow: visible !important;
}
#ls-menu-container {
position: relative !important;
display: inline-flex !important;
align-items: center;
height: 100%;
padding: 0 15px;
cursor: pointer !important;
z-index: 2000 !important;
}
/* 2. 悬浮面板:宽大且高不透明度 */
#ls-menu-panel {
position: absolute !important;
top: 100% !important;
left: 0 !important;
margin-top: 15px !important;
width: 420px;
padding: 24px;
border-radius: 18px;
/* 高不透明度磨砂玻璃 (0.9) */
background: rgba(255, 255, 255, 0.95) !important;
backdrop-filter: blur(20px) saturate(180%) !important;
-webkit-backdrop-filter: blur(20px) saturate(180%) !important;
border: 1px solid rgba(255, 255, 255, 0.5) !important;
box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18) !important;
opacity: 0 !important;
visibility: hidden !important;
transform: translateY(12px) !important;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
z-index: 999999 !important;
cursor: default;
}
/* 3. 透明感应桥梁 */
#ls-menu-panel::before {
content: "";
position: absolute;
top: -20px;
left: 0;
right: 0;
height: 25px;
background: transparent !important;
}
/* 4. 触发效果 */
#ls-menu-container:hover #ls-menu-panel {
opacity: 1 !important;
visibility: visible !important;
transform: translateY(0) !important;
}
#ls-menu-container:hover i.fa-fingerprint {
color: #49b1f5;
transform: scale(1.1);
}
/* 5. 内部网格:保持两列 */
.ls-section { margin-bottom: 22px; }
.ls-section:last-child { margin-bottom: 0; }
.ls-title {
color: #333;
font-weight: 800;
font-size: 15px;
margin-bottom: 12px;
opacity: 0.9;
}
.ls-grid {
display: grid !important;
grid-template-columns: repeat(2, 1fr); /* 恢复为两列 */
gap: 10px;
}
.ls-grid a {
color: #444 !important;
font-size: 14px !important;
padding: 10px 12px;
border-radius: 12px;
display: flex;
align-items: center;
transition: all 0.2s ease;
background: rgba(0, 0, 0, 0.02);
}
.ls-grid a:hover {
background: #49b1f5 !important;
color: #fff !important;
transform: translateX(4px); /* 悬停时轻微右移,增加动感 */
}
.ls-grid a i {
margin-right: 12px;
width: 20px;
text-align: center;
font-size: 15px;
}
/* 6. 深色模式适配 */
[data-theme='dark'] #ls-menu-panel {
background: rgba(30, 30, 30, 0.95) !important;
border-color: rgba(255, 255, 255, 0.1) !important;
}
[data-theme='dark'] .ls-title { color: #eee; }
[data-theme='dark'] .ls-grid a {
color: #ccc !important;
background: rgba(255, 255, 255, 0.05);
}
#nav.show-title .nav-page-title {
display: flex !important;
opacity: 1 !important;
visibility: visible !important;
position: absolute !important;
left: 50% !important;
transform: translateX(-50%) !important;
white-space: nowrap !important;
z-index: 1000 !important;
}
#nav.show-title #menus,
#nav.show-title .nav-site-title {
opacity: 0 !important;
visibility: hidden !important;
pointer-events: none !important;
}
#nav .nav-page-title {
display: none;
transition: opacity 0.3s ease;
}
#nav #blog-info {
overflow: visible !important;
}
```
然后在```_config.butterfly.yml```里面引用该css
```yml
- <link rel="stylesheet" href="/css/nav.css">
```
然后重新构建应该就可以看到效果了。
+43
View File
@@ -0,0 +1,43 @@
---
title: 自建renovate-bot
categories:
- 技术
cover: https://pic.biss.click/image/fca16741-64fa-495b-aa5e-a2ef077461ef.webp
swiper_index: 3
tags:
- gitea
abbrlink: 56f57c0b
summary: >-
这篇文章介绍了如何自建Renovate Bot以自动更新依赖,并通过Docker Compose进行部署。首先,文章提供了Renovate
Bot的Docker Compose文件配置,包括使用特定平台(gitea)、设置Git
API地址、生成Token以及启用自动发现功能。接着,建议创建一个专门用于管理Renovate
Bot的账户,并为其生成登录Token。最后,通过在系统的crontab中设置定时任务,可以自动化运行更新流程。
date: 2026-02-23 10:49:17
---
最近自建了`gitea`,所以把`renovatebot`也自建一下,毕竟`renovatebot`可以自动更新依赖,但是它不对自建`git`提供服务。
这是`docker compose`文件:
```yaml
services:
renovate:
image: renovate/renovate:latest
environment:
RENOVATE_PLATFORM: 'gitea'
RENOVATE_ENDPOINT: '你的git api地址'
RENOVATE_TOKEN: 'token'
RENOVATE_AUTODISCOVER: 'true'
RENOVATE_GIT_AUTHOR: Renovate Bot <bot@biss.click>
RENOVATE_USERNAME: renovate-bot
volumes:
- ./renovate-data:/tmp/renovate
```
可以新建一个`renovate`用户来专门管理,然后登录这个账户创建一个登录`token`。然后再需要使用这个的仓库添加这个用户为协作者就可以了。
这个`docker`容器在运行后会自动退出,这是正常的。
可以在系统crontab新建一个定时任务,这样就可以自动运行更新。
```bash
cd /www/compose/renovatebot && docker compose run --rm renovate
```
{% link 官方文档,Renovatebot,https://docs.renovatebot.com/examples/self-hosting/ %}
Loaded 3 of 45 files, more files were not shown because too many files have changed in this diff. Show more