Compare commits
No commits in common. "main" and "v0.0-baseline" have entirely different histories.
main
...
v0.0-basel
|
|
@ -13,7 +13,3 @@ node_modules/
|
||||||
.DS_Store
|
.DS_Store
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
__pycache__/
|
__pycache__/
|
||||||
|
|
||||||
# ---- 生图工作目录 / 截图(不入库,留档图见 design-assets/)----
|
|
||||||
dsh-image-gen/
|
|
||||||
preview-shots/
|
|
||||||
|
|
|
||||||
69
README.md
|
|
@ -1,20 +1,16 @@
|
||||||
# QQGit · 极简蓝白 ins 风外观定制
|
# Gitea-font · Gitea 极简蓝白 ins 风外观定制
|
||||||
|
|
||||||
> 目标实例:`https://git.qyhhh.top`(`Gitea 1.21.11`,二进制 `/usr/local/bin/gitea`,运行用户 `git:git`)
|
> 目标实例:`https://git.qyhhh.top`(`Gitea 1.21.11`,二进制 `/usr/local/bin/gitea`,运行用户 `git:git`)
|
||||||
> 本仓库是**外观定制的工作目录(staging)**。所有改动先在这里做出来、经确认后再复制进 `/var/lib/gitea/custom`。
|
> 本仓库是**外观定制的工作目录(staging)**。所有改动先在这里做出来、经确认后再复制进 `/var/lib/gitea/custom`。
|
||||||
|
|
||||||
当前状态:**`v1.4.1-live` 已上线**(2026-11-05 部署到 `https://git.qyhhh.top`;未登录落地页改为方案 A+B:左文右图首屏 + 热门公开仓库三卡,`DEFAULT_THEME = qq-auto`,旧主题全部保留可切回)。
|
|
||||||
|
|
||||||
## 一、铁律(不可违反)
|
## 一、铁律(不可违反)
|
||||||
|
|
||||||
1. **只改外观,不改源码**:唯一允许的手段是 Gitea 官方的 `custom/` 覆盖机制——
|
1. **只改外观,不改源码**:唯一允许的手段是 Gitea 官方的 `custom/` 覆盖机制——
|
||||||
`custom/templates/*.tmpl`(模板覆盖 / 注入钩子)、`custom/public/assets/css|js|img|fonts`(静态资源)。
|
`custom/templates/*.tmpl`(模板覆盖 / 注入钩子)、`custom/public/assets/css|js|img|fonts`(静态资源)。
|
||||||
**绝不**修改 `/usr/local/bin/gitea` 二进制、**绝不**重新编译、**绝不**改 `/var/lib/gitea` 以外的源码树。
|
**绝不**修改 `/usr/local/bin/gitea` 二进制、**绝不**重新编译、**绝不**改 `/var/lib/gitea` 以外的源码树。
|
||||||
2. **先工作目录、后线上**:`custom/` 只是「待发布副本」;只有拿到明确批准后才执行 `scripts/deploy.sh --yes`。
|
2. **先工作目录、后线上**:`custom/` 只是「待发布副本」;只有拿到明确批准后才执行 `scripts/deploy.sh`。
|
||||||
`deploy.sh` 不加 `--yes` 时只做预演,不会动线上任何文件。
|
3. **线上基线可回滚**:部署前自动打包备份,`scripts/rollback.sh` 可一键还原。
|
||||||
3. **线上基线可回滚**:部署前自动打包备份到 `/var/backups/gitea-custom-<时间戳>.tar.gz`,
|
4. **视觉铁律**:无文字(No text)、蓝白配色、**禁止绿色**(告别 Gitea 原版绿茶杯)、大量留白。
|
||||||
`scripts/rollback.sh` 可一键还原。
|
|
||||||
4. **视觉铁律**:无文字(No text)、蓝白配色、**禁止绿色**、大量留白。
|
|
||||||
|
|
||||||
## 二、视觉语言
|
## 二、视觉语言
|
||||||
|
|
||||||
|
|
@ -24,69 +20,50 @@
|
||||||
| 日间色 | 圆章 `#60A5FA`,轨迹 `#FFFFFF` |
|
| 日间色 | 圆章 `#60A5FA`,轨迹 `#FFFFFF` |
|
||||||
| 夜间色 | 圆章 `#38BDF8`,轨迹 `#F8FAFC`(低眩光,仅调明度,符号完全一致) |
|
| 夜间色 | 圆章 `#38BDF8`,轨迹 `#F8FAFC`(低眩光,仅调明度,符号完全一致) |
|
||||||
| 圆外 | **100% 透明(Alpha=0)**,任何顶栏底色下都无白边方框 |
|
| 圆外 | **100% 透明(Alpha=0)**,任何顶栏底色下都无白边方框 |
|
||||||
| 主色 | 浅色 `#3B82F6`(hover `#2563EB` / active `#1D4ED8`),深色 `#38BDF8`(hover `#7DD3FC`) |
|
| 主色 | 浅蓝 `#60A5FA` / `#0EA5E9` / 深色模式 `#38BDF8` |
|
||||||
| 台面色 | 浅色 body `#FFFFFF` / header `#F8FAFC`;深色 body `#0D1117` / box `#161B22` |
|
| 字体 | `JetBrains Mono` / `JetBrains Mono Nerd Font`(代码、Hash、分支名优先) |
|
||||||
| 字体 | `JetBrains Mono`(wght 400/500/700,woff2 本地内置,不走 CDN) |
|
| 圆角 | `10px` 卡片 / 输入框,克制的呼吸留白 |
|
||||||
| 圆角 | `8px` |
|
|
||||||
|
|
||||||
## 三、目录结构
|
## 三、目录结构
|
||||||
|
|
||||||
```
|
```
|
||||||
.
|
.
|
||||||
├── baseline/ # 线上基线快照(部署前的原始状态,回滚依据)
|
├── baseline/ # 线上基线快照(部署前的原始状态,回滚依据)
|
||||||
│ ├── app-ini/ui-section.txt # [ui] 段落快照;app.ini 原件含 SMTP 凭据,已 gitignore
|
│ ├── app-ini/ui-section.txt # [ui] 段落快照;app.ini 原件含凭据,已 gitignore
|
||||||
│ └── custom/ # /var/lib/gitea/custom 的完整副本
|
│ └── custom/ # /var/lib/gitea/custom 的完整副本
|
||||||
├── upstream-templates-1.21.11/ # 从二进制导出的官方原生模板(只读参考,防跨版本 DOM 错位)
|
├── upstream-templates-1.21.11/ # 从二进制导出的官方原生模板(只读参考,防跨版本 DOM 错位)
|
||||||
├── vendor/ # 官方 index.css / theme-auto.css 原件(变量派生源,留档)
|
|
||||||
├── design-assets/ # Logo 设计原图与决策记录
|
├── design-assets/ # Logo 设计原图与决策记录
|
||||||
├── custom/ # ★ 待发布的覆盖层(部署时整体同步到线上 custom/)
|
├── custom/ # ★ 待发布的覆盖层(部署时整体同步到线上 custom/)
|
||||||
│ ├── templates/ # custom/header.tmpl、custom/footer.tmpl、home.tmpl
|
│ ├── templates/ # 模板覆盖 + custom/ 注入钩子
|
||||||
│ └── public/assets/ # css(qq-ui + 3 主题)/ img(Logo 全套)/ fonts
|
│ └── public/assets/ # css / js / img / fonts
|
||||||
├── preview/ # 离线可视化预览画廊(本地打开即可看效果,无需线上改动)
|
├── preview/ # 离线可视化预览画廊(本地打开即可看效果,无需线上改动)
|
||||||
├── scripts/ # build_theme.py / audit_colors.py / deploy.sh / rollback.sh
|
└── scripts/ # deploy.sh / rollback.sh
|
||||||
├── docs/DEPLOY.md # 部署与回滚手册
|
|
||||||
└── docs/TODO.md # 分阶段任务清单(本仓库的持久化 todo)
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## 四、看预览(不碰线上)
|
## 四、标准工作流
|
||||||
|
|
||||||
浏览器直接打开 `preview/index.html` 即可:
|
|
||||||
|
|
||||||
- 右上角胶囊切换 **浅色 / 自动 / 深色**,同一份标记实时换肤;
|
|
||||||
- 页面依次展示:首页 hero + 三卡、仓库列表、仓库文件页 + 代码块、按钮/标签/输入框组件、
|
|
||||||
**Logo 在 `#FFFFFF` / `#0D1117` 顶栏上的无白边校验**;
|
|
||||||
- 预览页额外使用 `custom/public/assets/css/*` 与 `fonts/*`,所以看到的就是线上会生效的资源。
|
|
||||||
|
|
||||||
## 五、标准工作流
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# 1) 开发(只动 custom/ 与 preview/)
|
# 1) 本地开发(只动 custom/ 与 preview/)
|
||||||
# 改配色只需动 scripts/build_theme.py 顶部的常量,然后:
|
git checkout -b feat/xxx
|
||||||
python3 scripts/build_theme.py && python3 scripts/audit_colors.py
|
|
||||||
|
|
||||||
# 2) 打候选版本,等批准(按实际版本号替换 X.Y.Z)
|
# 2) 打候选版本,等批准
|
||||||
git tag vX.Y.Z-rc1
|
git tag v1.0-rc1
|
||||||
|
|
||||||
# 3) 批准后部署(先备份,再同步、修权限、重启)
|
# 3) 批准后部署(内部会先备份,再同步、修权限、重载)
|
||||||
./scripts/deploy.sh # 预演,安全
|
sudo ./scripts/deploy.sh
|
||||||
./scripts/deploy.sh --yes # 真部署
|
|
||||||
|
|
||||||
# 4) 需要撤销时
|
# 4) 需要撤销时
|
||||||
./scripts/rollback.sh --list
|
sudo ./scripts/rollback.sh
|
||||||
./scripts/rollback.sh /var/backups/gitea-custom-<时间戳>.tar.gz
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## 六、版本标签约定
|
## 五、版本标签约定
|
||||||
|
|
||||||
| 标签 | 含义 |
|
| 标签 | 含义 |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| `v0.0-baseline` | 线上原始状态 + 官方 1.21.11 模板快照 |
|
| `v0.0-baseline` | 线上原始状态 + 官方 1.21.11 模板快照 |
|
||||||
| `vX.Y.Z-rcN` | 已完成本地检查、等待批准部署的候选版本 |
|
| `v1.0-rcN` | 工作目录候选版本,等待确认 |
|
||||||
| `vX.Y.Z-live` | 已部署到线上并通过验收的版本 |
|
| `v1.0-live` | 已部署到线上并通过验收 |
|
||||||
| `v1.4.1-live` | 当前线上版本:字标改 Inter 800;明亮模式去背景粒子/hero 光斑/分支卡毛玻璃,仓库卡改不透明白底 |
|
|
||||||
| `v1.4-live` | 方案 A+B 落地页:方案 A+B 落地页(首屏分栏 + terminal 复制窗 + 热门公开仓库三卡,删数字条) |
|
|
||||||
| `v1.3.13-live` | 上一版:搜索框去内框 + 最近动态首项直角修复 |
|
|
||||||
|
|
||||||
## 七、上传限制(现状记录,不在本次改动范围)
|
## 六、上传限制(现状记录,不在本次改动范围)
|
||||||
|
|
||||||
`app.ini` 中 `[picture]` 段已调大:`AVATAR_MAX_FILE_SIZE = 52428800`、`AVATAR_MAX_WIDTH/HEIGHT = 4096`。
|
`app.ini` 中 `[picture]` 段已调大:`AVATAR_MAX_FILE_SIZE = 52428800`、`AVATAR_MAX_WIDTH/HEIGHT = 4096`。
|
||||||
|
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
APP_NAME = QQGit
|
|
||||||
(原值: QQgit: QQ的git仓库)
|
|
||||||
修改时间: 2026-11-02T18:32:44+08:00
|
|
||||||
备份: /etc/gitea/app.ini.bak-20261102-183223
|
|
||||||
|
|
@ -1,491 +0,0 @@
|
||||||
/*
|
|
||||||
* qq-fx.css —— 首页 / 登录页的动效与氛围层
|
|
||||||
* ---------------------------------------------------------------------------
|
|
||||||
* 加载顺序:theme-qq-*.css → index.css → qq-ui.css → qq-fx.css(本文件)
|
|
||||||
* 因此这里的规则可以放心覆盖前面几层,且全部走 --color-* 变量,深浅色自动跟随。
|
|
||||||
*
|
|
||||||
* 结构:
|
|
||||||
* 1. 全局氛围(只在 body.qq-fx-active 下生效):粒子画布 + 两团缓慢漂移的光雾
|
|
||||||
* 2. 首页 hero:旋转光环 + 渐变标题 + 打字口号 + 鼠标光斑
|
|
||||||
* 3. 首页三卡:毛玻璃 + 悬停抬升 + 顶部渐变细线
|
|
||||||
* 4. 登录页:整块毛玻璃卡片 + 渐变描边 + 输入框聚焦光晕 + 按钮流光
|
|
||||||
* 5. 无障碍:prefers-reduced-motion 全关
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* =========================================================================
|
|
||||||
1. 全局氛围
|
|
||||||
========================================================================= */
|
|
||||||
html {
|
|
||||||
background-color: var(--color-body);
|
|
||||||
}
|
|
||||||
|
|
||||||
body.qq-fx-active {
|
|
||||||
position: relative;
|
|
||||||
min-height: 100vh;
|
|
||||||
overflow-x: hidden;
|
|
||||||
background-color: var(--color-body);
|
|
||||||
}
|
|
||||||
|
|
||||||
#qq-fx-canvas {
|
|
||||||
position: fixed;
|
|
||||||
inset: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
z-index: 0;
|
|
||||||
pointer-events: none;
|
|
||||||
opacity: 0.9;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 两团极慢漂移的光雾,给纯白/纯黑背景一点体积感 */
|
|
||||||
body.qq-fx-active::before,
|
|
||||||
body.qq-fx-active::after {
|
|
||||||
content: "";
|
|
||||||
position: fixed;
|
|
||||||
z-index: 0;
|
|
||||||
pointer-events: none;
|
|
||||||
border-radius: 50%;
|
|
||||||
filter: blur(70px);
|
|
||||||
opacity: 0.55;
|
|
||||||
will-change: transform;
|
|
||||||
}
|
|
||||||
|
|
||||||
body.qq-fx-active::before {
|
|
||||||
width: 46vw;
|
|
||||||
height: 46vw;
|
|
||||||
left: -12vw;
|
|
||||||
top: -14vw;
|
|
||||||
background: radial-gradient(circle at 50% 50%,
|
|
||||||
color-mix(in srgb, var(--color-primary) 30%, transparent) 0%,
|
|
||||||
transparent 68%);
|
|
||||||
animation: qq-drift-a 26s ease-in-out infinite;
|
|
||||||
}
|
|
||||||
|
|
||||||
body.qq-fx-active::after {
|
|
||||||
width: 40vw;
|
|
||||||
height: 40vw;
|
|
||||||
right: -10vw;
|
|
||||||
bottom: -12vw;
|
|
||||||
background: radial-gradient(circle at 50% 50%,
|
|
||||||
color-mix(in srgb, #38BDF8 26%, transparent) 0%,
|
|
||||||
transparent 70%);
|
|
||||||
animation: qq-drift-b 32s ease-in-out infinite;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 内容压在氛围层之上 */
|
|
||||||
body.qq-fx-active > .full.height,
|
|
||||||
body.qq-fx-active .page {
|
|
||||||
position: relative;
|
|
||||||
z-index: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes qq-drift-a {
|
|
||||||
0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
|
|
||||||
50% { transform: translate3d(6vw, 5vw, 0) scale(1.12); }
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes qq-drift-b {
|
|
||||||
0%, 100% { transform: translate3d(0, 0, 0) scale(1.05); }
|
|
||||||
50% { transform: translate3d(-5vw, -4vw, 0) scale(0.94); }
|
|
||||||
}
|
|
||||||
|
|
||||||
/* =========================================================================
|
|
||||||
2. 首页 hero
|
|
||||||
========================================================================= */
|
|
||||||
.page-content.home.qq-home {
|
|
||||||
padding-top: 6vh;
|
|
||||||
}
|
|
||||||
|
|
||||||
.qq-hero {
|
|
||||||
position: relative;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
gap: 10px;
|
|
||||||
padding: 2vh 0 5vh;
|
|
||||||
text-align: center;
|
|
||||||
--qq-mx: 50%;
|
|
||||||
--qq-my: 40%;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 鼠标光斑(JS 只改两个变量) */
|
|
||||||
.qq-hero::before {
|
|
||||||
content: "";
|
|
||||||
position: absolute;
|
|
||||||
inset: -8% -20%;
|
|
||||||
z-index: -1;
|
|
||||||
pointer-events: none;
|
|
||||||
background: radial-gradient(320px circle at var(--qq-mx) var(--qq-my),
|
|
||||||
color-mix(in srgb, var(--color-primary) 16%, transparent),
|
|
||||||
transparent 62%);
|
|
||||||
transition: background 0.12s linear;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 光晕:静态柔光,不旋转(QQ 反馈「这一圈光在转圈圈没必要」) */
|
|
||||||
.qq-logo-halo {
|
|
||||||
position: relative;
|
|
||||||
width: 172px;
|
|
||||||
height: 172px;
|
|
||||||
display: grid;
|
|
||||||
place-items: center;
|
|
||||||
margin-bottom: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.qq-logo-halo::before {
|
|
||||||
content: "";
|
|
||||||
position: absolute;
|
|
||||||
inset: -18px;
|
|
||||||
border-radius: 50%;
|
|
||||||
background: radial-gradient(
|
|
||||||
circle at 50% 50%,
|
|
||||||
color-mix(in srgb, var(--color-primary) 34%, transparent) 0%,
|
|
||||||
color-mix(in srgb, var(--color-primary) 15%, transparent) 46%,
|
|
||||||
transparent 72%
|
|
||||||
);
|
|
||||||
filter: blur(14px);
|
|
||||||
opacity: 0.9;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 不再画细描边圆环:只留柔光,避免「一圈光」的观感 */
|
|
||||||
.qq-logo-halo::after {
|
|
||||||
content: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.qq-logo-halo .logo {
|
|
||||||
width: 152px;
|
|
||||||
height: 152px;
|
|
||||||
border-radius: 50%;
|
|
||||||
animation: qq-breathe 7s ease-in-out infinite;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes qq-breathe {
|
|
||||||
0%, 100% { transform: translateY(0) scale(1); }
|
|
||||||
50% { transform: translateY(-5px) scale(1.02); }
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 渐变标题:字色随背景流动 */
|
|
||||||
.qq-hero-title {
|
|
||||||
margin: 0;
|
|
||||||
font-size: clamp(38px, 6.2vw, 66px);
|
|
||||||
font-weight: 800;
|
|
||||||
line-height: 1.1;
|
|
||||||
letter-spacing: -0.02em;
|
|
||||||
background: linear-gradient(100deg,
|
|
||||||
var(--color-text) 6%,
|
|
||||||
var(--color-primary) 38%,
|
|
||||||
#38BDF8 62%,
|
|
||||||
var(--color-text) 94%);
|
|
||||||
background-size: 240% 100%;
|
|
||||||
-webkit-background-clip: text;
|
|
||||||
background-clip: text;
|
|
||||||
color: transparent;
|
|
||||||
-webkit-text-fill-color: transparent;
|
|
||||||
animation: qq-shimmer 9s ease-in-out infinite;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes qq-shimmer {
|
|
||||||
0%, 100% { background-position: 0% 50%; }
|
|
||||||
50% { background-position: 100% 50%; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 口号 + 光标 */
|
|
||||||
.qq-hero-tag {
|
|
||||||
min-height: 1.6em;
|
|
||||||
margin: 2px 0 0;
|
|
||||||
font-size: 15px;
|
|
||||||
letter-spacing: 0.04em;
|
|
||||||
color: var(--color-text-light-2);
|
|
||||||
}
|
|
||||||
|
|
||||||
.qq-hero-tag.qq-typing::after,
|
|
||||||
.qq-hero-tag.qq-typed::after {
|
|
||||||
content: "▌";
|
|
||||||
margin-left: 2px;
|
|
||||||
color: var(--color-primary);
|
|
||||||
animation: qq-caret 1.1s step-end infinite;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes qq-caret {
|
|
||||||
0%, 49% { opacity: 1; }
|
|
||||||
50%, 100% { opacity: 0; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/* =========================================================================
|
|
||||||
3. 首页三卡
|
|
||||||
========================================================================= */
|
|
||||||
.qq-home-cards {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
|
|
||||||
gap: 16px;
|
|
||||||
max-width: 980px;
|
|
||||||
margin: 0 auto;
|
|
||||||
padding: 0 0 9vh;
|
|
||||||
}
|
|
||||||
|
|
||||||
.qq-home-card {
|
|
||||||
position: relative;
|
|
||||||
padding: 20px 22px;
|
|
||||||
border: 1px solid var(--color-secondary);
|
|
||||||
border-radius: 16px;
|
|
||||||
background: color-mix(in srgb, var(--color-box-body) 72%, transparent);
|
|
||||||
backdrop-filter: blur(14px);
|
|
||||||
-webkit-backdrop-filter: blur(14px);
|
|
||||||
overflow: hidden;
|
|
||||||
transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
|
|
||||||
border-color 0.3s ease, box-shadow 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 悬停时从顶部扫过的一条渐变细线 */
|
|
||||||
.qq-home-card::after {
|
|
||||||
content: "";
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
top: 0;
|
|
||||||
height: 2px;
|
|
||||||
width: 100%;
|
|
||||||
background: linear-gradient(90deg, transparent, var(--color-primary), #38BDF8, transparent);
|
|
||||||
transform: scaleX(0);
|
|
||||||
transform-origin: left center;
|
|
||||||
transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.qq-home-card:hover {
|
|
||||||
transform: translateY(-6px);
|
|
||||||
border-color: color-mix(in srgb, var(--color-primary) 45%, transparent);
|
|
||||||
box-shadow: 0 20px 44px -22px color-mix(in srgb, var(--color-primary) 60%, transparent);
|
|
||||||
}
|
|
||||||
|
|
||||||
.qq-home-card:hover::after {
|
|
||||||
transform: scaleX(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.qq-home-card h3 {
|
|
||||||
margin: 0 0 8px;
|
|
||||||
font-size: 15px;
|
|
||||||
font-weight: 600;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 8px;
|
|
||||||
color: var(--color-text);
|
|
||||||
}
|
|
||||||
|
|
||||||
.qq-home-card h3 svg {
|
|
||||||
color: var(--color-primary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.qq-home-card p {
|
|
||||||
margin: 0;
|
|
||||||
font-size: 13px;
|
|
||||||
line-height: 1.75;
|
|
||||||
color: var(--color-text-light-2);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* =========================================================================
|
|
||||||
4. 登录页
|
|
||||||
========================================================================= */
|
|
||||||
.page-content.user.signin .ui.middle.very.relaxed.page.grid {
|
|
||||||
margin-top: 5vh;
|
|
||||||
}
|
|
||||||
|
|
||||||
.page-content.user.signin .ui.container.column.fluid {
|
|
||||||
position: relative;
|
|
||||||
width: 100%;
|
|
||||||
max-width: 560px;
|
|
||||||
margin: 0 auto;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 卡片外发光 */
|
|
||||||
.page-content.user.signin .ui.container.column.fluid::before {
|
|
||||||
content: "";
|
|
||||||
position: absolute;
|
|
||||||
inset: -2px;
|
|
||||||
z-index: -1;
|
|
||||||
border-radius: 22px;
|
|
||||||
background: linear-gradient(135deg,
|
|
||||||
color-mix(in srgb, var(--color-primary) 55%, transparent),
|
|
||||||
transparent 45%,
|
|
||||||
color-mix(in srgb, #38BDF8 45%, transparent));
|
|
||||||
filter: blur(14px);
|
|
||||||
opacity: 0.5;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 顶部标题:从「贴附表头」变成卡片标题 */
|
|
||||||
.page-content.user.signin h4.ui.top.attached.header.center {
|
|
||||||
margin: 0;
|
|
||||||
padding: 26px 0 10px;
|
|
||||||
border: 1px solid var(--color-secondary);
|
|
||||||
border-bottom: 0;
|
|
||||||
border-radius: 18px 18px 0 0;
|
|
||||||
background: color-mix(in srgb, var(--color-box-body) 78%, transparent);
|
|
||||||
backdrop-filter: blur(18px);
|
|
||||||
-webkit-backdrop-filter: blur(18px);
|
|
||||||
font-size: 20px;
|
|
||||||
font-weight: 700;
|
|
||||||
letter-spacing: 0.06em;
|
|
||||||
color: var(--color-text);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 表单主体:毛玻璃卡片 */
|
|
||||||
.page-content.user.signin .ui.attached.segment {
|
|
||||||
margin: 0;
|
|
||||||
padding: 18px 24px 26px;
|
|
||||||
border: 1px solid var(--color-secondary);
|
|
||||||
border-top: 0;
|
|
||||||
border-radius: 0 0 18px 18px;
|
|
||||||
background: color-mix(in srgb, var(--color-box-body) 78%, transparent);
|
|
||||||
backdrop-filter: blur(18px);
|
|
||||||
-webkit-backdrop-filter: blur(18px);
|
|
||||||
box-shadow: 0 30px 70px -40px color-mix(in srgb, var(--color-primary) 75%, transparent);
|
|
||||||
font-size: 13px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 登录/注册/OpenID 三个页签,收成卡片顶部的一条 */
|
|
||||||
.page-content.user.signin .new-menu.navbar {
|
|
||||||
margin: 0 auto;
|
|
||||||
max-width: 560px;
|
|
||||||
border-bottom: 1px solid var(--color-secondary);
|
|
||||||
background: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
.page-content.user.signin .new-menu.navbar .item {
|
|
||||||
padding: 10px 14px;
|
|
||||||
font-size: 13px;
|
|
||||||
border-radius: 8px 8px 0 0;
|
|
||||||
transition: color 0.2s ease, background 0.2s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.page-content.user.signin .new-menu.navbar .item.active {
|
|
||||||
color: var(--color-primary);
|
|
||||||
background: color-mix(in srgb, var(--color-primary) 10%, transparent);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 输入框:圆角 + 聚焦光晕 */
|
|
||||||
.page-content.user.signin .ui.form .field input {
|
|
||||||
padding: 11px 14px;
|
|
||||||
border-radius: 10px;
|
|
||||||
border: 1px solid var(--color-input-border, var(--color-secondary));
|
|
||||||
background: var(--color-input-background, var(--color-body));
|
|
||||||
color: var(--color-input-text, var(--color-text));
|
|
||||||
transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 复选框文字在深色下别丢 */
|
|
||||||
.page-content.user.signin .ui.checkbox label {
|
|
||||||
color: var(--color-text-light-2);
|
|
||||||
}
|
|
||||||
|
|
||||||
.page-content.user.signin .ui.form .field > label {
|
|
||||||
color: var(--color-text-light-2);
|
|
||||||
}
|
|
||||||
|
|
||||||
.page-content.user.signin .ui.form .field input:focus {
|
|
||||||
border-color: var(--color-primary);
|
|
||||||
box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-primary) 18%, transparent);
|
|
||||||
outline: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 主按钮:渐变底 + 悬停流光 */
|
|
||||||
.page-content.user.signin .ui.primary.button {
|
|
||||||
position: relative;
|
|
||||||
min-width: 108px;
|
|
||||||
border: 0;
|
|
||||||
border-radius: 10px;
|
|
||||||
background: linear-gradient(120deg, var(--color-primary), #38BDF8 55%, var(--color-primary));
|
|
||||||
background-size: 200% 100%;
|
|
||||||
box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--color-primary) 85%, transparent);
|
|
||||||
transition: background-position 0.5s ease, transform 0.15s ease, box-shadow 0.3s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.page-content.user.signin .ui.primary.button:hover {
|
|
||||||
background-position: 100% 0;
|
|
||||||
transform: translateY(-1px);
|
|
||||||
box-shadow: 0 14px 28px -12px color-mix(in srgb, var(--color-primary) 90%, transparent);
|
|
||||||
}
|
|
||||||
|
|
||||||
.page-content.user.signin .ui.primary.button:active {
|
|
||||||
transform: translateY(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 「记住此设备」这类复选框也跟着主色走 */
|
|
||||||
.page-content.user.signin .ui.checkbox input:checked ~ label::before,
|
|
||||||
.page-content.user.signin .ui.checkbox label::before {
|
|
||||||
border-color: var(--color-secondary);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* =========================================================================
|
|
||||||
5. 减少动态效果
|
|
||||||
========================================================================= */
|
|
||||||
@media (prefers-reduced-motion: reduce) {
|
|
||||||
/* 过渡也一并压掉:主题在 JS 切换时有 200ms 过渡,弱动画用户不应看到它 */
|
|
||||||
*,
|
|
||||||
*::before,
|
|
||||||
*::after {
|
|
||||||
transition-duration: 0.01ms !important;
|
|
||||||
animation-duration: 0.01ms !important;
|
|
||||||
animation-iteration-count: 1 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
body.qq-fx-active::before,
|
|
||||||
body.qq-fx-active::after,
|
|
||||||
.qq-logo-halo::before,
|
|
||||||
.qq-logo-halo .logo,
|
|
||||||
.qq-hero-title {
|
|
||||||
animation: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.qq-hero-tag.qq-typing::after,
|
|
||||||
.qq-hero-tag.qq-typed::after {
|
|
||||||
animation: none;
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.qq-home-card,
|
|
||||||
.qq-home-card::after,
|
|
||||||
.page-content.user.signin .ui.primary.button {
|
|
||||||
transition: none !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 窄屏:光环缩小,卡片贴边 */
|
|
||||||
@media (max-width: 600px) {
|
|
||||||
.qq-logo-halo { width: 132px; height: 132px; }
|
|
||||||
.qq-logo-halo .logo { width: 118px; height: 118px; }
|
|
||||||
.qq-hero { padding: 3vh 0 6vh; gap: 8px; }
|
|
||||||
.qq-hero-title { font-size: clamp(32px, 11vw, 46px); }
|
|
||||||
.qq-hero-tag { font-size: 14px; }
|
|
||||||
.qq-home-cards { padding: 0 16px 9vh; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 表单字段:强制「标签在左、输入框在右」的一行式布局。
|
|
||||||
index.css 里 .inline.field 的行为在窄容器下会退化成上下堆叠,
|
|
||||||
这里用显式 flex 规则钉死,保证深浅色/窄屏都是同一套版式。 */
|
|
||||||
.page-content.user.signin .ui.form .field {
|
|
||||||
display: flex !important;
|
|
||||||
flex-direction: row !important;
|
|
||||||
flex-wrap: nowrap !important;
|
|
||||||
align-items: center !important;
|
|
||||||
gap: 12px !important;
|
|
||||||
margin: 0 0 14px 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.page-content.user.signin .ui.form .field > label {
|
|
||||||
flex: 0 0 96px !important;
|
|
||||||
width: 96px !important;
|
|
||||||
margin: 0 !important;
|
|
||||||
text-align: right !important;
|
|
||||||
font-size: 13px !important;
|
|
||||||
line-height: 1.6 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.page-content.user.signin .ui.form .field > input {
|
|
||||||
flex: 1 1 auto !important;
|
|
||||||
width: auto !important;
|
|
||||||
min-width: 0 !important;
|
|
||||||
box-sizing: border-box !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.page-content.user.signin .ui.form .field > .ui.checkbox,
|
|
||||||
.page-content.user.signin .ui.form .field > button,
|
|
||||||
.page-content.user.signin .ui.form .field > a {
|
|
||||||
flex: 0 0 auto !important;
|
|
||||||
}
|
|
||||||
|
|
@ -1,323 +0,0 @@
|
||||||
/*!
|
|
||||||
* qq-ui.css —— 「蓝白 ins 风」细节层
|
|
||||||
* 由 custom/templates/custom/header.tmpl 注入,排在主题之后加载。
|
|
||||||
* 全部基于主题 CSS 变量(--color-*),因此浅色 / 深色 / 自动三种模式都能自适应,
|
|
||||||
* 不写死任何颜色,也不触碰 Gitea 的布局逻辑。
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* ---------------------------------------------------------------- 字体 */
|
|
||||||
@font-face {
|
|
||||||
font-family: "Inter";
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 800;
|
|
||||||
font-display: swap;
|
|
||||||
src: url("../fonts/inter-latin-800-normal.woff2") format("woff2");
|
|
||||||
}
|
|
||||||
@font-face {
|
|
||||||
font-family: "JetBrains Mono";
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 400;
|
|
||||||
font-display: swap;
|
|
||||||
src: url("../fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
|
|
||||||
}
|
|
||||||
@font-face {
|
|
||||||
font-family: "JetBrains Mono";
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 500;
|
|
||||||
font-display: swap;
|
|
||||||
src: url("../fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2");
|
|
||||||
}
|
|
||||||
@font-face {
|
|
||||||
font-family: "JetBrains Mono";
|
|
||||||
font-style: normal;
|
|
||||||
font-weight: 700;
|
|
||||||
font-display: swap;
|
|
||||||
src: url("../fonts/jetbrains-mono-latin-700-normal.woff2") format("woff2");
|
|
||||||
}
|
|
||||||
|
|
||||||
:root {
|
|
||||||
--qq-font-mono: "JetBrains Mono", "JetBrains Mono Nerd Font", ui-monospace,
|
|
||||||
SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
|
|
||||||
/* 与 Gitea 自带的圆角变量对齐:克制的大圆角,ins 感来自留白而不是圆角 */
|
|
||||||
--border-radius: 8px;
|
|
||||||
--border-radius-medium: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ---------------------------------------------------------------- 等宽字体场景 */
|
|
||||||
pre,
|
|
||||||
code,
|
|
||||||
kbd,
|
|
||||||
samp,
|
|
||||||
.mono,
|
|
||||||
.sha.label,
|
|
||||||
.commit-id,
|
|
||||||
.file-content,
|
|
||||||
.lines-code,
|
|
||||||
.repository .commit-list .message,
|
|
||||||
.ui.table.code td,
|
|
||||||
.ui.label.commit-id {
|
|
||||||
font-family: var(--qq-font-mono);
|
|
||||||
font-variant-ligatures: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ---------------------------------------------------------------- 顶栏:细线 + 轻磨砂 */
|
|
||||||
#navbar {
|
|
||||||
/* backdrop-filter 创建独立层叠上下文;将整个导航层抬到正文和 sticky 侧栏之上。
|
|
||||||
仅提高菜单自身 z-index 无法越过父层;30 仍低于原生模态遮罩。 */
|
|
||||||
position: relative;
|
|
||||||
z-index: 30;
|
|
||||||
border-bottom: 1px solid var(--color-secondary);
|
|
||||||
backdrop-filter: saturate(150%) blur(8px);
|
|
||||||
-webkit-backdrop-filter: saturate(150%) blur(8px);
|
|
||||||
}
|
|
||||||
|
|
||||||
#navbar .item {
|
|
||||||
border-radius: var(--border-radius);
|
|
||||||
}
|
|
||||||
|
|
||||||
#navbar-logo img {
|
|
||||||
width: 30px;
|
|
||||||
height: 30px;
|
|
||||||
transition: transform 160ms ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
#navbar-logo:hover img {
|
|
||||||
transform: scale(1.08);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ---------------------------------------------------------------- 卡片 / 按钮 */
|
|
||||||
.ui.segment,
|
|
||||||
.ui.card,
|
|
||||||
.repository .segment,
|
|
||||||
.ui.form input,
|
|
||||||
.ui.form textarea,
|
|
||||||
.ui.input > input {
|
|
||||||
border-radius: var(--border-radius);
|
|
||||||
}
|
|
||||||
|
|
||||||
.ui.card,
|
|
||||||
.ui.segment {
|
|
||||||
border-color: var(--color-secondary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.ui.primary.button,
|
|
||||||
.ui.basic.primary.button,
|
|
||||||
.ui.green.button {
|
|
||||||
border-radius: var(--border-radius);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 链接更轻,下划线更细 */
|
|
||||||
.markup a,
|
|
||||||
.repository .file-body a {
|
|
||||||
text-decoration-thickness: 1px;
|
|
||||||
text-underline-offset: 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 滚动条(Chromium / Safari)随主题变色 */
|
|
||||||
* {
|
|
||||||
scrollbar-color: var(--color-secondary) transparent;
|
|
||||||
scrollbar-width: thin;
|
|
||||||
}
|
|
||||||
|
|
||||||
*::-webkit-scrollbar {
|
|
||||||
width: 10px;
|
|
||||||
height: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
*::-webkit-scrollbar-thumb {
|
|
||||||
background: var(--color-secondary);
|
|
||||||
border-radius: 999px;
|
|
||||||
}
|
|
||||||
|
|
||||||
*::-webkit-scrollbar-thumb:hover {
|
|
||||||
background: var(--color-secondary-dark-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ---------------------------------------------------------------- 首页:极简居中 */
|
|
||||||
.page-content.home {
|
|
||||||
padding-top: 8vh;
|
|
||||||
}
|
|
||||||
|
|
||||||
.page-content.home .logo {
|
|
||||||
width: 168px;
|
|
||||||
height: 168px;
|
|
||||||
margin-bottom: 24px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.page-content.home .hero h1.title {
|
|
||||||
font-weight: 600;
|
|
||||||
letter-spacing: 0.5px;
|
|
||||||
margin-bottom: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.page-content.home .hero h2 {
|
|
||||||
color: var(--color-text-light-2);
|
|
||||||
font-weight: 400;
|
|
||||||
font-size: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.qq-home-cards {
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
justify-content: center;
|
|
||||||
gap: 16px;
|
|
||||||
max-width: 900px;
|
|
||||||
margin: 40px auto 0;
|
|
||||||
padding: 0 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.qq-home-card {
|
|
||||||
flex: 1 1 240px;
|
|
||||||
max-width: 280px;
|
|
||||||
padding: 20px 22px;
|
|
||||||
border: 1px solid var(--color-secondary);
|
|
||||||
border-radius: var(--border-radius);
|
|
||||||
background: var(--color-box-body);
|
|
||||||
transition: border-color 160ms ease, transform 160ms ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.qq-home-card:hover {
|
|
||||||
border-color: var(--color-primary);
|
|
||||||
transform: translateY(-2px);
|
|
||||||
}
|
|
||||||
|
|
||||||
.qq-home-card h3 {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 8px;
|
|
||||||
margin: 0 0 6px;
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 600;
|
|
||||||
color: var(--color-text);
|
|
||||||
}
|
|
||||||
|
|
||||||
.qq-home-card h3 svg {
|
|
||||||
color: var(--color-primary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.qq-home-card p {
|
|
||||||
margin: 0;
|
|
||||||
font-size: 13px;
|
|
||||||
line-height: 1.6;
|
|
||||||
color: var(--color-text-light-2);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ---------------------------------------------------------------- 自定义页脚 */
|
|
||||||
.qq-footer {
|
|
||||||
margin-top: 32px;
|
|
||||||
padding: 18px 0 26px;
|
|
||||||
text-align: center;
|
|
||||||
font-size: 12px;
|
|
||||||
color: var(--color-text-light-3);
|
|
||||||
}
|
|
||||||
|
|
||||||
.qq-footer a {
|
|
||||||
color: var(--color-text-light-2);
|
|
||||||
}
|
|
||||||
|
|
||||||
.qq-footer a:hover {
|
|
||||||
color: var(--color-primary);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------------
|
|
||||||
语言圆点:列表里的 <i class="color-icon" style="background-color:…"> 颜色由 Go 侧内联注入,
|
|
||||||
颜色来自 Go 侧按语言写死的内联样式(其中 Shell 是亮绿),只有 !important 能压住。
|
|
||||||
统一收成品牌蓝,既消除 Shell 那个绿色,也避免彩虹点破坏极简感。
|
|
||||||
--------------------------------------------------------------------------- */
|
|
||||||
.color-icon {
|
|
||||||
background-color: var(--color-primary) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------------
|
|
||||||
备案号页脚:覆盖 base/footer_content.tmpl 后只剩这一条。
|
|
||||||
position:sticky + bottom:0 让它「悬挂」在视口底部——内容不满一屏时也贴底,
|
|
||||||
内容很长时随页面滚到底部才出现。背景半透明 + 模糊,滚动时不挡视线。
|
|
||||||
--------------------------------------------------------------------------- */
|
|
||||||
.page-footer.qq-icp-footer {
|
|
||||||
position: fixed;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
z-index: 20;
|
|
||||||
/* index.css 里 .page-footer 在窄屏会变成 column + space-between,
|
|
||||||
这里逐条压回去,保证永远是「一行、居中」 */
|
|
||||||
display: flex !important;
|
|
||||||
flex-direction: row !important;
|
|
||||||
flex-wrap: nowrap !important;
|
|
||||||
justify-content: center !important;
|
|
||||||
align-items: center !important;
|
|
||||||
gap: 8px;
|
|
||||||
min-height: 34px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
padding: 9px 12px;
|
|
||||||
font-size: 12px;
|
|
||||||
line-height: 1.6;
|
|
||||||
color: var(--color-text-light-2);
|
|
||||||
background: var(--color-body);
|
|
||||||
background: color-mix(in srgb, var(--color-body) 86%, transparent);
|
|
||||||
backdrop-filter: blur(8px);
|
|
||||||
-webkit-backdrop-filter: blur(8px);
|
|
||||||
border-top: 1px solid var(--color-secondary);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 页脚三段:左 = 站点信息,中 = 语言切换,右 = 备案号
|
|
||||||
(index.css 的 .page-footer 会抢布局,这里全部用绝对定位摆,互不影响) */
|
|
||||||
.page-footer.qq-icp-footer .qq-icp {
|
|
||||||
position: absolute;
|
|
||||||
right: 14px;
|
|
||||||
top: 50%;
|
|
||||||
transform: translateY(-50%);
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 未登录访客的语言切换:居中 */
|
|
||||||
.page-footer.qq-icp-footer .qq-lang {
|
|
||||||
position: absolute;
|
|
||||||
left: 50%;
|
|
||||||
top: 50%;
|
|
||||||
transform: translate(-50%, -50%);
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 8px;
|
|
||||||
font-size: 12px;
|
|
||||||
line-height: 1;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
.page-footer.qq-icp-footer .qq-lang a {
|
|
||||||
color: var(--color-text-light-2);
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.page-footer.qq-icp-footer .qq-lang a:hover {
|
|
||||||
color: var(--color-primary);
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
|
|
||||||
.page-footer.qq-icp-footer .qq-lang-cur {
|
|
||||||
color: var(--color-primary);
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 站点信息从控制台右栏搬到底部条:靠左,与居中的备案号并排 */
|
|
||||||
.page-footer.qq-icp-footer .qq-icp-meta {
|
|
||||||
position: absolute;
|
|
||||||
left: 14px;
|
|
||||||
top: 50%;
|
|
||||||
transform: translateY(-50%);
|
|
||||||
font-size: 11.5px;
|
|
||||||
line-height: 1;
|
|
||||||
letter-spacing: 0.01em;
|
|
||||||
color: var(--color-text-light-2);
|
|
||||||
opacity: 0.72;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 640px) {
|
|
||||||
.page-footer.qq-icp-footer .qq-icp-meta { display: none; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 极窄屏挤不下就只留备案号 */
|
|
||||||
@media (max-width: 460px) {
|
|
||||||
.page-footer.qq-icp-footer .qq-lang { display: none; }
|
|
||||||
}
|
|
||||||
|
|
@ -1,508 +0,0 @@
|
||||||
/*!
|
|
||||||
* Gitea 主题 · qq(蓝白 ins 风 · 日夜自动跟随系统)
|
|
||||||
* 由 scripts/build_theme.py 从 Gitea 1.21.11 官方 CSS 自动派生,请勿手改本文件。
|
|
||||||
* 视觉规范:蓝白 ins 风 —— 纯白 / 深墨底 + 清透蓝主色 + 零绿色。
|
|
||||||
* 生成时间以 Git 提交为准;重新生成:python3 scripts/build_theme.py
|
|
||||||
*/
|
|
||||||
|
|
||||||
gitea-theme-meta-info {
|
|
||||||
--theme-display-name: "QQGit · 跟随系统";
|
|
||||||
}
|
|
||||||
|
|
||||||
:root{
|
|
||||||
--border-radius:4px;
|
|
||||||
--border-radius-circle:50%;
|
|
||||||
--border-radius-medium:6px;
|
|
||||||
--checkbox-mask-checked:url("data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"-1 -1 18 18\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z\"></path></svg>");
|
|
||||||
--checkbox-mask-indeterminate:url("data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M2 7.75A.75.75 0 012.75 7h10a.75.75 0 010 1.5h-10A.75.75 0 012 7.75z\"></path></svg>");
|
|
||||||
--color-accent:#2563EB;
|
|
||||||
--color-active:rgba(15,23,42,0.07);
|
|
||||||
--color-active-line:#fffbdd;
|
|
||||||
--color-ansi-black:var(--color-black);
|
|
||||||
--color-ansi-blue:var(--color-blue);
|
|
||||||
--color-ansi-bright-black:var(--color-black-light);
|
|
||||||
--color-ansi-bright-blue:var(--color-blue-light);
|
|
||||||
--color-ansi-bright-cyan:var(--color-teal-light);
|
|
||||||
--color-ansi-bright-green:var(--color-green-light);
|
|
||||||
--color-ansi-bright-magenta:var(--color-pink-light);
|
|
||||||
--color-ansi-bright-red:var(--color-red-light);
|
|
||||||
--color-ansi-bright-white:var(--color-console-fg);
|
|
||||||
--color-ansi-bright-yellow:var(--color-yellow-light);
|
|
||||||
--color-ansi-cyan:var(--color-teal);
|
|
||||||
--color-ansi-green:var(--color-green);
|
|
||||||
--color-ansi-magenta:var(--color-pink);
|
|
||||||
--color-ansi-red:var(--color-red);
|
|
||||||
--color-ansi-white:var(--color-console-fg-subtle);
|
|
||||||
--color-ansi-yellow:var(--color-yellow);
|
|
||||||
--color-black:#1b1c1d;
|
|
||||||
--color-black-dark-1:#18191a;
|
|
||||||
--color-black-dark-2:#161617;
|
|
||||||
--color-black-light:#525558;
|
|
||||||
--color-blue:#2185d0;
|
|
||||||
--color-blue-dark-1:#1e78bb;
|
|
||||||
--color-blue-dark-2:#1a6aa6;
|
|
||||||
--color-blue-light:#51a5e3;
|
|
||||||
--color-body:#FFFFFF;
|
|
||||||
--color-box-body:#FFFFFF;
|
|
||||||
--color-box-body-highlight:#fafafa;
|
|
||||||
--color-box-header:#F8FAFC;
|
|
||||||
--color-brown:#a5673f;
|
|
||||||
--color-brown-dark-1:#955d39;
|
|
||||||
--color-brown-dark-2:#845232;
|
|
||||||
--color-brown-light:#c58b66;
|
|
||||||
--color-button:#FFFFFF;
|
|
||||||
--color-card:#F8FAFC;
|
|
||||||
--color-caret:var(--color-text-dark);
|
|
||||||
--color-code-bg:#FFFFFF;
|
|
||||||
--color-code-sidebar-bg:#F8FAFC;
|
|
||||||
--color-console-active-bg:#454a57;
|
|
||||||
--color-console-bg:#262936;
|
|
||||||
--color-console-border:#383c47;
|
|
||||||
--color-console-fg:#eeeff2;
|
|
||||||
--color-console-fg-subtle:#959cab;
|
|
||||||
--color-console-hover-bg:#ffffff16;
|
|
||||||
--color-console-menu-bg:#383c47;
|
|
||||||
--color-console-menu-border:#5c6374;
|
|
||||||
--color-diff-added-row-bg:#e6fcff;
|
|
||||||
--color-diff-added-row-border:#e6fcff;
|
|
||||||
--color-diff-added-word-bg:#ace9f2;
|
|
||||||
--color-diff-inactive:#f2f2f2;
|
|
||||||
--color-diff-moved-row-bg:#d1f3f8;
|
|
||||||
--color-diff-moved-row-border:#7fd5e2;
|
|
||||||
--color-diff-removed-row-bg:#ffeef0;
|
|
||||||
--color-diff-removed-row-border:#f1c0c0;
|
|
||||||
--color-diff-removed-word-bg:#fdb8c0;
|
|
||||||
--color-editor-line-highlight:var(--color-primary-light-6);
|
|
||||||
--color-error-bg:#fff6f6;
|
|
||||||
--color-error-bg-active:#fbb;
|
|
||||||
--color-error-bg-hover:#fdd;
|
|
||||||
--color-error-border:#e0b4b4;
|
|
||||||
--color-error-text:#9f3a38;
|
|
||||||
--color-expand-button:#d8efff;
|
|
||||||
--color-footer:#FFFFFF;
|
|
||||||
--color-git:#f05133;
|
|
||||||
--color-gold:#a1882b;
|
|
||||||
--color-green:#0891B2;
|
|
||||||
--color-green-badge:#21a6ba;
|
|
||||||
--color-green-badge-bg:#21ba451a;
|
|
||||||
--color-green-badge-hover-bg:#21ba454d;
|
|
||||||
--color-green-dark-1:#0E7490;
|
|
||||||
--color-green-dark-2:#155E75;
|
|
||||||
--color-green-light:#22D3EE;
|
|
||||||
--color-grey:#707070;
|
|
||||||
--color-grey-light:#838383;
|
|
||||||
--color-header-wrapper:#FFFFFF;
|
|
||||||
--color-hover:rgba(15,23,42,0.04);
|
|
||||||
--color-info-bg:#f8ffff;
|
|
||||||
--color-info-border:#a9d5de;
|
|
||||||
--color-info-text:#276f86;
|
|
||||||
--color-input-background:#F8FAFC;
|
|
||||||
--color-input-border:#E2E8F0;
|
|
||||||
--color-input-border-hover:var(--color-secondary-dark-1);
|
|
||||||
--color-input-text:#0F172A;
|
|
||||||
--color-input-toggle-background:#dedede;
|
|
||||||
--color-label-active-bg:#cacaca;
|
|
||||||
--color-label-bg:#cacaca5b;
|
|
||||||
--color-label-hover-bg:#cacacaa0;
|
|
||||||
--color-label-text:#0F172A;
|
|
||||||
--color-light:#00000006;
|
|
||||||
--color-light-border:rgba(15,23,42,0.08);
|
|
||||||
--color-light-mimic-enabled:rgba(0,0,0,calc(6/255*222/255/var(--opacity-disabled)));
|
|
||||||
--color-markup-code-block:#F1F5F9;
|
|
||||||
--color-markup-table-row:#00000008;
|
|
||||||
--color-menu:#FFFFFF;
|
|
||||||
--color-nav-bg:#FFFFFF;
|
|
||||||
--color-nav-hover-bg:#ebebeb;
|
|
||||||
--color-nav-text:var(--color-text);
|
|
||||||
--color-olive:#18b4cc;
|
|
||||||
--color-olive-dark-1:#16a2b8;
|
|
||||||
--color-olive-dark-2:#1390a3;
|
|
||||||
--color-olive-light:#42d3e9;
|
|
||||||
--color-orange:#f2711c;
|
|
||||||
--color-orange-badge:#f2711c;
|
|
||||||
--color-orange-badge-bg:#f2711c1a;
|
|
||||||
--color-orange-badge-hover-bg:#f2711c4d;
|
|
||||||
--color-orange-dark-1:#e6630d;
|
|
||||||
--color-orange-dark-2:#cc580c;
|
|
||||||
--color-orange-light:#f59555;
|
|
||||||
--color-overlay-backdrop:#080808c0;
|
|
||||||
--color-pink:#e03997;
|
|
||||||
--color-pink-dark-1:#db228a;
|
|
||||||
--color-pink-dark-2:#c21e7b;
|
|
||||||
--color-pink-light:#e86bb1;
|
|
||||||
--color-placeholder-text:#aaa;
|
|
||||||
--color-primary:#3B82F6;
|
|
||||||
--color-primary-active:#1D4ED8;
|
|
||||||
--color-primary-alpha-10:#3b82f61a;
|
|
||||||
--color-primary-alpha-20:#3b82f633;
|
|
||||||
--color-primary-alpha-30:#3b82f64c;
|
|
||||||
--color-primary-alpha-40:#3b82f666;
|
|
||||||
--color-primary-alpha-50:#3b82f680;
|
|
||||||
--color-primary-alpha-60:#3b82f699;
|
|
||||||
--color-primary-alpha-70:#3b82f6b2;
|
|
||||||
--color-primary-alpha-80:#3b82f6cc;
|
|
||||||
--color-primary-alpha-90:#3b82f6e6;
|
|
||||||
--color-primary-contrast:#FFFFFF;
|
|
||||||
--color-primary-dark-1:#5694F7;
|
|
||||||
--color-primary-dark-2:#72A5F9;
|
|
||||||
--color-primary-dark-3:#8DB6FA;
|
|
||||||
--color-primary-dark-4:#A9C8FB;
|
|
||||||
--color-primary-dark-5:#C4DAFC;
|
|
||||||
--color-primary-dark-6:#E0EBFE;
|
|
||||||
--color-primary-dark-7:#FBFCFF;
|
|
||||||
--color-primary-hover:#2563EB;
|
|
||||||
--color-primary-light-1:#3676E0;
|
|
||||||
--color-primary-light-2:#316AC9;
|
|
||||||
--color-primary-light-3:#2C5FB3;
|
|
||||||
--color-primary-light-4:#28539C;
|
|
||||||
--color-primary-light-5:#234786;
|
|
||||||
--color-primary-light-6:#1E3B6F;
|
|
||||||
--color-primary-light-7:#193059;
|
|
||||||
--color-project-board-bg:var(--color-secondary-light-4);
|
|
||||||
--color-project-board-dark-label:#111;
|
|
||||||
--color-project-board-light-label:#eee;
|
|
||||||
--color-purple:#a333c8;
|
|
||||||
--color-purple-dark-1:#932eb4;
|
|
||||||
--color-purple-dark-2:#8229a0;
|
|
||||||
--color-purple-light:#bb64d8;
|
|
||||||
--color-reaction-active-bg:var(--color-primary-light-6);
|
|
||||||
--color-reaction-bg:#0000000a;
|
|
||||||
--color-reaction-hover-bg:var(--color-primary-light-5);
|
|
||||||
--color-red:#db2828;
|
|
||||||
--color-red-badge:#db2828;
|
|
||||||
--color-red-badge-bg:#db28281a;
|
|
||||||
--color-red-badge-hover-bg:#db28284d;
|
|
||||||
--color-red-dark-1:#c82121;
|
|
||||||
--color-red-dark-2:#b11e1e;
|
|
||||||
--color-red-light:#e45e5e;
|
|
||||||
--color-secondary:#E2E8F0;
|
|
||||||
--color-secondary-active:var(--color-secondary-dark-6);
|
|
||||||
--color-secondary-alpha-10:#dedede19;
|
|
||||||
--color-secondary-alpha-20:#dedede33;
|
|
||||||
--color-secondary-alpha-30:#dedede4b;
|
|
||||||
--color-secondary-alpha-40:#dedede66;
|
|
||||||
--color-secondary-alpha-50:#dedede80;
|
|
||||||
--color-secondary-alpha-60:#dedede99;
|
|
||||||
--color-secondary-alpha-70:#dededeb3;
|
|
||||||
--color-secondary-alpha-80:#dededecc;
|
|
||||||
--color-secondary-alpha-90:#dededee1;
|
|
||||||
--color-secondary-bg:#F1F5F9;
|
|
||||||
--color-secondary-button:var(--color-secondary-dark-4);
|
|
||||||
--color-secondary-dark-1:#CBD5E1;
|
|
||||||
--color-secondary-dark-10:#333;
|
|
||||||
--color-secondary-dark-11:#242424;
|
|
||||||
--color-secondary-dark-12:#141414;
|
|
||||||
--color-secondary-dark-13:#040404;
|
|
||||||
--color-secondary-dark-2:#94A3B8;
|
|
||||||
--color-secondary-dark-3:#64748B;
|
|
||||||
--color-secondary-dark-4:#475569;
|
|
||||||
--color-secondary-dark-5:#818181;
|
|
||||||
--color-secondary-dark-6:#717171;
|
|
||||||
--color-secondary-dark-7:#626262;
|
|
||||||
--color-secondary-dark-8:#525252;
|
|
||||||
--color-secondary-dark-9:#434343;
|
|
||||||
--color-secondary-hover:var(--color-secondary-dark-5);
|
|
||||||
--color-secondary-light-1:#E2E8F0;
|
|
||||||
--color-secondary-light-2:#F1F5F9;
|
|
||||||
--color-secondary-light-3:#f2f2f2;
|
|
||||||
--color-secondary-light-4:#f8f8f8;
|
|
||||||
--color-shadow:rgba(15,23,42,0.08);
|
|
||||||
--color-small-accent:#93BAFA;
|
|
||||||
--color-success-bg:#F0FAFD;
|
|
||||||
--color-success-border:#A5D8E4;
|
|
||||||
--color-success-text:#0E7490;
|
|
||||||
--color-teal:#0891B2;
|
|
||||||
--color-teal-dark-1:#00a39c;
|
|
||||||
--color-teal-dark-2:#00918a;
|
|
||||||
--color-teal-light:#08fff4;
|
|
||||||
--color-text:#0F172A;
|
|
||||||
--color-text-dark:#020617;
|
|
||||||
--color-text-light:#334155;
|
|
||||||
--color-text-light-1:#475569;
|
|
||||||
--color-text-light-2:#64748B;
|
|
||||||
--color-text-light-3:#94A3B8;
|
|
||||||
--color-timeline:#ececec;
|
|
||||||
--color-tooltip-bg:#000000f0;
|
|
||||||
--color-tooltip-text:#fff;
|
|
||||||
--color-violet:#6435c9;
|
|
||||||
--color-violet-dark-1:#5a30b5;
|
|
||||||
--color-violet-dark-2:#502aa1;
|
|
||||||
--color-violet-light:#8b67d7;
|
|
||||||
--color-warning-bg:#fffaf3;
|
|
||||||
--color-warning-border:#c9ba9b;
|
|
||||||
--color-warning-text:#573a08;
|
|
||||||
--color-white:#fff;
|
|
||||||
--color-yellow:#fbbd08;
|
|
||||||
--color-yellow-badge:#fbbd08;
|
|
||||||
--color-yellow-badge-bg:#fbbd081a;
|
|
||||||
--color-yellow-badge-hover-bg:#fbbd084d;
|
|
||||||
--color-yellow-dark-1:#e5ac04;
|
|
||||||
--color-yellow-dark-2:#cc9903;
|
|
||||||
--color-yellow-light:#fcce46;
|
|
||||||
--font-weight-bold:700;
|
|
||||||
--font-weight-light:300;
|
|
||||||
--font-weight-medium:500;
|
|
||||||
--font-weight-normal:400;
|
|
||||||
--font-weight-semibold:600;
|
|
||||||
--fonts-emoji:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji","Twemoji Mozilla";
|
|
||||||
--fonts-monospace:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace,var(--fonts-emoji);
|
|
||||||
--fonts-proportional:-apple-system,"Segoe UI",system-ui,Roboto,"Helvetica Neue",Arial;
|
|
||||||
--height-loading:16rem;
|
|
||||||
--is-dark-theme:false;
|
|
||||||
--line-height-default:normal;
|
|
||||||
--octicon-chevron-right:url("data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path d=\"M6.22 3.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L9.94 8 6.22 4.28a.75.75 0 0 1 0-1.06Z\"></path></svg>");
|
|
||||||
--opacity-disabled:.55;
|
|
||||||
--tab-size:4;
|
|
||||||
color-scheme:light;
|
|
||||||
accent-color:var(--color-primary);
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (prefers-color-scheme:dark) {
|
|
||||||
:root{
|
|
||||||
--border-radius:4px;
|
|
||||||
--border-radius-circle:50%;
|
|
||||||
--border-radius-medium:6px;
|
|
||||||
--checkbox-mask-checked:url("data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"-1 -1 18 18\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z\"></path></svg>");
|
|
||||||
--checkbox-mask-indeterminate:url("data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M2 7.75A.75.75 0 012.75 7h10a.75.75 0 010 1.5h-10A.75.75 0 012 7.75z\"></path></svg>");
|
|
||||||
--color-accent:var(--color-primary-light-1);
|
|
||||||
--color-active:rgba(240,246,252,0.12);
|
|
||||||
--color-active-line:#534d1b;
|
|
||||||
--color-ansi-black:var(--color-black);
|
|
||||||
--color-ansi-blue:var(--color-blue);
|
|
||||||
--color-ansi-bright-black:var(--color-black-light);
|
|
||||||
--color-ansi-bright-blue:var(--color-blue-light);
|
|
||||||
--color-ansi-bright-cyan:var(--color-teal-light);
|
|
||||||
--color-ansi-bright-green:var(--color-green-light);
|
|
||||||
--color-ansi-bright-magenta:var(--color-pink-light);
|
|
||||||
--color-ansi-bright-red:var(--color-red-light);
|
|
||||||
--color-ansi-bright-white:var(--color-console-fg);
|
|
||||||
--color-ansi-bright-yellow:var(--color-yellow-light);
|
|
||||||
--color-ansi-cyan:var(--color-teal);
|
|
||||||
--color-ansi-green:var(--color-green);
|
|
||||||
--color-ansi-magenta:var(--color-pink);
|
|
||||||
--color-ansi-red:var(--color-red);
|
|
||||||
--color-ansi-white:var(--color-console-fg-subtle);
|
|
||||||
--color-ansi-yellow:var(--color-yellow);
|
|
||||||
--color-black:#2e323e;
|
|
||||||
--color-black-dark-1:#292d38;
|
|
||||||
--color-black-dark-2:#252832;
|
|
||||||
--color-black-light:#3f4555;
|
|
||||||
--color-blue:#3a8ac6;
|
|
||||||
--color-blue-dark-1:#347cb3;
|
|
||||||
--color-blue-dark-2:#2e6e9f;
|
|
||||||
--color-blue-light:#4e96cc;
|
|
||||||
--color-body:#0D1117;
|
|
||||||
--color-box-body:#161B22;
|
|
||||||
--color-box-body-highlight:#1C2128;
|
|
||||||
--color-box-header:#161B22;
|
|
||||||
--color-brown:#a47252;
|
|
||||||
--color-brown-dark-1:#94674a;
|
|
||||||
--color-brown-dark-2:#835b42;
|
|
||||||
--color-brown-light:#b08061;
|
|
||||||
--color-button:#161B22;
|
|
||||||
--color-card:#161B22;
|
|
||||||
--color-caret:var(--color-text);
|
|
||||||
--color-code-bg:#161B22;
|
|
||||||
--color-code-sidebar-bg:#0D1117;
|
|
||||||
--color-console-active-bg:#454a57;
|
|
||||||
--color-console-bg:#0D1117;
|
|
||||||
--color-console-border:#30363D;
|
|
||||||
--color-console-fg:#eeeff2;
|
|
||||||
--color-console-fg-subtle:#959cab;
|
|
||||||
--color-console-hover-bg:#ffffff16;
|
|
||||||
--color-console-menu-bg:#161B22;
|
|
||||||
--color-console-menu-border:#5c6374;
|
|
||||||
--color-diff-added-row-bg:#283b3e;
|
|
||||||
--color-diff-added-row-border:#31474a;
|
|
||||||
--color-diff-added-word-bg:#3c6065;
|
|
||||||
--color-diff-inactive:#353846;
|
|
||||||
--color-diff-moved-row-bg:#818044;
|
|
||||||
--color-diff-moved-row-border:#6fbeca;
|
|
||||||
--color-diff-removed-row-bg:#3c2626;
|
|
||||||
--color-diff-removed-row-border:#634343;
|
|
||||||
--color-diff-removed-word-bg:#6f3333;
|
|
||||||
--color-editor-line-highlight:var(--color-primary-light-5);
|
|
||||||
--color-error-bg:#522;
|
|
||||||
--color-error-bg-active:#744;
|
|
||||||
--color-error-bg-hover:#633;
|
|
||||||
--color-error-border:#a04141;
|
|
||||||
--color-error-text:#f9cbcb;
|
|
||||||
--color-expand-button:#3c404d;
|
|
||||||
--color-footer:#0D1117;
|
|
||||||
--color-git:#f05133;
|
|
||||||
--color-gold:#b1983b;
|
|
||||||
--color-green:#22D3EE;
|
|
||||||
--color-green-badge:#21a6ba;
|
|
||||||
--color-green-badge-bg:#21ba451a;
|
|
||||||
--color-green-badge-hover-bg:#21ba454d;
|
|
||||||
--color-green-dark-1:#22D3EE;
|
|
||||||
--color-green-dark-2:#0891B2;
|
|
||||||
--color-green-light:#67E8F9;
|
|
||||||
--color-grey:#505665;
|
|
||||||
--color-grey-light:#a1a6b7;
|
|
||||||
--color-header-wrapper:#161B22;
|
|
||||||
--color-hover:rgba(240,246,252,0.08);
|
|
||||||
--color-info-bg:#26354c;
|
|
||||||
--color-info-border:#306090;
|
|
||||||
--color-info-text:#38a8e8;
|
|
||||||
--color-input-background:#0D1117;
|
|
||||||
--color-input-border:#30363D;
|
|
||||||
--color-input-border-hover:var(--color-secondary-dark-1);
|
|
||||||
--color-input-text:#E6EDF3;
|
|
||||||
--color-input-toggle-background:#454a57;
|
|
||||||
--color-label-active-bg:#7c8497;
|
|
||||||
--color-label-bg:#7c84974b;
|
|
||||||
--color-label-hover-bg:#7c8497a0;
|
|
||||||
--color-label-text:#E6EDF3;
|
|
||||||
--color-light:#00000028;
|
|
||||||
--color-light-border:rgba(240,246,252,0.10);
|
|
||||||
--color-light-mimic-enabled:rgba(0,0,0,calc(40/255*222/255/var(--opacity-disabled)));
|
|
||||||
--color-markup-code-block:rgba(240,246,252,0.06);
|
|
||||||
--color-markup-table-row:#ffffff06;
|
|
||||||
--color-menu:#161B22;
|
|
||||||
--color-nav-bg:#161B22;
|
|
||||||
--color-nav-hover-bg:#383c47;
|
|
||||||
--color-nav-text:var(--color-text);
|
|
||||||
--color-olive:#1390a3;
|
|
||||||
--color-olive-dark-1:#118293;
|
|
||||||
--color-olive-dark-2:#0f7382;
|
|
||||||
--color-olive-light:#16a9c0;
|
|
||||||
--color-orange:#cc580c;
|
|
||||||
--color-orange-badge:#f2711c;
|
|
||||||
--color-orange-badge-bg:#f2711c1a;
|
|
||||||
--color-orange-badge-hover-bg:#f2711c4d;
|
|
||||||
--color-orange-dark-1:#f38236;
|
|
||||||
--color-orange-dark-2:#f16e17;
|
|
||||||
--color-orange-light:#f6a066;
|
|
||||||
--color-overlay-backdrop:#080808c0;
|
|
||||||
--color-pink:#d22e8b;
|
|
||||||
--color-pink-dark-1:#be297d;
|
|
||||||
--color-pink-dark-2:#a9246f;
|
|
||||||
--color-pink-light:#d74397;
|
|
||||||
--color-placeholder-text:#8a8e99;
|
|
||||||
--color-primary:#38BDF8;
|
|
||||||
--color-primary-active:#22D3EE;
|
|
||||||
--color-primary-alpha-10:#38bdf81a;
|
|
||||||
--color-primary-alpha-20:#38bdf833;
|
|
||||||
--color-primary-alpha-30:#38bdf84c;
|
|
||||||
--color-primary-alpha-40:#38bdf866;
|
|
||||||
--color-primary-alpha-50:#38bdf880;
|
|
||||||
--color-primary-alpha-60:#38bdf899;
|
|
||||||
--color-primary-alpha-70:#38bdf8b2;
|
|
||||||
--color-primary-alpha-80:#38bdf8cc;
|
|
||||||
--color-primary-alpha-90:#38bdf8e6;
|
|
||||||
--color-primary-contrast:#0B1220;
|
|
||||||
--color-primary-dark-1:#52C5F9;
|
|
||||||
--color-primary-dark-2:#6CCDF9;
|
|
||||||
--color-primary-dark-3:#85D5FA;
|
|
||||||
--color-primary-dark-4:#9FDDFA;
|
|
||||||
--color-primary-dark-5:#B9E5FB;
|
|
||||||
--color-primary-dark-6:#D3EDFB;
|
|
||||||
--color-primary-dark-7:#ECF5FC;
|
|
||||||
--color-primary-hover:#7DD3FC;
|
|
||||||
--color-primary-light-1:#32A9DE;
|
|
||||||
--color-primary-light-2:#2C94C3;
|
|
||||||
--color-primary-light-3:#2680A9;
|
|
||||||
--color-primary-light-4:#206C8F;
|
|
||||||
--color-primary-light-5:#1A5775;
|
|
||||||
--color-primary-light-6:#14435A;
|
|
||||||
--color-primary-light-7:#0E2F40;
|
|
||||||
--color-project-board-bg:var(--color-secondary-light-2);
|
|
||||||
--color-project-board-dark-label:#111;
|
|
||||||
--color-project-board-light-label:#eee;
|
|
||||||
--color-purple:#b259d0;
|
|
||||||
--color-purple-dark-1:#a742c9;
|
|
||||||
--color-purple-dark-2:#9834b9;
|
|
||||||
--color-purple-light:#ba6ad5;
|
|
||||||
--color-reaction-active-bg:var(--color-primary-light-5);
|
|
||||||
--color-reaction-bg:#ffffff12;
|
|
||||||
--color-reaction-hover-bg:var(--color-primary-light-4);
|
|
||||||
--color-red:#cc4848;
|
|
||||||
--color-red-badge:#db2828;
|
|
||||||
--color-red-badge-bg:#db28281a;
|
|
||||||
--color-red-badge-hover-bg:#db28284d;
|
|
||||||
--color-red-dark-1:#c23636;
|
|
||||||
--color-red-dark-2:#ad3030;
|
|
||||||
--color-red-light:#d15a5a;
|
|
||||||
--color-secondary:#30363D;
|
|
||||||
--color-secondary-active:var(--color-secondary-dark-2);
|
|
||||||
--color-secondary-alpha-10:#52576719;
|
|
||||||
--color-secondary-alpha-20:#52576733;
|
|
||||||
--color-secondary-alpha-30:#5257674b;
|
|
||||||
--color-secondary-alpha-40:#52576766;
|
|
||||||
--color-secondary-alpha-50:#52576780;
|
|
||||||
--color-secondary-alpha-60:#52576799;
|
|
||||||
--color-secondary-alpha-70:#525767b3;
|
|
||||||
--color-secondary-alpha-80:#525767cc;
|
|
||||||
--color-secondary-alpha-90:#525767e1;
|
|
||||||
--color-secondary-bg:#1C2128;
|
|
||||||
--color-secondary-button:var(--color-secondary-dark-4);
|
|
||||||
--color-secondary-dark-1:#3D444D;
|
|
||||||
--color-secondary-dark-10:#d6d7de;
|
|
||||||
--color-secondary-dark-11:#e2e3e8;
|
|
||||||
--color-secondary-dark-12:#eeeff2;
|
|
||||||
--color-secondary-dark-13:#fbfbfc;
|
|
||||||
--color-secondary-dark-2:#666e81;
|
|
||||||
--color-secondary-dark-3:#7c8497;
|
|
||||||
--color-secondary-dark-4:#8990a1;
|
|
||||||
--color-secondary-dark-5:#959cab;
|
|
||||||
--color-secondary-dark-6:#a2a8b5;
|
|
||||||
--color-secondary-dark-7:#afb4c0;
|
|
||||||
--color-secondary-dark-8:#bcc0ca;
|
|
||||||
--color-secondary-dark-9:#c9cbd4;
|
|
||||||
--color-secondary-hover:var(--color-secondary-dark-3);
|
|
||||||
--color-secondary-light-1:#454a57;
|
|
||||||
--color-secondary-light-2:#383c47;
|
|
||||||
--color-secondary-light-3:#2c2f37;
|
|
||||||
--color-secondary-light-4:#1f2226;
|
|
||||||
--color-shadow:rgba(1,4,9,0.45);
|
|
||||||
--color-small-accent:var(--color-primary-light-5);
|
|
||||||
--color-success-bg:#0F2A33;
|
|
||||||
--color-success-border:#1E4C5C;
|
|
||||||
--color-success-text:#67E8F9;
|
|
||||||
--color-teal:#22D3EE;
|
|
||||||
--color-teal-dark-1:#00837c;
|
|
||||||
--color-teal-dark-2:#00746e;
|
|
||||||
--color-teal-light:#00b6ad;
|
|
||||||
--color-text:#E6EDF3;
|
|
||||||
--color-text-dark:#F0F6FC;
|
|
||||||
--color-text-light:#C9D1D9;
|
|
||||||
--color-text-light-1:#B1BAC4;
|
|
||||||
--color-text-light-2:#8B949E;
|
|
||||||
--color-text-light-3:#6E7681;
|
|
||||||
--color-timeline:#4c525e;
|
|
||||||
--color-tooltip-bg:#000000f0;
|
|
||||||
--color-tooltip-text:#fff;
|
|
||||||
--color-violet:#906ae1;
|
|
||||||
--color-violet-dark-1:#7b4edb;
|
|
||||||
--color-violet-dark-2:#6733d6;
|
|
||||||
--color-violet-light:#9b79e4;
|
|
||||||
--color-warning-bg:#30393a;
|
|
||||||
--color-warning-border:#bb9d00;
|
|
||||||
--color-warning-text:#fbbd08;
|
|
||||||
--color-white:#fff;
|
|
||||||
--color-yellow:#cc9903;
|
|
||||||
--color-yellow-badge:#fbbd08;
|
|
||||||
--color-yellow-badge-bg:#fbbd081a;
|
|
||||||
--color-yellow-badge-hover-bg:#fbbd084d;
|
|
||||||
--color-yellow-dark-1:#b88a03;
|
|
||||||
--color-yellow-dark-2:#a37a02;
|
|
||||||
--color-yellow-light:#eaaf03;
|
|
||||||
--font-weight-bold:700;
|
|
||||||
--font-weight-light:300;
|
|
||||||
--font-weight-medium:500;
|
|
||||||
--font-weight-normal:400;
|
|
||||||
--font-weight-semibold:600;
|
|
||||||
--fonts-emoji:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji","Twemoji Mozilla";
|
|
||||||
--fonts-monospace:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace,var(--fonts-emoji);
|
|
||||||
--fonts-proportional:-apple-system,"Segoe UI",system-ui,Roboto,"Helvetica Neue",Arial;
|
|
||||||
--height-loading:16rem;
|
|
||||||
--is-dark-theme:true;
|
|
||||||
--line-height-default:normal;
|
|
||||||
--octicon-chevron-right:url("data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path d=\"M6.22 3.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L9.94 8 6.22 4.28a.75.75 0 0 1 0-1.06Z\"></path></svg>");
|
|
||||||
--opacity-disabled:.55;
|
|
||||||
--tab-size:4;
|
|
||||||
color-scheme:dark;
|
|
||||||
accent-color:var(--color-primary);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,258 +0,0 @@
|
||||||
/*!
|
|
||||||
* Gitea 主题 · qq-dark(蓝白 ins 风 · 仅深色)
|
|
||||||
* 由 scripts/build_theme.py 从 Gitea 1.21.11 官方 CSS 自动派生,请勿手改本文件。
|
|
||||||
* 视觉规范:蓝白 ins 风 —— 纯白 / 深墨底 + 清透蓝主色 + 零绿色。
|
|
||||||
* 生成时间以 Git 提交为准;重新生成:python3 scripts/build_theme.py
|
|
||||||
*/
|
|
||||||
|
|
||||||
gitea-theme-meta-info {
|
|
||||||
--theme-display-name: "QQGit · 深色";
|
|
||||||
}
|
|
||||||
|
|
||||||
:root{
|
|
||||||
--border-radius:4px;
|
|
||||||
--border-radius-circle:50%;
|
|
||||||
--border-radius-medium:6px;
|
|
||||||
--checkbox-mask-checked:url("data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"-1 -1 18 18\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z\"></path></svg>");
|
|
||||||
--checkbox-mask-indeterminate:url("data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M2 7.75A.75.75 0 012.75 7h10a.75.75 0 010 1.5h-10A.75.75 0 012 7.75z\"></path></svg>");
|
|
||||||
--color-accent:var(--color-primary-light-1);
|
|
||||||
--color-active:rgba(240,246,252,0.12);
|
|
||||||
--color-active-line:#534d1b;
|
|
||||||
--color-ansi-black:var(--color-black);
|
|
||||||
--color-ansi-blue:var(--color-blue);
|
|
||||||
--color-ansi-bright-black:var(--color-black-light);
|
|
||||||
--color-ansi-bright-blue:var(--color-blue-light);
|
|
||||||
--color-ansi-bright-cyan:var(--color-teal-light);
|
|
||||||
--color-ansi-bright-green:var(--color-green-light);
|
|
||||||
--color-ansi-bright-magenta:var(--color-pink-light);
|
|
||||||
--color-ansi-bright-red:var(--color-red-light);
|
|
||||||
--color-ansi-bright-white:var(--color-console-fg);
|
|
||||||
--color-ansi-bright-yellow:var(--color-yellow-light);
|
|
||||||
--color-ansi-cyan:var(--color-teal);
|
|
||||||
--color-ansi-green:var(--color-green);
|
|
||||||
--color-ansi-magenta:var(--color-pink);
|
|
||||||
--color-ansi-red:var(--color-red);
|
|
||||||
--color-ansi-white:var(--color-console-fg-subtle);
|
|
||||||
--color-ansi-yellow:var(--color-yellow);
|
|
||||||
--color-black:#2e323e;
|
|
||||||
--color-black-dark-1:#292d38;
|
|
||||||
--color-black-dark-2:#252832;
|
|
||||||
--color-black-light:#3f4555;
|
|
||||||
--color-blue:#3a8ac6;
|
|
||||||
--color-blue-dark-1:#347cb3;
|
|
||||||
--color-blue-dark-2:#2e6e9f;
|
|
||||||
--color-blue-light:#4e96cc;
|
|
||||||
--color-body:#0D1117;
|
|
||||||
--color-box-body:#161B22;
|
|
||||||
--color-box-body-highlight:#1C2128;
|
|
||||||
--color-box-header:#161B22;
|
|
||||||
--color-brown:#a47252;
|
|
||||||
--color-brown-dark-1:#94674a;
|
|
||||||
--color-brown-dark-2:#835b42;
|
|
||||||
--color-brown-light:#b08061;
|
|
||||||
--color-button:#161B22;
|
|
||||||
--color-card:#161B22;
|
|
||||||
--color-caret:var(--color-text);
|
|
||||||
--color-code-bg:#161B22;
|
|
||||||
--color-code-sidebar-bg:#0D1117;
|
|
||||||
--color-console-active-bg:#454a57;
|
|
||||||
--color-console-bg:#0D1117;
|
|
||||||
--color-console-border:#30363D;
|
|
||||||
--color-console-fg:#eeeff2;
|
|
||||||
--color-console-fg-subtle:#959cab;
|
|
||||||
--color-console-hover-bg:#ffffff16;
|
|
||||||
--color-console-menu-bg:#161B22;
|
|
||||||
--color-console-menu-border:#5c6374;
|
|
||||||
--color-diff-added-row-bg:#283b3e;
|
|
||||||
--color-diff-added-row-border:#31474a;
|
|
||||||
--color-diff-added-word-bg:#3c6065;
|
|
||||||
--color-diff-inactive:#353846;
|
|
||||||
--color-diff-moved-row-bg:#818044;
|
|
||||||
--color-diff-moved-row-border:#6fbeca;
|
|
||||||
--color-diff-removed-row-bg:#3c2626;
|
|
||||||
--color-diff-removed-row-border:#634343;
|
|
||||||
--color-diff-removed-word-bg:#6f3333;
|
|
||||||
--color-editor-line-highlight:var(--color-primary-light-5);
|
|
||||||
--color-error-bg:#522;
|
|
||||||
--color-error-bg-active:#744;
|
|
||||||
--color-error-bg-hover:#633;
|
|
||||||
--color-error-border:#a04141;
|
|
||||||
--color-error-text:#f9cbcb;
|
|
||||||
--color-expand-button:#3c404d;
|
|
||||||
--color-footer:#0D1117;
|
|
||||||
--color-git:#f05133;
|
|
||||||
--color-gold:#b1983b;
|
|
||||||
--color-green:#22D3EE;
|
|
||||||
--color-green-badge:#21a6ba;
|
|
||||||
--color-green-badge-bg:#21ba451a;
|
|
||||||
--color-green-badge-hover-bg:#21ba454d;
|
|
||||||
--color-green-dark-1:#22D3EE;
|
|
||||||
--color-green-dark-2:#0891B2;
|
|
||||||
--color-green-light:#67E8F9;
|
|
||||||
--color-grey:#505665;
|
|
||||||
--color-grey-light:#a1a6b7;
|
|
||||||
--color-header-wrapper:#161B22;
|
|
||||||
--color-hover:rgba(240,246,252,0.08);
|
|
||||||
--color-info-bg:#26354c;
|
|
||||||
--color-info-border:#306090;
|
|
||||||
--color-info-text:#38a8e8;
|
|
||||||
--color-input-background:#0D1117;
|
|
||||||
--color-input-border:#30363D;
|
|
||||||
--color-input-border-hover:var(--color-secondary-dark-1);
|
|
||||||
--color-input-text:#E6EDF3;
|
|
||||||
--color-input-toggle-background:#454a57;
|
|
||||||
--color-label-active-bg:#7c8497;
|
|
||||||
--color-label-bg:#7c84974b;
|
|
||||||
--color-label-hover-bg:#7c8497a0;
|
|
||||||
--color-label-text:#E6EDF3;
|
|
||||||
--color-light:#00000028;
|
|
||||||
--color-light-border:rgba(240,246,252,0.10);
|
|
||||||
--color-light-mimic-enabled:rgba(0,0,0,calc(40/255*222/255/var(--opacity-disabled)));
|
|
||||||
--color-markup-code-block:rgba(240,246,252,0.06);
|
|
||||||
--color-markup-table-row:#ffffff06;
|
|
||||||
--color-menu:#161B22;
|
|
||||||
--color-nav-bg:#161B22;
|
|
||||||
--color-nav-hover-bg:#383c47;
|
|
||||||
--color-nav-text:var(--color-text);
|
|
||||||
--color-olive:#1390a3;
|
|
||||||
--color-olive-dark-1:#118293;
|
|
||||||
--color-olive-dark-2:#0f7382;
|
|
||||||
--color-olive-light:#16a9c0;
|
|
||||||
--color-orange:#cc580c;
|
|
||||||
--color-orange-badge:#f2711c;
|
|
||||||
--color-orange-badge-bg:#f2711c1a;
|
|
||||||
--color-orange-badge-hover-bg:#f2711c4d;
|
|
||||||
--color-orange-dark-1:#f38236;
|
|
||||||
--color-orange-dark-2:#f16e17;
|
|
||||||
--color-orange-light:#f6a066;
|
|
||||||
--color-overlay-backdrop:#080808c0;
|
|
||||||
--color-pink:#d22e8b;
|
|
||||||
--color-pink-dark-1:#be297d;
|
|
||||||
--color-pink-dark-2:#a9246f;
|
|
||||||
--color-pink-light:#d74397;
|
|
||||||
--color-placeholder-text:#8a8e99;
|
|
||||||
--color-primary:#38BDF8;
|
|
||||||
--color-primary-active:#22D3EE;
|
|
||||||
--color-primary-alpha-10:#38bdf81a;
|
|
||||||
--color-primary-alpha-20:#38bdf833;
|
|
||||||
--color-primary-alpha-30:#38bdf84c;
|
|
||||||
--color-primary-alpha-40:#38bdf866;
|
|
||||||
--color-primary-alpha-50:#38bdf880;
|
|
||||||
--color-primary-alpha-60:#38bdf899;
|
|
||||||
--color-primary-alpha-70:#38bdf8b2;
|
|
||||||
--color-primary-alpha-80:#38bdf8cc;
|
|
||||||
--color-primary-alpha-90:#38bdf8e6;
|
|
||||||
--color-primary-contrast:#0B1220;
|
|
||||||
--color-primary-dark-1:#52C5F9;
|
|
||||||
--color-primary-dark-2:#6CCDF9;
|
|
||||||
--color-primary-dark-3:#85D5FA;
|
|
||||||
--color-primary-dark-4:#9FDDFA;
|
|
||||||
--color-primary-dark-5:#B9E5FB;
|
|
||||||
--color-primary-dark-6:#D3EDFB;
|
|
||||||
--color-primary-dark-7:#ECF5FC;
|
|
||||||
--color-primary-hover:#7DD3FC;
|
|
||||||
--color-primary-light-1:#32A9DE;
|
|
||||||
--color-primary-light-2:#2C94C3;
|
|
||||||
--color-primary-light-3:#2680A9;
|
|
||||||
--color-primary-light-4:#206C8F;
|
|
||||||
--color-primary-light-5:#1A5775;
|
|
||||||
--color-primary-light-6:#14435A;
|
|
||||||
--color-primary-light-7:#0E2F40;
|
|
||||||
--color-project-board-bg:var(--color-secondary-light-2);
|
|
||||||
--color-project-board-dark-label:#111;
|
|
||||||
--color-project-board-light-label:#eee;
|
|
||||||
--color-purple:#b259d0;
|
|
||||||
--color-purple-dark-1:#a742c9;
|
|
||||||
--color-purple-dark-2:#9834b9;
|
|
||||||
--color-purple-light:#ba6ad5;
|
|
||||||
--color-reaction-active-bg:var(--color-primary-light-5);
|
|
||||||
--color-reaction-bg:#ffffff12;
|
|
||||||
--color-reaction-hover-bg:var(--color-primary-light-4);
|
|
||||||
--color-red:#cc4848;
|
|
||||||
--color-red-badge:#db2828;
|
|
||||||
--color-red-badge-bg:#db28281a;
|
|
||||||
--color-red-badge-hover-bg:#db28284d;
|
|
||||||
--color-red-dark-1:#c23636;
|
|
||||||
--color-red-dark-2:#ad3030;
|
|
||||||
--color-red-light:#d15a5a;
|
|
||||||
--color-secondary:#30363D;
|
|
||||||
--color-secondary-active:var(--color-secondary-dark-2);
|
|
||||||
--color-secondary-alpha-10:#52576719;
|
|
||||||
--color-secondary-alpha-20:#52576733;
|
|
||||||
--color-secondary-alpha-30:#5257674b;
|
|
||||||
--color-secondary-alpha-40:#52576766;
|
|
||||||
--color-secondary-alpha-50:#52576780;
|
|
||||||
--color-secondary-alpha-60:#52576799;
|
|
||||||
--color-secondary-alpha-70:#525767b3;
|
|
||||||
--color-secondary-alpha-80:#525767cc;
|
|
||||||
--color-secondary-alpha-90:#525767e1;
|
|
||||||
--color-secondary-bg:#1C2128;
|
|
||||||
--color-secondary-button:var(--color-secondary-dark-4);
|
|
||||||
--color-secondary-dark-1:#3D444D;
|
|
||||||
--color-secondary-dark-10:#d6d7de;
|
|
||||||
--color-secondary-dark-11:#e2e3e8;
|
|
||||||
--color-secondary-dark-12:#eeeff2;
|
|
||||||
--color-secondary-dark-13:#fbfbfc;
|
|
||||||
--color-secondary-dark-2:#666e81;
|
|
||||||
--color-secondary-dark-3:#7c8497;
|
|
||||||
--color-secondary-dark-4:#8990a1;
|
|
||||||
--color-secondary-dark-5:#959cab;
|
|
||||||
--color-secondary-dark-6:#a2a8b5;
|
|
||||||
--color-secondary-dark-7:#afb4c0;
|
|
||||||
--color-secondary-dark-8:#bcc0ca;
|
|
||||||
--color-secondary-dark-9:#c9cbd4;
|
|
||||||
--color-secondary-hover:var(--color-secondary-dark-3);
|
|
||||||
--color-secondary-light-1:#454a57;
|
|
||||||
--color-secondary-light-2:#383c47;
|
|
||||||
--color-secondary-light-3:#2c2f37;
|
|
||||||
--color-secondary-light-4:#1f2226;
|
|
||||||
--color-shadow:rgba(1,4,9,0.45);
|
|
||||||
--color-small-accent:var(--color-primary-light-5);
|
|
||||||
--color-success-bg:#0F2A33;
|
|
||||||
--color-success-border:#1E4C5C;
|
|
||||||
--color-success-text:#67E8F9;
|
|
||||||
--color-teal:#22D3EE;
|
|
||||||
--color-teal-dark-1:#00837c;
|
|
||||||
--color-teal-dark-2:#00746e;
|
|
||||||
--color-teal-light:#00b6ad;
|
|
||||||
--color-text:#E6EDF3;
|
|
||||||
--color-text-dark:#F0F6FC;
|
|
||||||
--color-text-light:#C9D1D9;
|
|
||||||
--color-text-light-1:#B1BAC4;
|
|
||||||
--color-text-light-2:#8B949E;
|
|
||||||
--color-text-light-3:#6E7681;
|
|
||||||
--color-timeline:#4c525e;
|
|
||||||
--color-tooltip-bg:#000000f0;
|
|
||||||
--color-tooltip-text:#fff;
|
|
||||||
--color-violet:#906ae1;
|
|
||||||
--color-violet-dark-1:#7b4edb;
|
|
||||||
--color-violet-dark-2:#6733d6;
|
|
||||||
--color-violet-light:#9b79e4;
|
|
||||||
--color-warning-bg:#30393a;
|
|
||||||
--color-warning-border:#bb9d00;
|
|
||||||
--color-warning-text:#fbbd08;
|
|
||||||
--color-white:#fff;
|
|
||||||
--color-yellow:#cc9903;
|
|
||||||
--color-yellow-badge:#fbbd08;
|
|
||||||
--color-yellow-badge-bg:#fbbd081a;
|
|
||||||
--color-yellow-badge-hover-bg:#fbbd084d;
|
|
||||||
--color-yellow-dark-1:#b88a03;
|
|
||||||
--color-yellow-dark-2:#a37a02;
|
|
||||||
--color-yellow-light:#eaaf03;
|
|
||||||
--font-weight-bold:700;
|
|
||||||
--font-weight-light:300;
|
|
||||||
--font-weight-medium:500;
|
|
||||||
--font-weight-normal:400;
|
|
||||||
--font-weight-semibold:600;
|
|
||||||
--fonts-emoji:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji","Twemoji Mozilla";
|
|
||||||
--fonts-monospace:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace,var(--fonts-emoji);
|
|
||||||
--fonts-proportional:-apple-system,"Segoe UI",system-ui,Roboto,"Helvetica Neue",Arial;
|
|
||||||
--height-loading:16rem;
|
|
||||||
--is-dark-theme:true;
|
|
||||||
--line-height-default:normal;
|
|
||||||
--octicon-chevron-right:url("data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path d=\"M6.22 3.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L9.94 8 6.22 4.28a.75.75 0 0 1 0-1.06Z\"></path></svg>");
|
|
||||||
--opacity-disabled:.55;
|
|
||||||
--tab-size:4;
|
|
||||||
color-scheme:dark;
|
|
||||||
accent-color:var(--color-primary);
|
|
||||||
}
|
|
||||||
|
|
@ -1,258 +0,0 @@
|
||||||
/*!
|
|
||||||
* Gitea 主题 · qq-light(蓝白 ins 风 · 仅浅色)
|
|
||||||
* 由 scripts/build_theme.py 从 Gitea 1.21.11 官方 CSS 自动派生,请勿手改本文件。
|
|
||||||
* 视觉规范:蓝白 ins 风 —— 纯白 / 深墨底 + 清透蓝主色 + 零绿色。
|
|
||||||
* 生成时间以 Git 提交为准;重新生成:python3 scripts/build_theme.py
|
|
||||||
*/
|
|
||||||
|
|
||||||
gitea-theme-meta-info {
|
|
||||||
--theme-display-name: "QQGit · 浅色";
|
|
||||||
}
|
|
||||||
|
|
||||||
:root{
|
|
||||||
--border-radius:4px;
|
|
||||||
--border-radius-circle:50%;
|
|
||||||
--border-radius-medium:6px;
|
|
||||||
--checkbox-mask-checked:url("data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"-1 -1 18 18\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z\"></path></svg>");
|
|
||||||
--checkbox-mask-indeterminate:url("data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path fill-rule=\"evenodd\" d=\"M2 7.75A.75.75 0 012.75 7h10a.75.75 0 010 1.5h-10A.75.75 0 012 7.75z\"></path></svg>");
|
|
||||||
--color-accent:#2563EB;
|
|
||||||
--color-active:rgba(15,23,42,0.07);
|
|
||||||
--color-active-line:#fffbdd;
|
|
||||||
--color-ansi-black:var(--color-black);
|
|
||||||
--color-ansi-blue:var(--color-blue);
|
|
||||||
--color-ansi-bright-black:var(--color-black-light);
|
|
||||||
--color-ansi-bright-blue:var(--color-blue-light);
|
|
||||||
--color-ansi-bright-cyan:var(--color-teal-light);
|
|
||||||
--color-ansi-bright-green:var(--color-green-light);
|
|
||||||
--color-ansi-bright-magenta:var(--color-pink-light);
|
|
||||||
--color-ansi-bright-red:var(--color-red-light);
|
|
||||||
--color-ansi-bright-white:var(--color-console-fg);
|
|
||||||
--color-ansi-bright-yellow:var(--color-yellow-light);
|
|
||||||
--color-ansi-cyan:var(--color-teal);
|
|
||||||
--color-ansi-green:var(--color-green);
|
|
||||||
--color-ansi-magenta:var(--color-pink);
|
|
||||||
--color-ansi-red:var(--color-red);
|
|
||||||
--color-ansi-white:var(--color-console-fg-subtle);
|
|
||||||
--color-ansi-yellow:var(--color-yellow);
|
|
||||||
--color-black:#1b1c1d;
|
|
||||||
--color-black-dark-1:#18191a;
|
|
||||||
--color-black-dark-2:#161617;
|
|
||||||
--color-black-light:#525558;
|
|
||||||
--color-blue:#2185d0;
|
|
||||||
--color-blue-dark-1:#1e78bb;
|
|
||||||
--color-blue-dark-2:#1a6aa6;
|
|
||||||
--color-blue-light:#51a5e3;
|
|
||||||
--color-body:#FFFFFF;
|
|
||||||
--color-box-body:#FFFFFF;
|
|
||||||
--color-box-body-highlight:#fafafa;
|
|
||||||
--color-box-header:#F8FAFC;
|
|
||||||
--color-brown:#a5673f;
|
|
||||||
--color-brown-dark-1:#955d39;
|
|
||||||
--color-brown-dark-2:#845232;
|
|
||||||
--color-brown-light:#c58b66;
|
|
||||||
--color-button:#FFFFFF;
|
|
||||||
--color-card:#F8FAFC;
|
|
||||||
--color-caret:var(--color-text-dark);
|
|
||||||
--color-code-bg:#FFFFFF;
|
|
||||||
--color-code-sidebar-bg:#F8FAFC;
|
|
||||||
--color-console-active-bg:#454a57;
|
|
||||||
--color-console-bg:#262936;
|
|
||||||
--color-console-border:#383c47;
|
|
||||||
--color-console-fg:#eeeff2;
|
|
||||||
--color-console-fg-subtle:#959cab;
|
|
||||||
--color-console-hover-bg:#ffffff16;
|
|
||||||
--color-console-menu-bg:#383c47;
|
|
||||||
--color-console-menu-border:#5c6374;
|
|
||||||
--color-diff-added-row-bg:#e6fcff;
|
|
||||||
--color-diff-added-row-border:#e6fcff;
|
|
||||||
--color-diff-added-word-bg:#ace9f2;
|
|
||||||
--color-diff-inactive:#f2f2f2;
|
|
||||||
--color-diff-moved-row-bg:#d1f3f8;
|
|
||||||
--color-diff-moved-row-border:#7fd5e2;
|
|
||||||
--color-diff-removed-row-bg:#ffeef0;
|
|
||||||
--color-diff-removed-row-border:#f1c0c0;
|
|
||||||
--color-diff-removed-word-bg:#fdb8c0;
|
|
||||||
--color-editor-line-highlight:var(--color-primary-light-6);
|
|
||||||
--color-error-bg:#fff6f6;
|
|
||||||
--color-error-bg-active:#fbb;
|
|
||||||
--color-error-bg-hover:#fdd;
|
|
||||||
--color-error-border:#e0b4b4;
|
|
||||||
--color-error-text:#9f3a38;
|
|
||||||
--color-expand-button:#d8efff;
|
|
||||||
--color-footer:#FFFFFF;
|
|
||||||
--color-git:#f05133;
|
|
||||||
--color-gold:#a1882b;
|
|
||||||
--color-green:#0891B2;
|
|
||||||
--color-green-badge:#21a6ba;
|
|
||||||
--color-green-badge-bg:#21ba451a;
|
|
||||||
--color-green-badge-hover-bg:#21ba454d;
|
|
||||||
--color-green-dark-1:#0E7490;
|
|
||||||
--color-green-dark-2:#155E75;
|
|
||||||
--color-green-light:#22D3EE;
|
|
||||||
--color-grey:#707070;
|
|
||||||
--color-grey-light:#838383;
|
|
||||||
--color-header-wrapper:#FFFFFF;
|
|
||||||
--color-hover:rgba(15,23,42,0.04);
|
|
||||||
--color-info-bg:#f8ffff;
|
|
||||||
--color-info-border:#a9d5de;
|
|
||||||
--color-info-text:#276f86;
|
|
||||||
--color-input-background:#F8FAFC;
|
|
||||||
--color-input-border:#E2E8F0;
|
|
||||||
--color-input-border-hover:var(--color-secondary-dark-1);
|
|
||||||
--color-input-text:#0F172A;
|
|
||||||
--color-input-toggle-background:#dedede;
|
|
||||||
--color-label-active-bg:#cacaca;
|
|
||||||
--color-label-bg:#cacaca5b;
|
|
||||||
--color-label-hover-bg:#cacacaa0;
|
|
||||||
--color-label-text:#0F172A;
|
|
||||||
--color-light:#00000006;
|
|
||||||
--color-light-border:rgba(15,23,42,0.08);
|
|
||||||
--color-light-mimic-enabled:rgba(0,0,0,calc(6/255*222/255/var(--opacity-disabled)));
|
|
||||||
--color-markup-code-block:#F1F5F9;
|
|
||||||
--color-markup-table-row:#00000008;
|
|
||||||
--color-menu:#FFFFFF;
|
|
||||||
--color-nav-bg:#FFFFFF;
|
|
||||||
--color-nav-hover-bg:#ebebeb;
|
|
||||||
--color-nav-text:var(--color-text);
|
|
||||||
--color-olive:#18b4cc;
|
|
||||||
--color-olive-dark-1:#16a2b8;
|
|
||||||
--color-olive-dark-2:#1390a3;
|
|
||||||
--color-olive-light:#42d3e9;
|
|
||||||
--color-orange:#f2711c;
|
|
||||||
--color-orange-badge:#f2711c;
|
|
||||||
--color-orange-badge-bg:#f2711c1a;
|
|
||||||
--color-orange-badge-hover-bg:#f2711c4d;
|
|
||||||
--color-orange-dark-1:#e6630d;
|
|
||||||
--color-orange-dark-2:#cc580c;
|
|
||||||
--color-orange-light:#f59555;
|
|
||||||
--color-overlay-backdrop:#080808c0;
|
|
||||||
--color-pink:#e03997;
|
|
||||||
--color-pink-dark-1:#db228a;
|
|
||||||
--color-pink-dark-2:#c21e7b;
|
|
||||||
--color-pink-light:#e86bb1;
|
|
||||||
--color-placeholder-text:#aaa;
|
|
||||||
--color-primary:#3B82F6;
|
|
||||||
--color-primary-active:#1D4ED8;
|
|
||||||
--color-primary-alpha-10:#3b82f61a;
|
|
||||||
--color-primary-alpha-20:#3b82f633;
|
|
||||||
--color-primary-alpha-30:#3b82f64c;
|
|
||||||
--color-primary-alpha-40:#3b82f666;
|
|
||||||
--color-primary-alpha-50:#3b82f680;
|
|
||||||
--color-primary-alpha-60:#3b82f699;
|
|
||||||
--color-primary-alpha-70:#3b82f6b2;
|
|
||||||
--color-primary-alpha-80:#3b82f6cc;
|
|
||||||
--color-primary-alpha-90:#3b82f6e6;
|
|
||||||
--color-primary-contrast:#FFFFFF;
|
|
||||||
--color-primary-dark-1:#5694F7;
|
|
||||||
--color-primary-dark-2:#72A5F9;
|
|
||||||
--color-primary-dark-3:#8DB6FA;
|
|
||||||
--color-primary-dark-4:#A9C8FB;
|
|
||||||
--color-primary-dark-5:#C4DAFC;
|
|
||||||
--color-primary-dark-6:#E0EBFE;
|
|
||||||
--color-primary-dark-7:#FBFCFF;
|
|
||||||
--color-primary-hover:#2563EB;
|
|
||||||
--color-primary-light-1:#3676E0;
|
|
||||||
--color-primary-light-2:#316AC9;
|
|
||||||
--color-primary-light-3:#2C5FB3;
|
|
||||||
--color-primary-light-4:#28539C;
|
|
||||||
--color-primary-light-5:#234786;
|
|
||||||
--color-primary-light-6:#1E3B6F;
|
|
||||||
--color-primary-light-7:#193059;
|
|
||||||
--color-project-board-bg:var(--color-secondary-light-4);
|
|
||||||
--color-project-board-dark-label:#111;
|
|
||||||
--color-project-board-light-label:#eee;
|
|
||||||
--color-purple:#a333c8;
|
|
||||||
--color-purple-dark-1:#932eb4;
|
|
||||||
--color-purple-dark-2:#8229a0;
|
|
||||||
--color-purple-light:#bb64d8;
|
|
||||||
--color-reaction-active-bg:var(--color-primary-light-6);
|
|
||||||
--color-reaction-bg:#0000000a;
|
|
||||||
--color-reaction-hover-bg:var(--color-primary-light-5);
|
|
||||||
--color-red:#db2828;
|
|
||||||
--color-red-badge:#db2828;
|
|
||||||
--color-red-badge-bg:#db28281a;
|
|
||||||
--color-red-badge-hover-bg:#db28284d;
|
|
||||||
--color-red-dark-1:#c82121;
|
|
||||||
--color-red-dark-2:#b11e1e;
|
|
||||||
--color-red-light:#e45e5e;
|
|
||||||
--color-secondary:#E2E8F0;
|
|
||||||
--color-secondary-active:var(--color-secondary-dark-6);
|
|
||||||
--color-secondary-alpha-10:#dedede19;
|
|
||||||
--color-secondary-alpha-20:#dedede33;
|
|
||||||
--color-secondary-alpha-30:#dedede4b;
|
|
||||||
--color-secondary-alpha-40:#dedede66;
|
|
||||||
--color-secondary-alpha-50:#dedede80;
|
|
||||||
--color-secondary-alpha-60:#dedede99;
|
|
||||||
--color-secondary-alpha-70:#dededeb3;
|
|
||||||
--color-secondary-alpha-80:#dededecc;
|
|
||||||
--color-secondary-alpha-90:#dededee1;
|
|
||||||
--color-secondary-bg:#F1F5F9;
|
|
||||||
--color-secondary-button:var(--color-secondary-dark-4);
|
|
||||||
--color-secondary-dark-1:#CBD5E1;
|
|
||||||
--color-secondary-dark-10:#333;
|
|
||||||
--color-secondary-dark-11:#242424;
|
|
||||||
--color-secondary-dark-12:#141414;
|
|
||||||
--color-secondary-dark-13:#040404;
|
|
||||||
--color-secondary-dark-2:#94A3B8;
|
|
||||||
--color-secondary-dark-3:#64748B;
|
|
||||||
--color-secondary-dark-4:#475569;
|
|
||||||
--color-secondary-dark-5:#818181;
|
|
||||||
--color-secondary-dark-6:#717171;
|
|
||||||
--color-secondary-dark-7:#626262;
|
|
||||||
--color-secondary-dark-8:#525252;
|
|
||||||
--color-secondary-dark-9:#434343;
|
|
||||||
--color-secondary-hover:var(--color-secondary-dark-5);
|
|
||||||
--color-secondary-light-1:#E2E8F0;
|
|
||||||
--color-secondary-light-2:#F1F5F9;
|
|
||||||
--color-secondary-light-3:#f2f2f2;
|
|
||||||
--color-secondary-light-4:#f8f8f8;
|
|
||||||
--color-shadow:rgba(15,23,42,0.08);
|
|
||||||
--color-small-accent:#93BAFA;
|
|
||||||
--color-success-bg:#F0FAFD;
|
|
||||||
--color-success-border:#A5D8E4;
|
|
||||||
--color-success-text:#0E7490;
|
|
||||||
--color-teal:#0891B2;
|
|
||||||
--color-teal-dark-1:#00a39c;
|
|
||||||
--color-teal-dark-2:#00918a;
|
|
||||||
--color-teal-light:#08fff4;
|
|
||||||
--color-text:#0F172A;
|
|
||||||
--color-text-dark:#020617;
|
|
||||||
--color-text-light:#334155;
|
|
||||||
--color-text-light-1:#475569;
|
|
||||||
--color-text-light-2:#64748B;
|
|
||||||
--color-text-light-3:#94A3B8;
|
|
||||||
--color-timeline:#ececec;
|
|
||||||
--color-tooltip-bg:#000000f0;
|
|
||||||
--color-tooltip-text:#fff;
|
|
||||||
--color-violet:#6435c9;
|
|
||||||
--color-violet-dark-1:#5a30b5;
|
|
||||||
--color-violet-dark-2:#502aa1;
|
|
||||||
--color-violet-light:#8b67d7;
|
|
||||||
--color-warning-bg:#fffaf3;
|
|
||||||
--color-warning-border:#c9ba9b;
|
|
||||||
--color-warning-text:#573a08;
|
|
||||||
--color-white:#fff;
|
|
||||||
--color-yellow:#fbbd08;
|
|
||||||
--color-yellow-badge:#fbbd08;
|
|
||||||
--color-yellow-badge-bg:#fbbd081a;
|
|
||||||
--color-yellow-badge-hover-bg:#fbbd084d;
|
|
||||||
--color-yellow-dark-1:#e5ac04;
|
|
||||||
--color-yellow-dark-2:#cc9903;
|
|
||||||
--color-yellow-light:#fcce46;
|
|
||||||
--font-weight-bold:700;
|
|
||||||
--font-weight-light:300;
|
|
||||||
--font-weight-medium:500;
|
|
||||||
--font-weight-normal:400;
|
|
||||||
--font-weight-semibold:600;
|
|
||||||
--fonts-emoji:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji","Twemoji Mozilla";
|
|
||||||
--fonts-monospace:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace,var(--fonts-emoji);
|
|
||||||
--fonts-proportional:-apple-system,"Segoe UI",system-ui,Roboto,"Helvetica Neue",Arial;
|
|
||||||
--height-loading:16rem;
|
|
||||||
--is-dark-theme:false;
|
|
||||||
--line-height-default:normal;
|
|
||||||
--octicon-chevron-right:url("data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\"><path d=\"M6.22 3.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L9.94 8 6.22 4.28a.75.75 0 0 1 0-1.06Z\"></path></svg>");
|
|
||||||
--opacity-disabled:.55;
|
|
||||||
--tab-size:4;
|
|
||||||
color-scheme:light;
|
|
||||||
accent-color:var(--color-primary);
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 9.3 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 9.3 KiB |
|
|
@ -1,21 +0,0 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" role="img" aria-label="Q">
|
|
||||||
<title>Q</title>
|
|
||||||
<style>
|
|
||||||
:root { --disc: #60A5FA; --mark: #FFFFFF; }
|
|
||||||
@media (prefers-color-scheme: dark) { :root { --disc: #38BDF8; --mark: #F8FAFC; } }
|
|
||||||
.disc { fill: var(--disc); }
|
|
||||||
.rail { fill: none; stroke: var(--mark); stroke-width: 1.5; stroke-linecap: round; }
|
|
||||||
.node { fill: var(--mark); }
|
|
||||||
.hole { fill: var(--disc); }
|
|
||||||
</style>
|
|
||||||
<circle class="disc" cx="16" cy="16" r="15" fill="#60A5FA"/>
|
|
||||||
<circle class="rail" cx="16" cy="16" r="7.5" stroke="#FFFFFF"/>
|
|
||||||
<path class="rail" d="M 19 18 C 22 17.5, 24.25 19.25, 24.25 22.5" stroke="#FFFFFF"/>
|
|
||||||
<g>
|
|
||||||
<circle class="node" cx="16" cy="8.5" r="2.25" fill="#FFFFFF"/><circle class="hole" cx="16" cy="8.5" r="0.9" fill="#60A5FA"/>
|
|
||||||
<circle class="node" cx="8.5" cy="16" r="2.25" fill="#FFFFFF"/><circle class="hole" cx="8.5" cy="16" r="0.9" fill="#60A5FA"/>
|
|
||||||
<circle class="node" cx="16" cy="23.5" r="2.25" fill="#FFFFFF"/><circle class="hole" cx="16" cy="23.5" r="0.9" fill="#60A5FA"/>
|
|
||||||
<circle class="node" cx="19" cy="18" r="2.25" fill="#FFFFFF"/><circle class="hole" cx="19" cy="18" r="0.9" fill="#60A5FA"/>
|
|
||||||
<circle class="node" cx="24.25" cy="22.5" r="2.25" fill="#FFFFFF"/><circle class="hole" cx="24.25" cy="22.5" r="0.9" fill="#60A5FA"/>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 27 KiB |
|
|
@ -1,15 +0,0 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128" width="512" height="512" role="img" aria-label="Git node Q (dark)">
|
|
||||||
<title>Git node Q dark</title>
|
|
||||||
<!-- 夜间静态版:圆外全透明,蓝色提亮到 #38BDF8 以适配深色顶栏 -->
|
|
||||||
<circle cx="64" cy="64" r="60" fill="#38BDF8"/>
|
|
||||||
<circle cx="64" cy="64" r="30" fill="none" stroke="#F8FAFC" stroke-width="6" stroke-linecap="round"/>
|
|
||||||
<path d="M 76 72 C 88 70, 97 77, 97 90" fill="none" stroke="#F8FAFC" stroke-width="6" stroke-linecap="round"/>
|
|
||||||
<g fill="#F8FAFC">
|
|
||||||
<circle cx="64" cy="34" r="9"/><circle cx="34" cy="64" r="9"/><circle cx="64" cy="94" r="9"/>
|
|
||||||
<circle cx="76" cy="72" r="9"/><circle cx="97" cy="90" r="9"/>
|
|
||||||
</g>
|
|
||||||
<g fill="#38BDF8">
|
|
||||||
<circle cx="64" cy="34" r="3.6"/><circle cx="34" cy="64" r="3.6"/><circle cx="64" cy="94" r="3.6"/>
|
|
||||||
<circle cx="76" cy="72" r="3.6"/><circle cx="97" cy="90" r="3.6"/>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 926 B |
|
|
@ -1,15 +0,0 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128" width="512" height="512" role="img" aria-label="Git node Q (light)">
|
|
||||||
<title>Git node Q light</title>
|
|
||||||
<!-- 日间静态版:圆外全透明 -->
|
|
||||||
<circle cx="64" cy="64" r="60" fill="#60A5FA"/>
|
|
||||||
<circle cx="64" cy="64" r="30" fill="none" stroke="#FFFFFF" stroke-width="6" stroke-linecap="round"/>
|
|
||||||
<path d="M 76 72 C 88 70, 97 77, 97 90" fill="none" stroke="#FFFFFF" stroke-width="6" stroke-linecap="round"/>
|
|
||||||
<g fill="#FFFFFF">
|
|
||||||
<circle cx="64" cy="34" r="9"/><circle cx="34" cy="64" r="9"/><circle cx="64" cy="94" r="9"/>
|
|
||||||
<circle cx="76" cy="72" r="9"/><circle cx="97" cy="90" r="9"/>
|
|
||||||
</g>
|
|
||||||
<g fill="#60A5FA">
|
|
||||||
<circle cx="64" cy="34" r="3.6"/><circle cx="34" cy="64" r="3.6"/><circle cx="64" cy="94" r="3.6"/>
|
|
||||||
<circle cx="76" cy="72" r="3.6"/><circle cx="97" cy="90" r="3.6"/>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 880 B |
|
Before Width: | Height: | Size: 28 KiB |
|
|
@ -1,45 +0,0 @@
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128" width="128" height="128" role="img" aria-label="Git node Q">
|
|
||||||
<title>Git node Q</title>
|
|
||||||
<style>
|
|
||||||
/* 方案 2-A:蓝白 Git 节点 Q · 日夜双模自适应
|
|
||||||
- 圆外 100% 透明(无 background / 无 rect),任何顶栏底色下都不会出现白边方框
|
|
||||||
- 日间:#60A5FA 圆章 + #FFFFFF 轨道;夜间:#38BDF8 圆章 + #F8FAFC 轨道
|
|
||||||
- 仅调蓝色明度,符号结构完全一致,切换主题时视觉不跳变 */
|
|
||||||
:root {
|
|
||||||
--disc: #60A5FA;
|
|
||||||
--mark: #FFFFFF;
|
|
||||||
}
|
|
||||||
@media (prefers-color-scheme: dark) {
|
|
||||||
:root {
|
|
||||||
--disc: #38BDF8;
|
|
||||||
--mark: #F8FAFC;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.disc { fill: var(--disc); }
|
|
||||||
.rail { fill: none; stroke: var(--mark); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
|
|
||||||
.node { fill: var(--mark); }
|
|
||||||
.hole { fill: var(--disc); }
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<!-- 圆章(徽章本体,圆外全透明) -->
|
|
||||||
<circle class="disc" cx="64" cy="64" r="60" fill="#60A5FA"/>
|
|
||||||
|
|
||||||
<!-- Q 的主环:Git 主干轨道 -->
|
|
||||||
<circle class="rail" cx="64" cy="64" r="30" stroke="#FFFFFF"/>
|
|
||||||
|
|
||||||
<!-- Q 的尾巴:从环内节点向右抽出,跨过主环后折向下方落点 -->
|
|
||||||
<path class="rail" d="M 76 72 C 88 70, 97 77, 97 90" stroke="#FFFFFF"/>
|
|
||||||
|
|
||||||
<!-- 环上 3 颗 Commit 空心节点:上、左、下 -->
|
|
||||||
<g>
|
|
||||||
<circle class="node" cx="64" cy="34" r="9" fill="#FFFFFF"/><circle class="hole" cx="64" cy="34" r="3.6" fill="#60A5FA"/>
|
|
||||||
<circle class="node" cx="34" cy="64" r="9" fill="#FFFFFF"/><circle class="hole" cx="34" cy="64" r="3.6" fill="#60A5FA"/>
|
|
||||||
<circle class="node" cx="64" cy="94" r="9" fill="#FFFFFF"/><circle class="hole" cx="64" cy="94" r="3.6" fill="#60A5FA"/>
|
|
||||||
</g>
|
|
||||||
|
|
||||||
<!-- 环内起点节点(Q 的起笔) + 跨环落点节点 -->
|
|
||||||
<g>
|
|
||||||
<circle class="node" cx="76" cy="72" r="9" fill="#FFFFFF"/><circle class="hole" cx="76" cy="72" r="3.6" fill="#60A5FA"/>
|
|
||||||
<circle class="node" cx="97" cy="90" r="9" fill="#FFFFFF"/><circle class="hole" cx="97" cy="90" r="3.6" fill="#60A5FA"/>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 2.1 KiB |
|
|
@ -1,183 +0,0 @@
|
||||||
/*
|
|
||||||
* qq-fx.js —— 首页 / 登录页的「炫酷」动效层(纯前端,无依赖)
|
|
||||||
* ---------------------------------------------------------------------------
|
|
||||||
* 只在两处生效:.page-content.home(首页)、.page-content.user.signin(登录页)。
|
|
||||||
* 其余页面直接 return,一点开销都不加。
|
|
||||||
*
|
|
||||||
* 做三件事:
|
|
||||||
* 1. 背景粒子星座(仅登录页;落地页保持干净的白底)
|
|
||||||
* 2. 首页大标题下的口号打字机(data-qq-type),打完留着光标闪烁
|
|
||||||
* 3. 首页 hero 跟随鼠标的柔和光斑(只改两个 CSS 变量,不做重排)
|
|
||||||
*
|
|
||||||
* 三处护栏:
|
|
||||||
* - prefers-reduced-motion: reduce → 全部动画关闭,只留静态样式
|
|
||||||
* - 标签页切到后台 → 停掉 rAF,回来再继续
|
|
||||||
* - 设备像素比封顶 2,避免 4K 屏把 canvas 撑爆
|
|
||||||
*/
|
|
||||||
(function () {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
var page = document.querySelector('.page-content.home, .page-content.user.signin');
|
|
||||||
if (!page) return;
|
|
||||||
|
|
||||||
var isHome = page.classList.contains('home');
|
|
||||||
var body = document.body;
|
|
||||||
body.classList.add('qq-fx-active', isHome ? 'qq-fx-home' : 'qq-fx-login');
|
|
||||||
|
|
||||||
var reduceMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
||||||
|
|
||||||
/* ---------------- 1. 背景粒子星座 ---------------- */
|
|
||||||
function initParticles() {
|
|
||||||
var canvas = document.createElement('canvas');
|
|
||||||
canvas.id = 'qq-fx-canvas';
|
|
||||||
canvas.setAttribute('aria-hidden', 'true');
|
|
||||||
body.appendChild(canvas);
|
|
||||||
|
|
||||||
var ctx = canvas.getContext('2d');
|
|
||||||
var dpr = Math.min(window.devicePixelRatio || 1, 2);
|
|
||||||
var w = 0, h = 0, dots = [], raf = 0, running = true;
|
|
||||||
|
|
||||||
function accent() {
|
|
||||||
var v = getComputedStyle(body).getPropertyValue('--color-primary').trim();
|
|
||||||
return v || '#3B82F6';
|
|
||||||
}
|
|
||||||
var color = accent();
|
|
||||||
var LINK_DIST = 132;
|
|
||||||
|
|
||||||
function resize() {
|
|
||||||
w = canvas.clientWidth;
|
|
||||||
h = canvas.clientHeight;
|
|
||||||
canvas.width = Math.round(w * dpr);
|
|
||||||
canvas.height = Math.round(h * dpr);
|
|
||||||
ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
|
|
||||||
// 点数量跟面积走,手机少一点
|
|
||||||
var count = Math.max(18, Math.min(44, Math.round((w * h) / 42000)));
|
|
||||||
dots = [];
|
|
||||||
for (var i = 0; i < count; i++) {
|
|
||||||
dots.push({
|
|
||||||
x: Math.random() * w,
|
|
||||||
y: Math.random() * h,
|
|
||||||
vx: (Math.random() - 0.5) * 0.22,
|
|
||||||
vy: (Math.random() - 0.5) * 0.22,
|
|
||||||
r: 1 + Math.random() * 1.6
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function frame() {
|
|
||||||
ctx.clearRect(0, 0, w, h);
|
|
||||||
|
|
||||||
for (var i = 0; i < dots.length; i++) {
|
|
||||||
var d = dots[i];
|
|
||||||
d.x += d.vx;
|
|
||||||
d.y += d.vy;
|
|
||||||
if (d.x < -20) d.x = w + 20;
|
|
||||||
if (d.x > w + 20) d.x = -20;
|
|
||||||
if (d.y < -20) d.y = h + 20;
|
|
||||||
if (d.y > h + 20) d.y = -20;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 近邻连线
|
|
||||||
ctx.lineWidth = 1;
|
|
||||||
for (var a = 0; a < dots.length; a++) {
|
|
||||||
for (var b = a + 1; b < dots.length; b++) {
|
|
||||||
var dx = dots[a].x - dots[b].x;
|
|
||||||
var dy = dots[a].y - dots[b].y;
|
|
||||||
var dist = Math.sqrt(dx * dx + dy * dy);
|
|
||||||
if (dist > LINK_DIST) continue;
|
|
||||||
ctx.globalAlpha = (1 - dist / LINK_DIST) * 0.18;
|
|
||||||
ctx.strokeStyle = color;
|
|
||||||
ctx.beginPath();
|
|
||||||
ctx.moveTo(dots[a].x, dots[a].y);
|
|
||||||
ctx.lineTo(dots[b].x, dots[b].y);
|
|
||||||
ctx.stroke();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 点
|
|
||||||
ctx.globalAlpha = 0.55;
|
|
||||||
ctx.fillStyle = color;
|
|
||||||
for (var k = 0; k < dots.length; k++) {
|
|
||||||
ctx.beginPath();
|
|
||||||
ctx.arc(dots[k].x, dots[k].y, dots[k].r, 0, Math.PI * 2);
|
|
||||||
ctx.fill();
|
|
||||||
}
|
|
||||||
ctx.globalAlpha = 1;
|
|
||||||
|
|
||||||
if (running) raf = requestAnimationFrame(frame);
|
|
||||||
}
|
|
||||||
|
|
||||||
resize();
|
|
||||||
window.addEventListener('resize', function () {
|
|
||||||
cancelAnimationFrame(raf);
|
|
||||||
resize();
|
|
||||||
if (running) raf = requestAnimationFrame(frame);
|
|
||||||
});
|
|
||||||
|
|
||||||
// 深浅色切换后换一版粒子颜色
|
|
||||||
var mq = window.matchMedia('(prefers-color-scheme: dark)');
|
|
||||||
if (mq.addEventListener) {
|
|
||||||
mq.addEventListener('change', function () {
|
|
||||||
setTimeout(function () { color = accent(); }, 50);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
document.addEventListener('visibilitychange', function () {
|
|
||||||
if (document.hidden) {
|
|
||||||
running = false;
|
|
||||||
cancelAnimationFrame(raf);
|
|
||||||
} else if (!reduceMotion) {
|
|
||||||
running = true;
|
|
||||||
raf = requestAnimationFrame(frame);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
if (reduceMotion) {
|
|
||||||
// 关掉动画:只画一帧静态星座
|
|
||||||
running = false;
|
|
||||||
frame();
|
|
||||||
} else {
|
|
||||||
raf = requestAnimationFrame(frame);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ---------------- 2. 口号打字机 ---------------- */
|
|
||||||
function initTyping() {
|
|
||||||
var el = document.querySelector('[data-qq-type]');
|
|
||||||
if (!el) return;
|
|
||||||
var text = (el.getAttribute('data-qq-type') || el.textContent || '').trim();
|
|
||||||
if (!text) return;
|
|
||||||
if (reduceMotion) { el.textContent = text; el.classList.add('qq-typed'); return; }
|
|
||||||
|
|
||||||
el.textContent = '';
|
|
||||||
el.classList.add('qq-typing');
|
|
||||||
var i = 0;
|
|
||||||
var timer = setInterval(function () {
|
|
||||||
el.textContent = text.slice(0, ++i);
|
|
||||||
if (i >= text.length) {
|
|
||||||
clearInterval(timer);
|
|
||||||
el.classList.remove('qq-typing');
|
|
||||||
el.classList.add('qq-typed');
|
|
||||||
}
|
|
||||||
}, 95);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ---------------- 3. hero 跟随鼠标的光斑 ---------------- */
|
|
||||||
function initSpotlight() {
|
|
||||||
var hero = document.querySelector('.qq-hero');
|
|
||||||
if (!hero || reduceMotion) return;
|
|
||||||
hero.addEventListener('mousemove', function (e) {
|
|
||||||
var r = hero.getBoundingClientRect();
|
|
||||||
hero.style.setProperty('--qq-mx', (e.clientX - r.left) + 'px');
|
|
||||||
hero.style.setProperty('--qq-my', (e.clientY - r.top) + 'px');
|
|
||||||
});
|
|
||||||
hero.addEventListener('mouseleave', function () {
|
|
||||||
hero.style.setProperty('--qq-mx', '50%');
|
|
||||||
hero.style.setProperty('--qq-my', '40%');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isHome) initParticles();
|
|
||||||
initTyping();
|
|
||||||
initSpotlight();
|
|
||||||
})();
|
|
||||||
|
|
@ -1,274 +0,0 @@
|
||||||
/*
|
|
||||||
* qq-home.js —— 未登录首页的两件小事(纯前端,无依赖)
|
|
||||||
* ---------------------------------------------------------------------------
|
|
||||||
* 1. 热门公开仓库:调 Gitea 公开 API → 前端过滤/排序 → 渲染 3 张卡片
|
|
||||||
* 2. terminal 小窗的「复制 clone 命令」按钮
|
|
||||||
*
|
|
||||||
* 只在首页存在 #qq-hot-repos 时启动;其余页面直接 return。
|
|
||||||
* 取数失败的策略是「静默隐藏整块」,不弹错、不留空框。
|
|
||||||
*/
|
|
||||||
(function () {
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
/* ---------------- 0. 小工具 ---------------- */
|
|
||||||
var HOT_LIMIT = 3; // 最终展示几条
|
|
||||||
var FETCH_LIMIT = 50; // 接口多取一些,前端再筛
|
|
||||||
var FETCH_TIMEOUT = 5000; // 5s 超时后静默隐藏
|
|
||||||
// 语言圆点:只用品牌蓝色阶(按语言名哈希取色),不用 Gitea 原生语言色
|
|
||||||
var DOT_COLORS = ['#1D4ED8', '#3B82F6', '#60A5FA', '#93C5FD'];
|
|
||||||
var reduceMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
||||||
|
|
||||||
function make(tag, className, text) {
|
|
||||||
var node = document.createElement(tag);
|
|
||||||
if (className) node.className = className;
|
|
||||||
if (text != null) node.textContent = text;
|
|
||||||
return node;
|
|
||||||
}
|
|
||||||
|
|
||||||
function hashStr(str) {
|
|
||||||
var h = 0;
|
|
||||||
for (var i = 0; i < str.length; i++) {
|
|
||||||
h = (h * 31 + str.charCodeAt(i)) | 0;
|
|
||||||
}
|
|
||||||
return Math.abs(h);
|
|
||||||
}
|
|
||||||
|
|
||||||
function dotColor(language) {
|
|
||||||
if (!language) return DOT_COLORS[1];
|
|
||||||
return DOT_COLORS[hashStr(language) % DOT_COLORS.length];
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 相对时间:刚刚 / N 分钟前 / N 小时前 / N 天前 / N 个月前 / N 年前 */
|
|
||||||
function relativeTime(iso) {
|
|
||||||
var t = Date.parse(iso || '');
|
|
||||||
if (isNaN(t)) return '';
|
|
||||||
var sec = Math.max(0, (Date.now() - t) / 1000);
|
|
||||||
if (sec < 60) return '刚刚';
|
|
||||||
if (sec < 3600) return Math.floor(sec / 60) + ' 分钟前';
|
|
||||||
if (sec < 86400) return Math.floor(sec / 3600) + ' 小时前';
|
|
||||||
if (sec < 2592000) return Math.floor(sec / 86400) + ' 天前';
|
|
||||||
if (sec < 31536000) return Math.floor(sec / 2592000) + ' 个月前';
|
|
||||||
return Math.floor(sec / 31536000) + ' 年前';
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 过滤 + 排序:排除 fork / 镜像 / 私有 / 归档;星标降序,同星按更新时间降序 */
|
|
||||||
function pickRepos(list) {
|
|
||||||
return (list || []).filter(function (repo) {
|
|
||||||
return repo && repo.full_name && !repo.fork && !repo.mirror && !repo.private && !repo.archived;
|
|
||||||
}).sort(function (a, b) {
|
|
||||||
var byStars = (b.stars_count || 0) - (a.stars_count || 0);
|
|
||||||
if (byStars) return byStars;
|
|
||||||
return Date.parse(b.updated_at || 0) - Date.parse(a.updated_at || 0);
|
|
||||||
}).slice(0, HOT_LIMIT);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ---------------- 1. 热门公开仓库 ---------------- */
|
|
||||||
function initHotRepos() {
|
|
||||||
var section = document.getElementById('qq-hot-repos');
|
|
||||||
if (!section) return;
|
|
||||||
var grid = section.querySelector('[data-qq-hot-grid]');
|
|
||||||
if (!grid) return;
|
|
||||||
|
|
||||||
function hide() {
|
|
||||||
section.hidden = true;
|
|
||||||
grid.textContent = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
function skeletonCard() {
|
|
||||||
var card = make('div', 'qq-repo-card qq-skeleton');
|
|
||||||
card.setAttribute('aria-hidden', 'true');
|
|
||||||
card.appendChild(make('span', 'qq-sk-bar qq-sk-title'));
|
|
||||||
card.appendChild(make('span', 'qq-sk-bar qq-sk-desc'));
|
|
||||||
card.appendChild(make('span', 'qq-sk-bar qq-sk-desc qq-sk-desc-2'));
|
|
||||||
var meta = make('div', 'qq-sk-meta');
|
|
||||||
meta.appendChild(make('span', 'qq-sk-bar qq-sk-pill'));
|
|
||||||
meta.appendChild(make('span', 'qq-sk-bar qq-sk-pill'));
|
|
||||||
meta.appendChild(make('span', 'qq-sk-bar qq-sk-pill qq-sk-pill-end'));
|
|
||||||
card.appendChild(meta);
|
|
||||||
return card;
|
|
||||||
}
|
|
||||||
|
|
||||||
function showSkeletons() {
|
|
||||||
grid.textContent = '';
|
|
||||||
for (var i = 0; i < HOT_LIMIT; i++) grid.appendChild(skeletonCard());
|
|
||||||
section.hidden = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
function avatar(repo) {
|
|
||||||
var owner = (repo.owner && repo.owner.login) || (repo.full_name || '').split('/')[0] || '?';
|
|
||||||
var src = repo.owner && repo.owner.avatar_url;
|
|
||||||
if (src) {
|
|
||||||
var img = document.createElement('img');
|
|
||||||
img.className = 'qq-repo-avatar';
|
|
||||||
img.src = src;
|
|
||||||
img.alt = '';
|
|
||||||
img.width = 20;
|
|
||||||
img.height = 20;
|
|
||||||
img.loading = 'lazy';
|
|
||||||
img.decoding = 'async';
|
|
||||||
// 头像挂了就退回首字母,不出现破图
|
|
||||||
img.addEventListener('error', function () {
|
|
||||||
var fallback = make('span', 'qq-repo-avatar qq-repo-avatar-fallback', owner.charAt(0).toUpperCase());
|
|
||||||
if (img.parentNode) img.parentNode.replaceChild(fallback, img);
|
|
||||||
});
|
|
||||||
return img;
|
|
||||||
}
|
|
||||||
return make('span', 'qq-repo-avatar qq-repo-avatar-fallback', owner.charAt(0).toUpperCase());
|
|
||||||
}
|
|
||||||
|
|
||||||
function repoCard(repo) {
|
|
||||||
var card = document.createElement('a');
|
|
||||||
card.className = 'qq-repo-card';
|
|
||||||
card.href = repo.html_url || '#';
|
|
||||||
|
|
||||||
var head = make('div', 'qq-repo-head');
|
|
||||||
head.appendChild(avatar(repo));
|
|
||||||
var name = make('span', 'qq-repo-name');
|
|
||||||
var parts = String(repo.full_name).split('/');
|
|
||||||
name.appendChild(make('span', 'qq-repo-owner', parts[0] + '/'));
|
|
||||||
name.appendChild(make('span', 'qq-repo-repo', parts.slice(1).join('/')));
|
|
||||||
name.title = repo.full_name;
|
|
||||||
head.appendChild(name);
|
|
||||||
card.appendChild(head);
|
|
||||||
|
|
||||||
var desc = make('p', 'qq-repo-desc', repo.description || '暂无简介');
|
|
||||||
card.appendChild(desc);
|
|
||||||
|
|
||||||
var meta = make('div', 'qq-repo-meta');
|
|
||||||
var lang = make('span', 'qq-repo-lang');
|
|
||||||
var dot = make('span', 'qq-repo-dot');
|
|
||||||
dot.style.setProperty('--qq-dot', dotColor(repo.language));
|
|
||||||
lang.appendChild(dot);
|
|
||||||
lang.appendChild(make('span', 'qq-repo-lang-name', repo.language || '未标注语言'));
|
|
||||||
meta.appendChild(lang);
|
|
||||||
|
|
||||||
var stars = make('span', 'qq-repo-stat');
|
|
||||||
stars.appendChild(make('span', 'qq-repo-stat-icon', '★'));
|
|
||||||
stars.appendChild(make('span', null, String(repo.stars_count || 0)));
|
|
||||||
stars.title = '星标';
|
|
||||||
meta.appendChild(stars);
|
|
||||||
|
|
||||||
var forks = make('span', 'qq-repo-stat');
|
|
||||||
forks.appendChild(make('span', 'qq-repo-stat-icon', '⑂'));
|
|
||||||
forks.appendChild(make('span', null, String(repo.forks_count || 0)));
|
|
||||||
forks.title = '分支';
|
|
||||||
meta.appendChild(forks);
|
|
||||||
|
|
||||||
var updated = relativeTime(repo.updated_at);
|
|
||||||
meta.appendChild(make('span', 'qq-repo-time', updated ? updated + '更新' : ''));
|
|
||||||
|
|
||||||
card.appendChild(meta);
|
|
||||||
return card;
|
|
||||||
}
|
|
||||||
|
|
||||||
function render(list) {
|
|
||||||
if (!list.length) { hide(); return; }
|
|
||||||
grid.textContent = '';
|
|
||||||
list.forEach(function (repo) { grid.appendChild(repoCard(repo)); });
|
|
||||||
section.hidden = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 离线预览:不碰网络,直接用页面里的假数据 */
|
|
||||||
var demo = section.getAttribute('data-demo') === '1' && window.QQ_HOT_REPOS_DEMO;
|
|
||||||
if (demo) {
|
|
||||||
showSkeletons();
|
|
||||||
window.setTimeout(function () { render(pickRepos(window.QQ_HOT_REPOS_DEMO)); }, reduceMotion ? 0 : 320);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var endpoint = section.getAttribute('data-endpoint');
|
|
||||||
if (!endpoint) { hide(); return; }
|
|
||||||
|
|
||||||
showSkeletons();
|
|
||||||
|
|
||||||
var controller = window.AbortController ? new window.AbortController() : null;
|
|
||||||
var settled = false;
|
|
||||||
var timer = window.setTimeout(function () {
|
|
||||||
if (settled) return;
|
|
||||||
settled = true;
|
|
||||||
if (controller) {
|
|
||||||
try { controller.abort(); } catch (e) { /* ignore */ }
|
|
||||||
}
|
|
||||||
hide();
|
|
||||||
}, FETCH_TIMEOUT);
|
|
||||||
|
|
||||||
function done() {
|
|
||||||
settled = true;
|
|
||||||
window.clearTimeout(timer);
|
|
||||||
}
|
|
||||||
|
|
||||||
var sep = endpoint.indexOf('?') === -1 ? '?' : '&';
|
|
||||||
var url = endpoint + sep + 'sort=updated&order=desc&limit=' + FETCH_LIMIT + '&mode=source';
|
|
||||||
|
|
||||||
window.fetch(url, {
|
|
||||||
method: 'GET',
|
|
||||||
credentials: 'same-origin',
|
|
||||||
headers: { Accept: 'application/json' },
|
|
||||||
signal: controller ? controller.signal : undefined
|
|
||||||
}).then(function (res) {
|
|
||||||
if (!res.ok) throw new Error('HTTP ' + res.status);
|
|
||||||
return res.json();
|
|
||||||
}).then(function (data) {
|
|
||||||
done();
|
|
||||||
render(pickRepos(data && data.data));
|
|
||||||
}).catch(function () {
|
|
||||||
if (settled) return;
|
|
||||||
done();
|
|
||||||
hide();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ---------------- 2. 复制 clone 命令 ---------------- */
|
|
||||||
function fallbackCopy(text) {
|
|
||||||
var area = document.createElement('textarea');
|
|
||||||
area.value = text;
|
|
||||||
area.setAttribute('readonly', '');
|
|
||||||
area.style.position = 'fixed';
|
|
||||||
area.style.top = '-1000px';
|
|
||||||
area.style.opacity = '0';
|
|
||||||
document.body.appendChild(area);
|
|
||||||
area.select();
|
|
||||||
var ok = false;
|
|
||||||
try { ok = document.execCommand('copy'); } catch (e) { ok = false; }
|
|
||||||
document.body.removeChild(area);
|
|
||||||
return ok;
|
|
||||||
}
|
|
||||||
|
|
||||||
function initCopy() {
|
|
||||||
var buttons = document.querySelectorAll('[data-qq-copy]');
|
|
||||||
Array.prototype.forEach.call(buttons, function (btn) {
|
|
||||||
var text = btn.getAttribute('data-qq-copy');
|
|
||||||
if (!text) return;
|
|
||||||
var tip = btn.parentNode ? btn.parentNode.querySelector('.qq-qc-tip') : null;
|
|
||||||
var resetTimer = 0;
|
|
||||||
|
|
||||||
function feedback() {
|
|
||||||
btn.classList.add('is-copied');
|
|
||||||
btn.setAttribute('aria-label', '已复制');
|
|
||||||
if (tip) {
|
|
||||||
tip.classList.add('is-on');
|
|
||||||
tip.textContent = '已复制';
|
|
||||||
}
|
|
||||||
window.clearTimeout(resetTimer);
|
|
||||||
resetTimer = window.setTimeout(function () {
|
|
||||||
btn.classList.remove('is-copied');
|
|
||||||
btn.setAttribute('aria-label', '复制 clone 命令');
|
|
||||||
if (tip) tip.classList.remove('is-on');
|
|
||||||
}, 1600);
|
|
||||||
}
|
|
||||||
|
|
||||||
btn.addEventListener('click', function () {
|
|
||||||
if (navigator.clipboard && navigator.clipboard.writeText) {
|
|
||||||
navigator.clipboard.writeText(text).then(feedback, function () {
|
|
||||||
if (fallbackCopy(text)) feedback();
|
|
||||||
});
|
|
||||||
} else if (fallbackCopy(text)) {
|
|
||||||
feedback();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
initHotRepos();
|
|
||||||
initCopy();
|
|
||||||
})();
|
|
||||||
|
|
@ -1,32 +0,0 @@
|
||||||
{{/*
|
|
||||||
覆盖官方的 base/footer_content.tmpl(Gitea 1.21.11)
|
|
||||||
--------------------------------------------------------------------
|
|
||||||
官方那一整条包含「Powered by Gitea / 当前版本 / 页面耗时 / 模板耗时 /
|
|
||||||
简体中文语言菜单 / 许可证 / API」,本站不需要,整体删掉。
|
|
||||||
|
|
||||||
现在底部条三段(靠 qq-ui.css 的绝对定位摆放):
|
|
||||||
左:{{AppName}} · Gitea {{AppVer}}
|
|
||||||
中:未登录访客的语言切换(登录用户走个人设置,不重复放)
|
|
||||||
右:ICP 备案号
|
|
||||||
|
|
||||||
语言切换刻意不用官方 `.ui.dropdown`——那个要靠 index.js 初始化,
|
|
||||||
脚本没跑起来就点不动;`?lang=xx-XX` 是 Gitea i18n 中间件的原生参数,
|
|
||||||
写成纯链接就生效。
|
|
||||||
|
|
||||||
备案号:闽ICP备2023002932号(QQ 于 2026-11-03 提供),改文字后重跑 ./scripts/deploy.sh --yes。
|
|
||||||
*/}}
|
|
||||||
<footer class="page-footer qq-icp-footer" role="contentinfo" aria-label="站点信息">
|
|
||||||
<span class="qq-icp-meta">{{AppName}} · Gitea {{AppVer}}</span>
|
|
||||||
{{if not .SignedUser}}
|
|
||||||
<nav class="qq-lang" aria-label="{{ctx.Locale.Tr "language"}}">
|
|
||||||
{{if eq ctx.Locale.Lang "zh-CN"}}
|
|
||||||
<span class="qq-lang-cur">简体中文</span>
|
|
||||||
<a href="{{AppSubUrl}}/?lang=en-US" rel="nofollow">English</a>
|
|
||||||
{{else}}
|
|
||||||
<a href="{{AppSubUrl}}/?lang=zh-CN" rel="nofollow">简体中文</a>
|
|
||||||
<span class="qq-lang-cur">{{ctx.Locale.LangName}}</span>
|
|
||||||
{{end}}
|
|
||||||
</nav>
|
|
||||||
{{end}}
|
|
||||||
<a class="qq-icp" href="https://beian.miit.gov.cn/" target="_blank" rel="noopener noreferrer">闽ICP备2023002932号</a>
|
|
||||||
</footer>
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
{{/*
|
|
||||||
custom/footer.tmpl —— 注入到 </body> 之前(base/footer.tmpl 第 30 行)
|
|
||||||
|
|
||||||
Gitea 原生页脚已经带了「Powered by Gitea + 版本 + 语言/许可证/API」,
|
|
||||||
所以这里默认**留空**,避免出现两行重复的品牌信息。
|
|
||||||
|
|
||||||
需要挂备案号时,取消下面整段的注释并填上你的号即可(样式见 qq-ui.css 的 .qq-footer):
|
|
||||||
|
|
||||||
<div class="qq-footer">
|
|
||||||
<a href="https://beian.miit.gov.cn/" target="_blank" rel="noopener noreferrer">X ICP 备 XXXXXXXX 号</a>
|
|
||||||
</div>
|
|
||||||
*/}}
|
|
||||||
|
|
||||||
{{/*
|
|
||||||
动效层:只在首页(.page-content.home)和登录页(.page-content.user.signin)生效,
|
|
||||||
其它页面 qq-fx.js 里第一行就 return,不会加载 canvas、不会挂 rAF。
|
|
||||||
*/}}
|
|
||||||
<script src="{{AssetUrlPrefix}}/js/qq-fx.js?v=3" defer></script>
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
{{/*
|
|
||||||
custom/header.tmpl —— 注入到 <head> 末尾(见 base/head.tmpl 第 30 行)
|
|
||||||
职责:引入「蓝白 ins 风」细节层 + 预加载等宽字体
|
|
||||||
注意:只做外观增强,不引入任何外部依赖,全部资源随 custom/ 一起发布
|
|
||||||
*/}}
|
|
||||||
<link rel="preload" href="{{AssetUrlPrefix}}/fonts/jetbrains-mono-latin-400-normal.woff2" as="font" type="font/woff2" crossorigin="anonymous">
|
|
||||||
<link rel="stylesheet" href="{{AssetUrlPrefix}}/css/qq-ui.css?v=31">
|
|
||||||
<link rel="stylesheet" href="{{AssetUrlPrefix}}/css/qq-fx.css?v=26">
|
|
||||||
<link rel="stylesheet" href="{{AssetUrlPrefix}}/css/qq-pages.css?v=32">
|
|
||||||
<meta name="theme-color" content="#60A5FA" media="(prefers-color-scheme: light)">
|
|
||||||
<meta name="theme-color" content="#0D1117" media="(prefers-color-scheme: dark)">
|
|
||||||
|
|
||||||
{{/*
|
|
||||||
图标覆盖:Gitea 只在 head 里给 rel=icon 指向 /assets/img/favicon.svg(无版本号),
|
|
||||||
浏览器会把 favicon 单独缓存在 origin 级别的数据库里,普通刷新不会重拉,
|
|
||||||
所以线上明明已经是蓝色 Q,老访客标签页还显示旧的绿色 Gitea 杯子。
|
|
||||||
这里再挂一组带 ?v= 的图标链接强制重拉;换 Logo 时把 v= 的数字加一即可。
|
|
||||||
*/}}
|
|
||||||
<link rel="icon" type="image/svg+xml" href="{{AssetUrlPrefix}}/img/favicon.svg?v=2">
|
|
||||||
<link rel="alternate icon" type="image/png" href="{{AssetUrlPrefix}}/img/favicon.png?v=2">
|
|
||||||
<link rel="apple-touch-icon" sizes="180x180" href="{{AssetUrlPrefix}}/img/apple-touch-icon.png?v=2">
|
|
||||||
|
|
@ -1,126 +0,0 @@
|
||||||
{{/* home.tmpl —— 未登录首页(模板覆盖,不改源码;删掉本文件即回到官方首页)
|
|
||||||
v1.4 版式(方案 A + B 合并):
|
|
||||||
· 首屏左右分栏:左 7/12 标题/口号/搜索/按钮,右 5/12 毛玻璃分支图 + terminal 小窗
|
|
||||||
· 热门公开仓库:/api/v1/repos/search 取数,前端过滤排序后只留 3 条
|
|
||||||
· 三张功能卡收尾,数字条已按方案 A 删除
|
|
||||||
品牌色仍是蓝白;动效(粒子星座 / 光雾 / 打字机)由 qq-fx.css + qq-fx.js 提供。
|
|
||||||
i18n:新的标题/卡片文案是本项目自己的,直接写中文;Gitea 版本号用 {{AppVer}}。 */}}
|
|
||||||
{{template "base/head" .}}
|
|
||||||
<div role="main" aria-label="{{ctx.Locale.Tr "home"}}" class="page-content home qq-landing">
|
|
||||||
|
|
||||||
<section class="qq-lp-hero">
|
|
||||||
<div class="qq-lp-hero-copy">
|
|
||||||
<p class="qq-lp-eyebrow">私有部署 · 轻量 · 全功能</p>
|
|
||||||
<h1 class="qq-lp-title">{{AppName}}</h1>
|
|
||||||
<p class="qq-lp-sub" data-qq-type="自己的代码,自己的地方。">自己的代码,自己的地方。</p>
|
|
||||||
|
|
||||||
<form class="qq-lp-search" action="{{AppSubUrl}}/explore/repos" method="get">
|
|
||||||
<input type="search" name="q" placeholder="搜索仓库、用户、组织…" aria-label="搜索仓库">
|
|
||||||
<button class="ui primary button" type="submit">搜索</button>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<div class="qq-lp-cta">
|
|
||||||
{{if .IsSigned}}
|
|
||||||
<a class="ui primary button" href="{{AppSubUrl}}/">进入控制台</a>
|
|
||||||
<a class="ui basic button" href="{{AppSubUrl}}/repo/create">新建仓库</a>
|
|
||||||
{{else}}
|
|
||||||
<a class="ui primary button" href="{{AppSubUrl}}/user/sign_up">免费注册</a>
|
|
||||||
<a class="ui basic button" href="{{AppSubUrl}}/user/login">登录</a>
|
|
||||||
{{end}}
|
|
||||||
<a class="qq-lp-link" href="{{AppSubUrl}}/explore/repos">浏览全部仓库 →</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="qq-lp-visual">
|
|
||||||
<div class="qq-lp-graph" aria-hidden="true">
|
|
||||||
<svg class="qq-lp-graph-svg" viewBox="0 0 600 400" preserveAspectRatio="xMidYMid meet" focusable="false">
|
|
||||||
<defs>
|
|
||||||
<linearGradient id="qqg-line" x1="0" y1="1" x2="1" y2="0">
|
|
||||||
<stop offset="0%" stop-color="#1D4ED8"/>
|
|
||||||
<stop offset="55%" stop-color="#3B82F6"/>
|
|
||||||
<stop offset="100%" stop-color="#60A5FA"/>
|
|
||||||
</linearGradient>
|
|
||||||
</defs>
|
|
||||||
<g class="qqg-faint">
|
|
||||||
<path class="qqg-edge-faint" d="M46 300 C120 300 130 260 200 260 C280 260 300 300 370 300 C440 300 460 260 540 260"/>
|
|
||||||
<path class="qqg-edge-faint qqg-flow" d="M46 240 C120 240 120 150 200 150 C270 150 280 240 350 240 C420 240 430 150 510 150 C545 150 560 160 574 166"/>
|
|
||||||
<path class="qqg-link" d="M200 150 L200 260"/>
|
|
||||||
<path class="qqg-link" d="M350 240 L370 300"/>
|
|
||||||
<path class="qqg-link" d="M510 150 L540 260"/>
|
|
||||||
<circle class="qqg-node-soft" cx="46" cy="300" r="2.5"/>
|
|
||||||
<circle class="qqg-node-soft" cx="370" cy="300" r="2.5"/>
|
|
||||||
<circle class="qqg-node-soft" cx="540" cy="260" r="2.5"/>
|
|
||||||
</g>
|
|
||||||
<path class="qqg-edge" d="M46 240 C120 240 120 150 200 150 C270 150 280 240 350 240 C420 240 430 150 510 150 C545 150 560 160 574 166"/>
|
|
||||||
<path class="qqg-edge" d="M46 300 C120 300 130 260 200 260 C280 260 300 300 370 300 C440 300 460 260 540 260"/>
|
|
||||||
<path class="qqg-edge" d="M200 150 C235 150 240 205 275 205 C310 205 315 240 350 240"/>
|
|
||||||
<g class="qqg-nodes">
|
|
||||||
<circle class="qqg-node" cx="46" cy="240" r="5"/>
|
|
||||||
<circle class="qqg-node-core" cx="200" cy="150" r="6"/>
|
|
||||||
<circle class="qqg-node-core" cx="350" cy="240" r="6"/>
|
|
||||||
<circle class="qqg-node" cx="510" cy="150" r="5"/>
|
|
||||||
<circle class="qqg-node" cx="574" cy="166" r="4"/>
|
|
||||||
<circle class="qqg-node" cx="46" cy="300" r="5"/>
|
|
||||||
<circle class="qqg-node" cx="200" cy="260" r="4"/>
|
|
||||||
<circle class="qqg-node-core" cx="370" cy="300" r="6"/>
|
|
||||||
<circle class="qqg-node" cx="540" cy="260" r="4"/>
|
|
||||||
<circle class="qqg-node" cx="275" cy="205" r="4"/>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="qq-lp-term">
|
|
||||||
<div class="qq-lp-term-bar" aria-hidden="true">
|
|
||||||
<span class="qq-lp-term-dots"><i></i><i></i><i></i></span>
|
|
||||||
<span class="qq-lp-term-title">terminal</span>
|
|
||||||
</div>
|
|
||||||
<div class="qq-lp-term-line">
|
|
||||||
<code class="qq-lp-term-code"><span class="qq-prompt">$</span> git clone <span class="qq-url">https://git.qyhhh.top/qq/repo.git</span></code>
|
|
||||||
<span class="qq-qc-tip" aria-hidden="true">已复制</span>
|
|
||||||
<button class="qq-lp-copy" type="button" data-qq-copy="git clone https://git.qyhhh.top/qq/repo.git" aria-label="复制 clone 命令">
|
|
||||||
<svg class="qq-copy-icon" viewBox="0 0 16 16" width="15" height="15" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
||||||
<rect x="5.5" y="5.5" width="8" height="8" rx="1.6"/>
|
|
||||||
<path d="M10.5 5.5V4a1.5 1.5 0 0 0-1.5-1.5H4A1.5 1.5 0 0 0 2.5 4v5A1.5 1.5 0 0 0 4 10.5h1.5"/>
|
|
||||||
</svg>
|
|
||||||
<svg class="qq-copy-check" viewBox="0 0 16 16" width="15" height="15" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
||||||
<path d="M3 8.5 6.2 11.7 13 4.5"/>
|
|
||||||
</svg>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="qq-lp-hot" id="qq-hot-repos" data-endpoint="{{AppSubUrl}}/api/v1/repos/search" hidden>
|
|
||||||
<div class="qq-lp-sec-head">
|
|
||||||
<h2>热门公开仓库</h2>
|
|
||||||
<a class="qq-lp-more" href="{{AppSubUrl}}/explore/repos?sort=moststars">查看全部 →</a>
|
|
||||||
</div>
|
|
||||||
<div class="qq-hot-grid" data-qq-hot-grid>
|
|
||||||
<div class="qq-repo-card qq-skeleton" aria-hidden="true"><span class="qq-sk-bar qq-sk-title"></span><span class="qq-sk-bar qq-sk-desc"></span><span class="qq-sk-bar qq-sk-desc qq-sk-desc-2"></span><div class="qq-sk-meta"><span class="qq-sk-bar qq-sk-pill"></span><span class="qq-sk-bar qq-sk-pill"></span><span class="qq-sk-bar qq-sk-pill qq-sk-pill-end"></span></div></div>
|
|
||||||
<div class="qq-repo-card qq-skeleton" aria-hidden="true"><span class="qq-sk-bar qq-sk-title"></span><span class="qq-sk-bar qq-sk-desc"></span><span class="qq-sk-bar qq-sk-desc qq-sk-desc-2"></span><div class="qq-sk-meta"><span class="qq-sk-bar qq-sk-pill"></span><span class="qq-sk-bar qq-sk-pill"></span><span class="qq-sk-bar qq-sk-pill qq-sk-pill-end"></span></div></div>
|
|
||||||
<div class="qq-repo-card qq-skeleton" aria-hidden="true"><span class="qq-sk-bar qq-sk-title"></span><span class="qq-sk-bar qq-sk-desc"></span><span class="qq-sk-bar qq-sk-desc qq-sk-desc-2"></span><div class="qq-sk-meta"><span class="qq-sk-bar qq-sk-pill"></span><span class="qq-sk-bar qq-sk-pill"></span><span class="qq-sk-bar qq-sk-pill qq-sk-pill-end"></span></div></div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="qq-lp-grid">
|
|
||||||
<article class="qq-lp-card">
|
|
||||||
<span class="qq-lp-icon">{{svg "octicon-git-branch" 18}}</span>
|
|
||||||
<h2>版本控制</h2>
|
|
||||||
<p>Git 仓库、分支、标签、合并请求与代码评审,一套齐全。</p>
|
|
||||||
</article>
|
|
||||||
<article class="qq-lp-card">
|
|
||||||
<span class="qq-lp-icon">{{svg "octicon-issue-opened" 18}}</span>
|
|
||||||
<h2>议题与看板</h2>
|
|
||||||
<p>Issues、里程碑、标签与看板,把待办和进展放在同一个地方。</p>
|
|
||||||
</article>
|
|
||||||
<article class="qq-lp-card">
|
|
||||||
<span class="qq-lp-icon">{{svg "octicon-shield-lock" 18}}</span>
|
|
||||||
<h2>数据自持</h2>
|
|
||||||
<p>跑在自己的服务器上,仓库、用户与备份都由自己掌握。</p>
|
|
||||||
</article>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<script src="{{AssetUrlPrefix}}/js/qq-home.js?v=1" defer></script>
|
|
||||||
{{template "base/footer" .}}
|
|
||||||
|
|
@ -1,102 +0,0 @@
|
||||||
{{/* user/dashboard/dashboard.tmpl —— 登录后的控制台(模板覆盖,不改源码)
|
|
||||||
版式参考 GitHub Dashboard:
|
|
||||||
左栏 = 我的仓库 + 快捷导航;中栏 = 问候 / 搜索 / PR·Issues / 贡献热力图 / 动态;
|
|
||||||
右栏 = 站点信息卡片。
|
|
||||||
只用官方已提供的数据与子模板(user/dashboard/repolist、user/heatmap、
|
|
||||||
user/dashboard/feeds),不引入新的后端数据,避免升级后 500。 */}}
|
|
||||||
{{template "base/head" .}}
|
|
||||||
<div role="main" aria-label="{{.Title}}" class="page-content dashboard feeds qq-dash">
|
|
||||||
<div class="qq-dash-shell">
|
|
||||||
{{template "base/alert" .}}
|
|
||||||
|
|
||||||
{{/* 顶部通栏:欢迎语在上,贡献热力图在下;三栏在它们下面 */}}
|
|
||||||
<h1 class="qq-dash-hello">
|
|
||||||
{{.SignedUser.Name}}<span class="qq-dash-hi">,欢迎回来</span>
|
|
||||||
</h1>
|
|
||||||
|
|
||||||
<section class="qq-dash-card qq-dash-heat qq-dash-heat-top">
|
|
||||||
{{template "user/heatmap" .}}
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<div class="qq-dash-grid">
|
|
||||||
|
|
||||||
<aside class="qq-dash-side">
|
|
||||||
<details class="qq-quicknav">
|
|
||||||
<summary>
|
|
||||||
<span class="qq-quicknav-t">快捷导航</span>
|
|
||||||
{{svg "octicon-chevron-down" 14 "qq-quicknav-chev"}}
|
|
||||||
</summary>
|
|
||||||
<nav class="qq-dash-nav" aria-label="快捷导航">
|
|
||||||
<a class="item active" href="{{AppSubUrl}}/">{{svg "octicon-home" 16}} 首页</a>
|
|
||||||
<a class="item" href="{{.ContextUser.DashboardLink}}">{{svg "octicon-pulse" 16}} 动态</a>
|
|
||||||
<a class="item" href="{{AppSubUrl}}/pulls">{{svg "octicon-git-pull-request" 16}} 合并请求</a>
|
|
||||||
<a class="item" href="{{AppSubUrl}}/issues">{{svg "octicon-issue-opened" 16}} 议题</a>
|
|
||||||
<a class="item" href="{{AppSubUrl}}/repo/create">{{svg "octicon-plus" 16}} 新建仓库</a>
|
|
||||||
</nav>
|
|
||||||
</details>
|
|
||||||
|
|
||||||
<div class="qq-dash-repos">
|
|
||||||
<div class="qq-dash-side-head">
|
|
||||||
<span>我的仓库</span>
|
|
||||||
<a href="{{AppSubUrl}}/repo/create" title="新建仓库">{{svg "octicon-plus" 14}}</a>
|
|
||||||
</div>
|
|
||||||
{{template "user/dashboard/repolist" .}}
|
|
||||||
</div>
|
|
||||||
</aside>
|
|
||||||
|
|
||||||
<main class="qq-dash-main">
|
|
||||||
<form class="qq-dash-search" action="{{AppSubUrl}}/explore/repos" method="get">
|
|
||||||
{{svg "octicon-search" 16}}
|
|
||||||
<input type="search" name="q" placeholder="前往仓库…(输入关键字回车搜索)" aria-label="搜索仓库">
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<section class="qq-dash-card qq-dash-quick">
|
|
||||||
<div class="qq-panel-head">我参与的</div>
|
|
||||||
<div class="qq-quick-row">
|
|
||||||
<a class="qq-quick" href="{{AppSubUrl}}/pulls">
|
|
||||||
{{svg "octicon-git-pull-request" 16}}
|
|
||||||
<span class="qq-quick-t">合并请求</span>
|
|
||||||
<span class="qq-quick-d">我发起或指派给我的</span>
|
|
||||||
</a>
|
|
||||||
<a class="qq-quick" href="{{AppSubUrl}}/issues">
|
|
||||||
{{svg "octicon-issue-opened" 16}}
|
|
||||||
<span class="qq-quick-t">议题</span>
|
|
||||||
<span class="qq-quick-d">待处理与跟踪中的</span>
|
|
||||||
</a>
|
|
||||||
<a class="qq-quick" href="{{AppSubUrl}}/milestones">
|
|
||||||
{{svg "octicon-milestone" 16}}
|
|
||||||
<span class="qq-quick-t">里程碑</span>
|
|
||||||
<span class="qq-quick-d">按计划查看进度</span>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="qq-dash-card qq-dash-feed">
|
|
||||||
<div class="qq-panel-head">最近动态</div>
|
|
||||||
{{template "user/dashboard/feeds" .}}
|
|
||||||
</section>
|
|
||||||
</main>
|
|
||||||
|
|
||||||
<aside class="qq-dash-aside">
|
|
||||||
<section class="qq-dash-card qq-dash-actions">
|
|
||||||
<div class="qq-panel-head">快捷入口</div>
|
|
||||||
{{/* 新建仓库 / 新建组织 / 组织列表都已在左栏(我的仓库的 + 号与「组织」分页),
|
|
||||||
这里只放左栏没有的去处,避免两处功能重复 */}}
|
|
||||||
<ul class="qq-action-list">
|
|
||||||
<li><a href="{{AppSubUrl}}/repo/migrate">{{svg "octicon-repo-push" 16}}<span>导入仓库</span></a></li>
|
|
||||||
<li><a href="{{AppSubUrl}}/explore/repos">{{svg "octicon-telescope" 16}}<span>探索仓库</span></a></li>
|
|
||||||
<li><a href="{{AppSubUrl}}/issues">{{svg "octicon-issue-opened" 16}}<span>我的议题</span></a></li>
|
|
||||||
<li><a href="{{AppSubUrl}}/pulls">{{svg "octicon-git-pull-request" 16}}<span>我的合并请求</span></a></li>
|
|
||||||
</ul>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="qq-dash-card qq-dash-tip">
|
|
||||||
<div class="qq-panel-head">小提示</div>
|
|
||||||
<p>仓库列表在左栏可以直接搜索;点右上角头像可以切换主题(QQGit · 浅色 / 深色 / 跟随系统)。</p>
|
|
||||||
</section>
|
|
||||||
</aside>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{template "base/footer" .}}
|
|
||||||
|
|
@ -1,41 +0,0 @@
|
||||||
# Logo 设计决策记录
|
|
||||||
|
|
||||||
## 定案:方案 2-A
|
|
||||||
|
|
||||||
| | 文件 | 说明 |
|
|
||||||
|---|---|---|
|
|
||||||
| 日间 | `logo-2a-light-raw.png` | 原始生图(1024×1024),浅天蓝圆章 `#60A5FA` + 纯白负空间 Git-Q |
|
|
||||||
| 夜间 | `logo-2a-dark-raw.png` | 由原图改造,暗底 + 圆章提到 `#38BDF8` + 轨道 `#F8FAFC` |
|
|
||||||
|
|
||||||
原始生图只作为**设计留档**(圆外有底色方框、非透明),真正上线用的是矢量重绘版:
|
|
||||||
|
|
||||||
- `custom/public/assets/img/logo.svg` —— 日夜自适应(内嵌 `@media (prefers-color-scheme: dark)`)
|
|
||||||
- `custom/public/assets/img/logo-light.svg` / `logo-dark.svg` —— 显式指定
|
|
||||||
- `custom/public/assets/img/favicon.svg` —— 32 栅格重绘(不缩放,保证小尺寸可辨)
|
|
||||||
- 位图:`logo.png`(512)、`logo-dark.png`(512)、`favicon.png`(180)、`apple-touch-icon.png`(180)、`favicon-32.png`(32)
|
|
||||||
|
|
||||||
## 为什么是它
|
|
||||||
|
|
||||||
1. **一条铁律**:Logo 不带文字。原版 Gitea 的「茶壶 + Gitea」字样直接砍掉。
|
|
||||||
2. **配色收窄**:全图只有蓝与白,圆外 100% 透明(Alpha=0),落在 `#FFFFFF`、`#0D1117`、`#161B22` 任意顶栏上都不出现白边方框。
|
|
||||||
3. **符号来源**:把「Git 分支拓扑」折进字母 Q —— 环上 3 颗 Commit 空心节点,环内 1 颗节点跨过主环向右下抽出,形成 Q 的钩与末端节点。
|
|
||||||
4. **日夜同一符号**:夜间版只抬蓝色明度、换暗底,不重画、不改比例,切换时不会「换了个标志」。
|
|
||||||
|
|
||||||
## 被否掉的
|
|
||||||
|
|
||||||
| 方案 | 否掉原因 |
|
|
||||||
|---|---|
|
|
||||||
| 方案 1(`dsh-image-gen/image-84c926da.png`)双环淡蓝扁平版 | 环太细,32px favicon 下糊成一团 |
|
|
||||||
| 方案 3(`dsh-image-gen/image-ec3c55b2.png`)磨砂亚克力微立体 | 有高光与阴影,和「纯扁平 ins 风」不搭 |
|
|
||||||
| 方案 2-B(`dsh-image-gen/image-b9901cb4.png`)暗夜蓝灰圆章 + 冰蓝环 | 深色下好看,但浅色顶栏上圆章太深,日夜观感不统一 |
|
|
||||||
|
|
||||||
## 几何参数(矢量版)
|
|
||||||
|
|
||||||
viewBox `0 0 128 128`:
|
|
||||||
|
|
||||||
- 圆章 `<circle r="60">`,无外部背景 rect(所以圆外透明)
|
|
||||||
- 主环 `<circle r="30" stroke-width="6" stroke-linecap="round">`
|
|
||||||
- 5 颗空心节点 `r=9` + 洞 `r=3.6`,圆心 `(64,34) (34,64) (64,94) (76,72) (97,90)`
|
|
||||||
- 尾巴 `d="M 76 72 C 88 70, 97 77, 97 90"`
|
|
||||||
|
|
||||||
favicon 用 32 栅格独立重绘:圆章 `r=15`、环 `r=7.5`、节点 `r=2.25`、洞 `r=0.9`、尾 `M 19 18 C 22 17.5, 24.25 19.25, 24.25 22.5`。
|
|
||||||
|
Before Width: | Height: | Size: 357 KiB |
|
Before Width: | Height: | Size: 353 KiB |
|
|
@ -1,50 +0,0 @@
|
||||||
# 部署说明(阶段 6,需 QQ 批准后才做)
|
|
||||||
|
|
||||||
本文件只是操作手册,`scripts/deploy.sh` 默认是**预演**,不加 `--yes` 绝不会动线上。
|
|
||||||
|
|
||||||
## 一、前提
|
|
||||||
|
|
||||||
1. 已在本地/镜像里打开 `preview/index.html`,日夜两种模式都看过,认可配色与留白。
|
|
||||||
2. 仓库已按实际版本打候选标签 `vX.Y.Z-rcN`(`git tag -l` 可查)。
|
|
||||||
3. QQ 明确说过「可以部署」。
|
|
||||||
|
|
||||||
## 二、预演(随时可做,零风险)
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cd ~/projects/Gitea-font
|
|
||||||
./scripts/deploy.sh
|
|
||||||
```
|
|
||||||
|
|
||||||
它会列出将被复制的文件清单、备份路径与后续动作,然后退出,线上不变。
|
|
||||||
|
|
||||||
## 三、真部署
|
|
||||||
|
|
||||||
```bash
|
|
||||||
./scripts/deploy.sh --yes # 复制 custom/ + 重启
|
|
||||||
./scripts/deploy.sh --yes --patch-ini # 另外把 app.ini 的 [ui] 主题切成 qq 系列
|
|
||||||
```
|
|
||||||
|
|
||||||
`--patch-ini` 做的事:把 `DEFAULT_THEME` 改为 `qq-auto`,并在 `THEMES` 后追加
|
|
||||||
`qq-auto,qq-light,qq-dark`(原有主题全部保留,可随时在用户设置里切回)。
|
|
||||||
原 `app.ini` 会备份成 `/etc/gitea/app.ini.bak-<时间戳>`。
|
|
||||||
|
|
||||||
## 四、回滚
|
|
||||||
|
|
||||||
部署脚本会完整备份 `custom/`(包含三套 `theme-qq*.css`)和 `app.ini`,并在重启或 HTTP 健康检查失败时自动回滚。人工回滚统一使用:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
./scripts/rollback.sh --list
|
|
||||||
./scripts/rollback.sh /var/backups/gitea-custom-<时间戳>.tar.gz
|
|
||||||
```
|
|
||||||
|
|
||||||
`rollback.sh` 会先校验归档、再备份当前状态、停止服务,并通过 `rsync --delete` 精确恢复。旧版本部署脚本生成的备份缺少 QQ 主题,默认拒绝;只有确认承担主题缺失风险时才可附加 `--allow-incomplete`。
|
|
||||||
|
|
||||||
## 五、部署后自查清单
|
|
||||||
|
|
||||||
- [ ] `https://git.qyhhh.top/` 首页 logo 变成蓝白 Git-Q,圆外无白框
|
|
||||||
- [ ] 浏览器标签页 favicon 是新的小圆章
|
|
||||||
- [ ] 顶栏、按钮、链接全部蓝白,无绿色残留
|
|
||||||
- [ ] 代码块字体为 JetBrains Mono
|
|
||||||
- [ ] 系统浅色/深色切换时,主题自动跟随(`qq-auto`)
|
|
||||||
- [ ] 用户设置里仍能选回 `github-auto` 等旧主题(说明没破坏原有主题)
|
|
||||||
- [ ] 无 500 错误、无模板解析报错(`journalctl -u gitea -n 50 --no-pager`)
|
|
||||||
|
|
@ -1,140 +0,0 @@
|
||||||
# 规划 · 未登录首页 v1.4(方案 A 首屏 + 热门公开仓库)
|
|
||||||
|
|
||||||
> 状态:**仅规划,未动任何代码**(2026-11-05)
|
|
||||||
> 目标实例:`https://git.qyhhh.top`(Gitea 1.21.11)
|
|
||||||
> 铁律不变:只走 `custom/` 覆盖、先 `preview/` 后线上、蓝白配色、**禁止绿色**、大量留白。
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 1. 已确认的决策
|
|
||||||
|
|
||||||
| # | 问题 | 决定 |
|
|
||||||
| --- | --- | --- |
|
|
||||||
| 1 | 热门仓库放几个 | **单行 3 个**(宽屏 3 列 × 1 行) |
|
|
||||||
| 2 | 排序 | **星标优先**(同星数再按最近更新) |
|
|
||||||
| 3 | Fork / 镜像仓库 | **排除** |
|
|
||||||
| 4 | 数字条 | **待定**,默认建议:删除(见 §6) |
|
|
||||||
| 5 | 终端 `git clone` 示例 | **占位地址** `https://git.qyhhh.top/qq/repo.git` |
|
|
||||||
|
|
||||||
参考效果图:`dsh-image-gen/image-5f71a3ab.png`(方案 A)、`dsh-image-gen/image-c8208180.png`(方案 B 的仓库区)。
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 2. 页面结构(自上而下)
|
|
||||||
|
|
||||||
| 区块 | 内容 | 备注 |
|
|
||||||
| --- | --- | --- |
|
|
||||||
| 顶栏 | Gitea 原生顶栏 | 不动,沿用 `qq-ui.css` 毛玻璃 |
|
|
||||||
| ① 首屏 Hero(左右分栏) | **左 7/12**:渐变大标题 `{{AppName}}`、口号「自己的代码,自己的地方。」、搜索框(提交到 `/explore/repos`)、主按钮「免费注册」/ 次按钮「登录」/ 文字链「浏览全部仓库 →」<br>**右 5/12**:毛玻璃卡片,内含 SVG 提交分支图(蓝色节点 + 分叉线),右下叠终端小窗 `$ git clone https://git.qyhhh.top/qq/repo.git` + 复制按钮 | 方案 A |
|
|
||||||
| ② 热门公开仓库 | 标题「热门公开仓库」+ 右侧「查看全部 →」(`/explore/repos?sort=moststars`);**3 张卡片单行** | 方案 B 的仓库区 |
|
|
||||||
| ③ 功能卡 | 沿用现有三卡(版本控制 / 议题与看板 / 数据自持),视觉降一级作为收尾 | 文案不变 |
|
|
||||||
| ④ 数字条 | 待定(§6) | — |
|
|
||||||
| 页脚 | 左站点信息 / 中语言切换 / 右 ICP 备案号 | 不动 |
|
|
||||||
|
|
||||||
整体限宽 **1280px 居中**,与登录后控制台一致。
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 3. 仓库卡片规格
|
|
||||||
|
|
||||||
```
|
|
||||||
┌────────────────────────────────────┐
|
|
||||||
│ (头像20px) owner/仓库名 │
|
|
||||||
│ 描述文字,最多两行,超出省略…… │
|
|
||||||
│ ● 语言 ★ 12 ⑂ 3 3 天前更新 │
|
|
||||||
└────────────────────────────────────┘
|
|
||||||
```
|
|
||||||
|
|
||||||
- 语言圆点:**只用品牌蓝色阶**(`#1D4ED8` / `#3B82F6` / `#60A5FA` / `#93C5FD` 按语言名哈希取色),不用 Gitea 原生语言色(含绿色)。
|
|
||||||
- hover:上浮 2px,描边变主色 `#3B82F6`(深色 `#38BDF8`)。
|
|
||||||
- 深色模式:卡片底 `#161B22`,沿用 `qq-dark` 变量。
|
|
||||||
- 圆角 8px,字体 JetBrains Mono(数字/仓库名)。
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 4. 数据来源(关键技术点)
|
|
||||||
|
|
||||||
Gitea 1.21 的首页 handler **不给模板传仓库列表**,因此改为前端调用官方公开 API:
|
|
||||||
|
|
||||||
```
|
|
||||||
GET /api/v1/repos/search?sort=stars&order=desc&limit=10&mode=source
|
|
||||||
```
|
|
||||||
|
|
||||||
- 匿名调用只返回公开仓库,不会泄露私有仓库。
|
|
||||||
- 取多一些(10 个)在前端二次过滤:去掉 `fork === true`、`mirror === true`、`private === true`、`archived === true`(归档是否排除可再议),按 `stars_count` 降序、同星按 `updated_at` 降序,截取前 **3** 个。
|
|
||||||
- 使用字段:`full_name`、`html_url`、`description`、`language`、`stars_count`、`forks_count`、`updated_at`、`owner.avatar_url`。
|
|
||||||
- 状态处理:
|
|
||||||
- 加载中:3 张骨架卡占位(无闪烁时遵守 `prefers-reduced-motion`);
|
|
||||||
- 结果为 0:整块隐藏,只留首屏「浏览全部仓库 →」;
|
|
||||||
- 接口失败 / 超时(5s):静默隐藏,不报错。
|
|
||||||
- **前置条件**:需实测匿名能访问该接口(`REQUIRE_SIGNIN_VIEW=false` 且 API 未禁用)。若不可用,退路是只放「查看全部仓库」入口,不做卡片。
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 5. 涉及文件
|
|
||||||
|
|
||||||
| 文件 | 改动 |
|
|
||||||
| --- | --- |
|
|
||||||
| `custom/templates/home.tmpl` | 重写 Hero 为左右分栏;新增仓库区空容器 `#qq-hot-repos` + 3 张骨架卡;`<script defer src="{{AssetUrlPrefix}}/js/qq-home.js?v=…">` 仅在首页引入 |
|
|
||||||
| `custom/public/assets/css/qq-pages.css` | 新增 `.qq-lp-split` / `.qq-lp-graph` / `.qq-lp-term` / `.qq-repo-card` / `.qq-skeleton` 等样式,沿用 `.qq-lp-*` 前缀 |
|
|
||||||
| `custom/public/assets/js/qq-home.js`(新增) | 拉 API → 过滤排序 → 渲染卡片;复制 clone 命令(`navigator.clipboard`,失败回退 `execCommand`);相对时间格式化 |
|
|
||||||
| `custom/public/assets/js/qq-fx.js` | 光斑 / 打字机挂载点随新 Hero 结构调整(选择器更新) |
|
|
||||||
| `custom/public/assets/css/qq-fx.css` | 如有 Hero 相关选择器同步调整 |
|
|
||||||
| `preview/index.html`(+ `preview/app.js`) | 落地页段换成新版式,仓库区用**本地假数据**,不打线上 |
|
|
||||||
| `docs/TODO.md` | 新增「阶段 8 · 首页 v1.4」条目与部署记录 |
|
|
||||||
|
|
||||||
不新增模板钩子以外的任何覆盖,不改 `app.ini`。
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 6. 关于「数字条」(待确认)
|
|
||||||
|
|
||||||
数字条指当前首页最底部那一排四格:
|
|
||||||
|
|
||||||
| 1.21.11 | MIT | MySQL | 1 台 |
|
|
||||||
| --- | --- | --- | --- |
|
|
||||||
| Gitea 版本 | 开源协议 | 独立数据库存储 | 服务器即可跑 |
|
|
||||||
|
|
||||||
对访客价值不高,且新版已有仓库区和功能卡,页面会偏长。三个选项:
|
|
||||||
|
|
||||||
- **A. 删除(默认建议)**
|
|
||||||
- B. 缩成首屏标题下一行小字:`Gitea 1.21.11 · MIT · 自托管`
|
|
||||||
- C. 保持原样放在功能卡下面
|
|
||||||
|
|
||||||
未回复则按 **A** 执行。
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 7. 响应式与无障碍
|
|
||||||
|
|
||||||
| 断点 | 行为 |
|
|
||||||
| --- | --- |
|
|
||||||
| > 1024px | Hero 左右分栏;仓库 3 列 |
|
|
||||||
| 641–1024px | Hero 上下堆叠(分支图卡片在文字下方);仓库 3 列压缩 → 不足时 2 列 + 第三张换行 |
|
|
||||||
| ≤ 640px | 仓库 1 列;终端小窗缩为单行可横向滚动;分支图隐藏 |
|
|
||||||
|
|
||||||
- `prefers-reduced-motion`:分支图静止、骨架不闪、关闭光斑。
|
|
||||||
- 仓库卡片整卡为 `<a>`,有可见焦点环;复制按钮有 `aria-label` 和「已复制」反馈。
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 8. 执行步骤(待批准后进行)
|
|
||||||
|
|
||||||
1. **接口验证**:匿名 `curl https://git.qyhhh.top/api/v1/repos/search?sort=stars&order=desc&limit=10&mode=source`,确认可用并记录当前公开仓库数量。
|
|
||||||
2. **离线预览**:在 `preview/` 做出新版,截图 日间 / 夜间 / 375px 移动端 交 QQ 确认。
|
|
||||||
3. **接入模板**:改 `home.tmpl` / `qq-pages.css` / 新增 `qq-home.js`;跑 `scripts/audit_colors.py` 确认无绿色;提交并打 `v1.4-rc1`。
|
|
||||||
4. **部署**:`./scripts/deploy.sh` 预演 → QQ 批准 → `./scripts/deploy.sh --yes`(自动备份到 `/var/backups/`)→ 线上实拍复核 → 打 `v1.4-live`。
|
|
||||||
5. **回滚预案**:`./scripts/rollback.sh /var/backups/gitea-custom-<时间戳>.tar.gz`。
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 9. 验收清单
|
|
||||||
|
|
||||||
- [ ] 未登录访问首页:首屏左右分栏,分支图 + 终端正常显示
|
|
||||||
- [ ] 复制按钮可复制 `git clone https://git.qyhhh.top/qq/repo.git`
|
|
||||||
- [ ] 热门仓库显示 ≤3 个,按星标降序,无 fork / 镜像 / 私有仓库
|
|
||||||
- [ ] 无公开仓库或接口失败时整块隐藏,页面无报错
|
|
||||||
- [ ] 日间 / 夜间 / 跟随系统 三主题无绿色、无白边
|
|
||||||
- [ ] 375px 移动端无横向溢出
|
|
||||||
- [ ] 登录后首页仍为控制台,不受影响
|
|
||||||
- [ ] 页脚 ICP 备案号与语言切换正常
|
|
||||||
126
docs/TODO.md
|
|
@ -1,126 +0,0 @@
|
||||||
# TODO · QQGit 蓝白 ins 风外观定制
|
|
||||||
|
|
||||||
> 仓库里唯一持久化的进度清单。`[x]` 完成 `[~]` 进行中 `[ ]` 未开始 `[!]` 等待批准
|
|
||||||
|
|
||||||
## 当前状态(2026-11-05)
|
|
||||||
|
|
||||||
| 项目 | 值 |
|
|
||||||
| --- | --- |
|
|
||||||
| 线上地址 | <https://git.qyhhh.top> |
|
|
||||||
| Gitea 版本 | 1.21.11(生产数据库:MySQL) |
|
|
||||||
| 生效主题 | `DEFAULT_THEME = qq-auto`(浅色 `qq-light` / 深色 `qq-dark` / 跟随系统 `qq-auto`) |
|
|
||||||
| 当前标签 | `v1.4.1-live`(字标 Inter + 明亮模式去粒子/去毛玻璃) |
|
|
||||||
| 上一版 | `v1.4-live`(方案 A+B 落地页) |
|
|
||||||
| 源码仓库 | <https://github.com/newbieQQ/QQGit>(private) |
|
|
||||||
| 回滚方式 | `./scripts/rollback.sh /var/backups/gitea-custom-<时间戳>.tar.gz` |
|
|
||||||
|
|
||||||
## 阶段 1 · Git 基线与素材归档 — 完成
|
|
||||||
|
|
||||||
- [x] 1.1 `git init -b main`,`user.name=QQ`、`user.email=qq@qyhhh.top`
|
|
||||||
- [x] 1.2 快照线上 `/var/lib/gitea/custom` → `baseline/custom/`
|
|
||||||
- [x] 1.3 快照 `/etc/gitea/app.ini` 的 `[ui]` 段 → `baseline/app-ini/ui-section.txt`(含 SMTP 密码的整份 `app.ini` 已被 `.gitignore` 排除)
|
|
||||||
- [x] 1.4 `gitea embedded view` 导出官方 1.21.11 模板 23 个 → `upstream-templates-1.21.11/`
|
|
||||||
- [x] 1.5 导出官方 `index.css` / `theme-auto.css` 作为变量派生源 → `vendor/`
|
|
||||||
- [x] 1.6 提交并打标签 `v0.0-baseline`(commit `62b45b2`)
|
|
||||||
|
|
||||||
## 阶段 2 · Logo 套件 — 完成
|
|
||||||
|
|
||||||
- [x] 2.1 决策锁定 **方案 2-A**:日间 `#60A5FA` 圆章 + 纯白负空间 Git-Q;夜间仅把圆章提到 `#38BDF8`
|
|
||||||
- [x] 2.2 原图归档 `design-assets/`:`logo-2a-light-raw.png`(日间)、`logo-2a-dark-raw.png`(夜间)
|
|
||||||
- [x] 2.3 矢量 SVG:`logo.svg`(内嵌 `@media (prefers-color-scheme:dark)` 自动换色)、`logo-light.svg`、`logo-dark.svg`、`favicon.svg`
|
|
||||||
- [x] 2.4 位图导出:`logo.png`(512)、`logo-dark.png`(512)、`favicon.png`(180)、`apple-touch-icon.png`(180)、`favicon-32.png`(32)
|
|
||||||
- [x] 2.5 三底色目视确认(`#FFFFFF` / `#0D1117` / `#161B22`):圆外 100% 透明,无白框
|
|
||||||
|
|
||||||
## 阶段 3 · 三套主题 CSS — 完成
|
|
||||||
|
|
||||||
- [x] 3.1 `scripts/build_theme.py`:解析官方 `:root` → 叠加台面/主色 → 派生 primary 明暗族与 alpha 族
|
|
||||||
- [x] 3.2 `degreen()`:色相 60–170°(绿/黄绿)统一转 188° 青蓝,保留明度与饱和度
|
|
||||||
- [x] 3.3 修正则坑:`url("data:image/svg+xml;...")` 值被截断 → 改用支持引号的表达式并跳过 degreen
|
|
||||||
- [x] 3.4 产出 `theme-qq-auto.css` / `theme-qq-light.css` / `theme-qq-dark.css`(各 243 变量)
|
|
||||||
- [x] 3.5 `scripts/audit_colors.py` 审计:三套主题**无绿色残留**,全部通过
|
|
||||||
|
|
||||||
## 阶段 4 · 模板钩子与细节层 — 完成
|
|
||||||
|
|
||||||
- [x] 4.1 本地内置 `JetBrains Mono` woff2(400/500/700),不走 CDN
|
|
||||||
- [x] 4.2 `custom/public/assets/css/qq-ui.css`:字体、8px 圆角、顶栏毛玻璃、滚动条、卡片、页脚
|
|
||||||
- [x] 4.3 `custom/templates/custom/header.tmpl`:preload 字体 + 引入 `qq-ui.css` + `theme-color` meta + 带版本号的 favicon 链接
|
|
||||||
- [x] 4.4 `custom/templates/custom/footer.tmpl`:默认留空(页脚改由 `base/footer_content.tmpl` 覆盖承载)
|
|
||||||
- [x] 4.5 `custom/templates/home.tmpl`:基于官方精简,logo + 三卡首页(沿用官方 i18n key)
|
|
||||||
|
|
||||||
## 阶段 5 · 离线预览与候选版 — 完成
|
|
||||||
|
|
||||||
- [x] 5.1 `preview/index.html`:首页 / 仓库列表 / 文件页+代码块 / 组件 / Logo 双底色校验 5 段
|
|
||||||
- [x] 5.2 右上角胶囊切换 浅色 / 自动 / 深色(切 `<link disabled>`,localStorage 记忆)
|
|
||||||
- [x] 5.3 `scripts/check_preview.py`:变量、类名、日夜媒体查询全绿;24 个资源引用零缺失
|
|
||||||
- [x] 5.4 提交并打标签 `v1.0-rc1`
|
|
||||||
- [x] 5.5 QQ 在预览页验收通过(2026-11-03),直接进入阶段 6
|
|
||||||
|
|
||||||
## 阶段 6 · 部署上线 — 完成
|
|
||||||
|
|
||||||
- [x] 6.1 `scripts/deploy.sh`:默认**预演**,列出将复制的文件与备份路径,零改动
|
|
||||||
- [x] 6.2 `--yes` 真部署:`tar` 备份 → 拷贝 `custom/` → `chown -R git:git` → `systemctl restart gitea`
|
|
||||||
- [x] 6.3 `--patch-ini`:备份 `app.ini` 后把 `[ui]` 改为 `DEFAULT_THEME=qq-auto` 并追加 `qq-auto,qq-light,qq-dark`
|
|
||||||
- [x] 6.4 `scripts/rollback.sh` + `docs/DEPLOY.md`(含部署后 7 项自查清单)
|
|
||||||
- [x] 6.5 已获 QQ 明确批准并执行 `./scripts/deploy.sh --yes --patch-ini`(2026-11-03 09:37)
|
|
||||||
- [x] 6.6 部署后验收通过,已打标签 `v1.0-live`
|
|
||||||
- [x] 6.7 部署后修补:语言圆点统一品牌蓝(压掉 Shell 亮绿)、页脚去重(不再出现两行 Powered by Gitea)、主题选择器显示名改为 `QQGit · 浅色/深色/跟随系统`
|
|
||||||
- [x] 6.8 覆盖 `custom/templates/base/footer_content.tmpl`:删掉官方整条页脚(Powered by Gitea / 版本 / 耗时 / 语言 / 许可证 / API),改为悬挂式页脚显示 **闽ICP备2023002932号**(`position:fixed` 贴底 + `body{padding-bottom:42px}`)
|
|
||||||
|
|
||||||
## 阶段 7 · 动效层(首页 + 登录页)— 完成,已上线
|
|
||||||
|
|
||||||
- [x] 7.1 `custom/public/assets/js/qq-fx.js`:仅 home / signin 生效,Canvas 粒子星座(DPR≤2、按面积定点、近邻连线)、口号打字机、hero 鼠标光斑;`prefers-reduced-motion` 只画一帧静态星图
|
|
||||||
- [x] 7.2 `custom/public/assets/css/qq-fx.css`:光雾漂移、conic 渐变旋转光环、渐变流动标题、毛玻璃卡片;登录页卡片化(**不覆盖模板**,纯 CSS 作用域 `.page-content.user.signin`)
|
|
||||||
- [x] 7.3 页脚补语言切换:`{{if not .SignedUser}}` + `/?lang=zh-CN|en-US` **纯链接**(刻意不用 `.ui.dropdown`,那个依赖 index.js 初始化)
|
|
||||||
- [x] 7.4 修复官方样式干扰:`.page-footer` 窄屏被改成 `column` + `space-between` → 用 `!important` 钉死 `row/nowrap/center`;`.inline.field` 窄容器退化成堆叠 → 显式 `flex row` + label 96px + input `flex:1`,登录容器 430px → 560px
|
|
||||||
- [x] 7.5 修 headless 截图假故障:`html, body` 的 `transition` 会冻在过渡起始值,导致深色预览发白;删过渡 + `prefers-reduced-motion` 全关动画
|
|
||||||
- [x] 7.6 提交 `dd19bbb`(tag `v1.1-rc1`)→ 部署 → 实拍复核 → 修布局 `25d8895`(tag `v1.1-live`)
|
|
||||||
- [x] 7.7 移动端 375px 适配:光斑横向溢出裁剪、光环与标题字号压缩
|
|
||||||
|
|
||||||
## 阶段 8 · 落地页 v1.4(方案 A + B)— 完成,已上线
|
|
||||||
|
|
||||||
- [x] 8.1 按 `docs/PLAN-landing-v1.4.md` 重写 `custom/templates/home.tmpl`:首屏左 7 / 右 5 分栏(标题 / 口号 / 搜索 / 双按钮 + 毛玻璃分支图 + terminal 复制窗)
|
|
||||||
- [x] 8.2 新增 `custom/public/assets/js/qq-home.js`:公开 API 取数(`sort=updated`,客户端按星标→更新时间排序,排除 fork/镜像/私有/归档),骨架屏 → 3 张卡片;失败或 0 条静默隐藏
|
|
||||||
- [x] 8.3 `qq-pages.css` 重写落地页段(1280px 限宽、蓝白色阶、语言圆点仅品牌蓝、hover / 焦点环、暗色变量、1024 / 640 断点、reduced-motion);Dashboard 段原样保留
|
|
||||||
- [x] 8.4 删除数字条(方案 A);三张功能卡降级为分隔线下方收尾
|
|
||||||
- [x] 8.5 离线预览更新:`preview/index.html` 首页段 + 假数据 6 条、`?only=home&bare=1` 截图模式、`preview/mobile-frame.html` 供 375px 复核(headless Chrome 窗口宽度下限 500px)
|
|
||||||
- [x] 8.6 截图 1440 / 834 / 375 的浅色与深色;`audit_colors.py`、`check_preview.py` 全绿
|
|
||||||
- [x] 8.7 提交并打标签 `v1.4-rc1`(`bbce78a`)→ `deploy.sh` 预演 → QQ 批准 → `--yes` 上线 → 浅色/深色实拍复核 → 打标签 `v1.4-live`
|
|
||||||
|
|
||||||
## 部署记录
|
|
||||||
|
|
||||||
| 时间 | 动作 | 备份 |
|
|
||||||
| --- | --- | --- |
|
|
||||||
| 2026-11-05 15:46 | **v1.4.2** 仓库卡 hover 下划线修复(Gitea 基础 `a:hover` 覆盖) | `gitea-custom-20261105-154643.tar.gz` |
|
|
||||||
| 2026-11-05 15:36 | **v1.4.1 字标与明净度**上线:QQGit 字标改 Inter 800,落地页去背景粒子、hero 光斑、分支卡毛玻璃,仓库卡改不透明白底 | `gitea-custom-20261105-153634.tar.gz` |
|
|
||||||
| 2026-11-05 11:03 | **v1.4 落地页**上线(方案 A+B:首屏分栏 + terminal 复制窗 + 热门仓库三卡,删数字条) | `gitea-custom-20261105-110309.tar.gz` |
|
|
||||||
| 2026-11-03 09:37 | 首次上线:`deploy.sh --yes --patch-ini`(custom/ 全量 + `[ui]` 切 `qq-auto`) | `gitea-custom-20261103-093751.tar.gz` |
|
|
||||||
| 2026-11-03 09:39 | 语言圆点统一品牌蓝 + 页脚去重 | `gitea-custom-20261103-093913.tar.gz` |
|
|
||||||
| 2026-11-03 09:40 | 主题选择器显示名(`QQGit · 浅色/深色/跟随系统`) | `gitea-custom-20261103-094007.tar.gz` |
|
|
||||||
| 2026-11-03 09:59 | favicon 链接加 `?v=2` 绕过浏览器缓存 | `gitea-custom-20261103-095919.tar.gz` |
|
|
||||||
| 2026-11-03 10:04 | 页脚改造:删官方整条页脚,悬挂 ICP 备案号 | `gitea-custom-20261103-100439.tar.gz` |
|
|
||||||
| 2026-11-03 10:21 | **v1.1 动效层**首次上线(`qq-fx.css` / `qq-fx.js`)+ 页脚语言切换 | `gitea-custom-20261103-102149.tar.gz` |
|
|
||||||
| 2026-11-03 10:29 | 页脚居中修正 + 登录容器加宽 | `gitea-custom-20261103-102905.tar.gz` |
|
|
||||||
| 2026-11-03 14:28 | 页脚三段重排:左站点信息 / 中语言切换 / 右备案号(并补回被误删的语言切换) | `gitea-custom-20261103-142818.tar.gz` |
|
|
||||||
| 2026-11-03 11:05 | 控制台改为 GitHub 式限宽 1280 居中(非硬拉满屏) | `gitea-custom-20261103-110520.tar.gz` |
|
|
||||||
| 2026-11-03 11:14 | 右栏去重:删「我的组织」卡与新建仓库/组织入口,改「快捷入口」;热力图压平内层框 | `gitea-custom-20261103-111314.tar.gz` / `-111442.tar.gz` |
|
|
||||||
| 2026-11-03 11:02 | 控制台铺满整屏(去掉 1400px 限宽) | 见 `/var/backups/` 最新包 |
|
|
||||||
| 2026-11-03 11:00 | 右栏站点信息搬到底部条;右栏改「常用操作 + 我的组织」;清掉 summary 原生 ▶ | `gitea-custom-20261103-110017.tar.gz` |
|
|
||||||
| 2026-11-03 10:55 | 去掉 Logo 旋转光环 → 静态柔光;样式表加 `?v=3` | `gitea-custom-20261103-105538.tar.gz` |
|
|
||||||
| 2026-11-03 10:52 | 快捷导航折叠面板 + 三栏首行对齐(`--qq-row:34px`) | `gitea-custom-20261103-105231.tar.gz` |
|
|
||||||
| 2026-11-03 10:32 | 登录表单一行式布局(手工 `cp` 单文件,未经 `deploy.sh`) | 无(同上包内其余文件不变) |
|
|
||||||
| 2026-11-03 10:46 | **v1.2 GitHub 版式**:未登录落地页 + 登录后控制台(`qq-pages.css`、`home.tmpl`、`user/dashboard/dashboard.tmpl`) | `gitea-custom-20261103-104637.tar.gz` |
|
|
||||||
|
|
||||||
`app.ini` 每次改动前都另存 `/etc/gitea/app.ini.bak-<时间戳>`。
|
|
||||||
|
|
||||||
## 待办 / 可选增强
|
|
||||||
|
|
||||||
- [ ] 8.1 **公安联网备案号**:QQ 提供后并排加到 ICP 后面(`闽公网安备 …号`)
|
|
||||||
- [ ] 8.2 登录页语言切换目前只在**未登录**时出现;是否登录后也保留一个,待定
|
|
||||||
- [!] 8.3 favicon 在 QQ 的浏览器里仍需手动清缓存(无痕窗口可验证已生效;书签/主屏图标要删掉重加)
|
|
||||||
- [ ] 8.4 仓库页 / 设置页等内页是否也要微调(当前只动了首页与登录页)
|
|
||||||
- [ ] 8.5 线上移动端实拍复核(预览页的窄屏图只作参考,以 Gitea 自身响应式布局为准)
|
|
||||||
|
|
||||||
## 已知遗留(非本项目引入)
|
|
||||||
|
|
||||||
- [ ] 服务器 `dpkg --audit` 中 openresty / openresty-opm / openresty-resty 处于半配置状态
|
|
||||||
(装 `librsvg2-bin` 时 dpkg 顺带尝试配置 openresty 失败,端口 80 被 nginx 占用;已 `stop` + `reset-failed`,站点仍 200,**未去修复以免动生产**)
|
|
||||||
|
|
@ -1,55 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="zh-CN" class="theme-qq-light">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>左栏仓库搜索框探针</title>
|
|
||||||
<!-- 加载线上真实样式,复现 DashboardRepoList.vue 里搜索框的 DOM,用来验证 padding-left 是否够 -->
|
|
||||||
<link rel="stylesheet" href="https://git.qyhhh.top/assets/css/index.css">
|
|
||||||
<link rel="stylesheet" href="https://git.qyhhh.top/assets/css/theme-qq-light.css">
|
|
||||||
<link rel="stylesheet" href="../custom/public/assets/css/qq-ui.css">
|
|
||||||
<link rel="stylesheet" href="../custom/public/assets/css/qq-pages.css">
|
|
||||||
<style>
|
|
||||||
body { padding: 24px; background: var(--color-body); }
|
|
||||||
.wrap { width: 248px; } /* 与控制台左栏同宽 */
|
|
||||||
.pad { padding: 12px; border: 1px dashed var(--color-secondary); margin-bottom: 24px; }
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div class="wrap page-content qq-dash">
|
|
||||||
<div class="qq-dash-shell" style="max-width:none;padding:0">
|
|
||||||
<div class="pad">
|
|
||||||
<p style="font-size:12px;margin:0 0 8px">当前线上样式</p>
|
|
||||||
<section class="qq-dash-card qq-dash-repos" style="margin:0">
|
|
||||||
<div id="dashboard-repo-list">
|
|
||||||
<div class="ui fluid action left icon input">
|
|
||||||
<input type="search" placeholder="查找仓库…">
|
|
||||||
<i class="icon"><svg width="16" height="16" viewBox="0 0 16 16"><path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path></svg></i>
|
|
||||||
<div class="ui dropdown icon button"><svg width="16" height="16" viewBox="0 0 16 16"><path d="M.75 3h14.5a.75.75 0 0 1 0 1.5H.75a.75.75 0 0 1 0-1.5ZM3 7.75A.75.75 0 0 1 3.75 7h10.5a.75.75 0 0 1 0 1.5H3.75A.75.75 0 0 1 3 7.75Zm3 4a.75.75 0 0 1 .75-.75h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1-.75-.75Z"></path></svg></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<pre id="out" style="margin-top:24px;font-size:12px"></pre>
|
|
||||||
<script>
|
|
||||||
// 量一下输入框的左内边距、图标位置,看文字会不会压在图标上
|
|
||||||
window.addEventListener('load', () => {
|
|
||||||
const input = document.querySelector('#dashboard-repo-list input[type="search"]');
|
|
||||||
const icon = document.querySelector('#dashboard-repo-list .ui.input > .icon');
|
|
||||||
const cs = getComputedStyle(input);
|
|
||||||
const ir = input.getBoundingClientRect();
|
|
||||||
const gr = icon.getBoundingClientRect();
|
|
||||||
document.getElementById('out').textContent = [
|
|
||||||
`input padding-left = ${cs.paddingLeft}`,
|
|
||||||
`input height = ${cs.height}`,
|
|
||||||
`input left = ${ir.left.toFixed(1)}`,
|
|
||||||
`icon left = ${gr.left.toFixed(1)} width = ${gr.width.toFixed(1)}`,
|
|
||||||
`图标右边缘 = ${(gr.left + gr.width).toFixed(1)} → 文字起点应 ≥ 该值 + 6`,
|
|
||||||
`文字起点 = ${(ir.left + parseFloat(cs.paddingLeft)).toFixed(1)}`,
|
|
||||||
].join('\n');
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
@ -1,67 +0,0 @@
|
||||||
/* 预览页的主题切换:只切换三份主题 CSS 的启用状态,不改任何标记 */
|
|
||||||
(function () {
|
|
||||||
const links = {
|
|
||||||
auto: document.getElementById('css-auto'),
|
|
||||||
light: document.getElementById('css-light'),
|
|
||||||
dark: document.getElementById('css-dark'),
|
|
||||||
};
|
|
||||||
const buttons = Array.from(document.querySelectorAll('.switcher button'));
|
|
||||||
|
|
||||||
function apply(mode) {
|
|
||||||
Object.keys(links).forEach((key) => {
|
|
||||||
if (links[key]) links[key].disabled = key !== mode;
|
|
||||||
});
|
|
||||||
document.documentElement.dataset.theme = mode;
|
|
||||||
buttons.forEach((b) => b.classList.toggle('on', b.dataset.mode === mode));
|
|
||||||
try { localStorage.setItem('qq-preview-theme', mode); } catch (e) { /* file:// 下可能不可用 */ }
|
|
||||||
}
|
|
||||||
|
|
||||||
buttons.forEach((b) => b.addEventListener('click', () => apply(b.dataset.mode)));
|
|
||||||
|
|
||||||
/* 支持 ?theme=light|dark|auto 直接进入某档,方便截图与分享 */
|
|
||||||
const forced = new URLSearchParams(location.search).get('theme');
|
|
||||||
if (forced && links[forced]) {
|
|
||||||
apply(forced);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let saved = null;
|
|
||||||
try { saved = localStorage.getItem('qq-preview-theme'); } catch (e) { /* ignore */ }
|
|
||||||
apply(saved && links[saved] ? saved : 'auto');
|
|
||||||
})();
|
|
||||||
|
|
||||||
|
|
||||||
/* ?only=login | ?only=home —— 只显示某一演示区(方便单独截图/对比) */
|
|
||||||
(function () {
|
|
||||||
var params = new URLSearchParams(location.search);
|
|
||||||
var only = params.get('only');
|
|
||||||
if (!only) return;
|
|
||||||
var id = { login: 'login-demo', home: 'landing-demo' }[only];
|
|
||||||
if (!id) return;
|
|
||||||
var page = document.querySelector('.page');
|
|
||||||
var keep = document.getElementById(id);
|
|
||||||
if (!page || !keep) return;
|
|
||||||
var label = keep.previousElementSibling;
|
|
||||||
Array.prototype.forEach.call(page.children, function (el) {
|
|
||||||
if (el === keep || el === label) return;
|
|
||||||
el.style.display = 'none';
|
|
||||||
});
|
|
||||||
if (only === 'home') {
|
|
||||||
/* 让离线预览也按线上 1280px 的容器宽度呈现 */
|
|
||||||
page.style.maxWidth = '1320px';
|
|
||||||
page.style.paddingTop = '0';
|
|
||||||
keep.style.border = '0';
|
|
||||||
keep.style.background = 'transparent';
|
|
||||||
keep.style.borderRadius = '0';
|
|
||||||
if (label) label.style.display = 'none';
|
|
||||||
if (params.get('bare') === '1') {
|
|
||||||
/* 截图用:预览器自己的导航会撑宽小屏,隐藏它才能看到真实 375px 版式 */
|
|
||||||
page.style.padding = '0';
|
|
||||||
page.style.maxWidth = 'none';
|
|
||||||
['#navbar', '.switcher'].forEach(function (sel) {
|
|
||||||
var el = document.querySelector(sel);
|
|
||||||
if (el) el.style.display = 'none';
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})();
|
|
||||||
|
|
@ -1,220 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="zh-CN" data-theme="auto">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
<title>QQGit · Dashboard 预览(照 GitHub 版式)</title>
|
|
||||||
<link id="css-auto" rel="stylesheet" href="../custom/public/assets/css/theme-qq-auto.css">
|
|
||||||
<link id="css-light" rel="stylesheet" href="../custom/public/assets/css/theme-qq-light.css" disabled>
|
|
||||||
<link id="css-dark" rel="stylesheet" href="../custom/public/assets/css/theme-qq-dark.css" disabled>
|
|
||||||
<link rel="stylesheet" href="../custom/public/assets/css/qq-ui.css">
|
|
||||||
<link rel="stylesheet" href="../custom/public/assets/css/qq-pages.css">
|
|
||||||
<link rel="stylesheet" href="preview.css">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<div class="switcher" role="group" aria-label="主题切换">
|
|
||||||
<button data-mode="light">浅色</button>
|
|
||||||
<button data-mode="auto" class="on">自动</button>
|
|
||||||
<button data-mode="dark">深色</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<nav id="navbar">
|
|
||||||
<a id="navbar-logo" href="#"><img src="../custom/public/assets/img/logo.svg" alt="logo"></a>
|
|
||||||
<a class="nav-item" href="#">仪表盘</a>
|
|
||||||
<a class="nav-item" href="#">探索</a>
|
|
||||||
<a class="nav-item" href="#">议题</a>
|
|
||||||
<a class="nav-item" href="#">合并请求</a>
|
|
||||||
<span class="nav-spacer"></span>
|
|
||||||
<input type="search" placeholder="搜索仓库…" style="max-width:180px;margin-right:10px">
|
|
||||||
<span class="avatar">Q</span>
|
|
||||||
</nav>
|
|
||||||
<div role="main" aria-label="仪表盘" class="page-content dashboard feeds qq-dash">
|
|
||||||
<div class="qq-dash-shell">
|
|
||||||
|
|
||||||
<h1 class="qq-dash-hello">newbie<span class="qq-dash-hi">,欢迎回来</span></h1>
|
|
||||||
|
|
||||||
<section class="qq-dash-card qq-dash-heat qq-dash-heat-top">
|
|
||||||
<div class="qq-heatmap-mock">
|
|
||||||
<div class="qq-heatmap-cells"></div>
|
|
||||||
<div class="qq-heatmap-legend"><span>少</span><i></i><i></i><i></i><i></i><i></i><span>多</span></div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<div class="qq-dash-grid">
|
|
||||||
<aside class="qq-dash-side">
|
|
||||||
<details class="qq-quicknav">
|
|
||||||
<summary>
|
|
||||||
<span class="qq-quicknav-t">快捷导航</span>
|
|
||||||
<svg class="qq-quicknav-chev" viewBox="0 0 16 16" width="14" height="14" fill="currentColor" aria-hidden="true"><path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"/></svg>
|
|
||||||
</summary>
|
|
||||||
<nav class="qq-dash-nav" aria-label="快捷导航">
|
|
||||||
<a class="item active" href="#">⌂ 首页</a>
|
|
||||||
<a class="item" href="#">◉ 动态</a>
|
|
||||||
<a class="item" href="#">⑂ 合并请求</a>
|
|
||||||
<a class="item" href="#">◎ 议题</a>
|
|
||||||
<a class="item" href="#">+ 新建仓库</a>
|
|
||||||
</nav>
|
|
||||||
</details>
|
|
||||||
|
|
||||||
<div class="qq-dash-repos">
|
|
||||||
<div class="qq-dash-side-head"><span>我的仓库</span><a href="#" title="新建仓库">+</a></div>
|
|
||||||
<div id="dashboard-repo-list">
|
|
||||||
<input type="search" placeholder="查找仓库…">
|
|
||||||
<div class="qq-repo-item">
|
|
||||||
<a href="#"><strong>qq/gitea-font</strong></a>
|
|
||||||
<span class="qq-repo-badge">私有</span>
|
|
||||||
</div>
|
|
||||||
<div class="qq-repo-item"><a href="#">qq/neovim-config</a></div>
|
|
||||||
<div class="qq-repo-item"><a href="#">qq/materials-notes</a></div>
|
|
||||||
<div class="qq-repo-item"><a href="#">newbie/deeplearning</a></div>
|
|
||||||
<div class="qq-repo-item"><a href="#">Mirrors/lazy.nvim</a></div>
|
|
||||||
<div class="qq-repo-item"><a href="#">Skills/QQzot-skill</a></div>
|
|
||||||
<div class="qq-repo-item"><a href="#">Skills/QQcite-skill</a></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</aside>
|
|
||||||
|
|
||||||
<main class="qq-dash-main">
|
|
||||||
|
|
||||||
|
|
||||||
<form class="qq-dash-search" onsubmit="return false">
|
|
||||||
<span>⌕</span>
|
|
||||||
<input type="search" placeholder="前往仓库…(输入关键字回车搜索)">
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<section class="qq-dash-card qq-dash-quick">
|
|
||||||
<div class="qq-panel-head">我参与的</div>
|
|
||||||
<div class="qq-quick-row">
|
|
||||||
<a class="qq-quick" href="#">
|
|
||||||
<span>⑂</span>
|
|
||||||
<span class="qq-quick-t">合并请求</span>
|
|
||||||
<span class="qq-quick-d">我发起或指派给我的</span>
|
|
||||||
</a>
|
|
||||||
<a class="qq-quick" href="#">
|
|
||||||
<span>◎</span>
|
|
||||||
<span class="qq-quick-t">议题</span>
|
|
||||||
<span class="qq-quick-d">待处理与跟踪中的</span>
|
|
||||||
</a>
|
|
||||||
<a class="qq-quick" href="#">
|
|
||||||
<span>◈</span>
|
|
||||||
<span class="qq-quick-t">里程碑</span>
|
|
||||||
<span class="qq-quick-d">按计划查看进度</span>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
|
|
||||||
<section class="qq-dash-card qq-dash-feed">
|
|
||||||
<div class="qq-panel-head">最近动态</div>
|
|
||||||
<div class="flex-list">
|
|
||||||
<div class="flex-item">
|
|
||||||
<div class="flex-item-leading"><span class="avatar">Q</span></div>
|
|
||||||
<div class="flex-item-main">
|
|
||||||
<span class="date">3 分钟前</span>
|
|
||||||
<div><a href="#">qq</a> 推送了 <a href="#">qq/gitea-font</a> 的 <code>main</code> 分支</div>
|
|
||||||
<div class="muted">feat(fx): 首页与登录页动效层</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="flex-item">
|
|
||||||
<div class="flex-item-leading"><span class="avatar">Q</span></div>
|
|
||||||
<div class="flex-item-main">
|
|
||||||
<span class="date">2 小时前</span>
|
|
||||||
<div>新建仓库 <a href="#">qq/materials-notes</a></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="flex-item">
|
|
||||||
<div class="flex-item-leading"><span class="avatar">Q</span></div>
|
|
||||||
<div class="flex-item-main">
|
|
||||||
<span class="date">昨天</span>
|
|
||||||
<div>在 <a href="#">qq/neovim-config</a> 创建了标签 <code>v3.1</code></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</main>
|
|
||||||
|
|
||||||
<aside class="qq-dash-aside">
|
|
||||||
<section class="qq-dash-card qq-dash-actions">
|
|
||||||
<div class="qq-panel-head">快捷入口</div>
|
|
||||||
<ul class="qq-action-list">
|
|
||||||
<li><a href="#">⇪<span>导入仓库</span></a></li>
|
|
||||||
<li><a href="#">◎<span>探索仓库</span></a></li>
|
|
||||||
<li><a href="#">⊙<span>我的议题</span></a></li>
|
|
||||||
<li><a href="#">⑂<span>我的合并请求</span></a></li>
|
|
||||||
</ul>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="qq-dash-card qq-dash-tip">
|
|
||||||
<div class="qq-panel-head">小提示</div>
|
|
||||||
<p>仓库列表在左栏可以直接搜索;点右上角头像可以切换主题(QQGit · 浅色 / 深色 / 跟随系统)。</p>
|
|
||||||
</section>
|
|
||||||
</aside>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<footer class="page-footer qq-icp-footer">
|
|
||||||
<span class="qq-icp-meta">QQGit · Gitea 1.21.11</span>
|
|
||||||
<a class="qq-icp" href="https://beian.miit.gov.cn/">闽ICP备2023002932号</a>
|
|
||||||
<nav class="qq-lang" aria-label="语言"><span class="qq-lang-cur">简体中文</span><a href="#">English</a></nav>
|
|
||||||
</footer>
|
|
||||||
|
|
||||||
<script src="app.js"></script>
|
|
||||||
<script>
|
|
||||||
// 预览专用:伪造一张 34×7 的贡献热力图(线上由 Gitea 的 heatmap 组件渲染)
|
|
||||||
(function () {
|
|
||||||
var box = document.querySelector('.qq-heatmap-cells');
|
|
||||||
if (!box) return;
|
|
||||||
var levels = ['0', '1', '2', '3', '4'];
|
|
||||||
for (var col = 0; col < 34; col++) {
|
|
||||||
for (var row = 0; row < 7; row++) {
|
|
||||||
var cell = document.createElement('i');
|
|
||||||
var r = Math.random();
|
|
||||||
var lv = r < 0.28 ? 0 : r < 0.55 ? 1 : r < 0.78 ? 2 : r < 0.93 ? 3 : 4;
|
|
||||||
if (lv > 0) {
|
|
||||||
cell.style.background = 'color-mix(in srgb, var(--color-primary) ' + (lv * 20 + 12) + '%, transparent)';
|
|
||||||
}
|
|
||||||
box.appendChild(cell);
|
|
||||||
void levels;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})();
|
|
||||||
|
|
||||||
// 预览专用:?open=1 时展开「快捷导航」面板,方便截图看展开态
|
|
||||||
(function () {
|
|
||||||
if (location.search.indexOf('open=1') < 0) return;
|
|
||||||
var box = document.querySelector('.qq-quicknav');
|
|
||||||
if (box) box.open = true;
|
|
||||||
})();
|
|
||||||
|
|
||||||
// 量尺:?probe=1 时把三栏首行的几何打出来,用于排查对齐
|
|
||||||
(function () {
|
|
||||||
if (location.search.indexOf('probe=1') < 0) return;
|
|
||||||
var sels = [
|
|
||||||
['左栏 快捷导航', '.qq-quicknav'],
|
|
||||||
['左栏 summary', '.qq-quicknav > summary'],
|
|
||||||
['中栏 搜索', '.qq-dash-search'],
|
|
||||||
['右栏 卡片', '.qq-dash-aside .qq-dash-card'],
|
|
||||||
['右栏 卡片头', '.qq-dash-aside .qq-panel-head'],
|
|
||||||
['中栏 第一卡', '.qq-dash-main .qq-dash-card'],
|
|
||||||
['中栏 第一卡头', '.qq-dash-main .qq-panel-head']
|
|
||||||
];
|
|
||||||
var out = [];
|
|
||||||
sels.forEach(function (pair) {
|
|
||||||
var el = document.querySelector(pair[1]);
|
|
||||||
if (!el) { out.push(pair[0] + ': (missing)'); return; }
|
|
||||||
var r = el.getBoundingClientRect();
|
|
||||||
var cs = getComputedStyle(el);
|
|
||||||
out.push(pair[0] + ': top=' + r.top.toFixed(1) + ' left=' + r.left.toFixed(1) +
|
|
||||||
' h=' + r.height.toFixed(1) + ' mt=' + cs.marginTop + ' mb=' + cs.marginBottom);
|
|
||||||
});
|
|
||||||
var pre = document.createElement('pre');
|
|
||||||
pre.id = 'probe';
|
|
||||||
pre.textContent = out.join('\n');
|
|
||||||
document.body.appendChild(pre);
|
|
||||||
})();
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
@ -1,326 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="zh-CN" data-theme="auto">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
<title>QQGit 外观预览 · 蓝白 ins 风</title>
|
|
||||||
|
|
||||||
<!-- 三套主题:同一份标记,切换 <link> 的 disabled 即可对比 -->
|
|
||||||
<link id="css-auto" rel="stylesheet" href="../custom/public/assets/css/theme-qq-auto.css">
|
|
||||||
<link id="css-light" rel="stylesheet" href="../custom/public/assets/css/theme-qq-light.css" disabled>
|
|
||||||
<link id="css-dark" rel="stylesheet" href="../custom/public/assets/css/theme-qq-dark.css" disabled>
|
|
||||||
<link rel="stylesheet" href="../custom/public/assets/css/qq-ui.css">
|
|
||||||
<link rel="stylesheet" href="../custom/public/assets/css/qq-fx.css">
|
|
||||||
<link rel="stylesheet" href="../custom/public/assets/css/qq-pages.css">
|
|
||||||
<link rel="stylesheet" href="preview.css">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<!-- ============ 切换器 ============ -->
|
|
||||||
<div class="switcher" role="group" aria-label="主题切换">
|
|
||||||
<button data-mode="light">浅色</button>
|
|
||||||
<button data-mode="auto" class="on">自动</button>
|
|
||||||
<button data-mode="dark">深色</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- ============ 顶栏(复刻 #navbar 结构) ============ -->
|
|
||||||
<nav id="navbar">
|
|
||||||
<a id="navbar-logo" href="#"><img src="../custom/public/assets/img/logo.svg" alt="logo"></a>
|
|
||||||
<a class="nav-item active" href="#">概览</a>
|
|
||||||
<a class="nav-item" href="#">探索</a>
|
|
||||||
<a class="nav-item" href="#">议题</a>
|
|
||||||
<a class="nav-item" href="#">合并请求</a>
|
|
||||||
<a class="nav-item" href="#">组织</a>
|
|
||||||
<span class="nav-spacer"></span>
|
|
||||||
<input type="search" placeholder="搜索仓库…" style="max-width:200px;margin-right:10px">
|
|
||||||
<span class="avatar">Q</span>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<div class="page">
|
|
||||||
|
|
||||||
<!-- ============ 1. 未登录首页 ============ -->
|
|
||||||
<div class="section-label">首页(未登录 · custom/templates/home.tmpl)</div>
|
|
||||||
<div class="segment" id="landing-demo" style="padding:0">
|
|
||||||
<div class="page-content home qq-landing">
|
|
||||||
<section class="qq-lp-hero">
|
|
||||||
<div class="qq-lp-hero-copy">
|
|
||||||
<p class="qq-lp-eyebrow">私有部署 · 轻量 · 全功能</p>
|
|
||||||
<h1 class="qq-lp-title">QQGit</h1>
|
|
||||||
<p class="qq-lp-sub" data-qq-type="自己的代码,自己的地方。">自己的代码,自己的地方。</p>
|
|
||||||
<form class="qq-lp-search" onsubmit="return false">
|
|
||||||
<input type="search" placeholder="搜索仓库、用户、组织…">
|
|
||||||
<button class="ui primary button" type="submit">搜索</button>
|
|
||||||
</form>
|
|
||||||
<div class="qq-lp-cta">
|
|
||||||
<a class="ui primary button" href="#">免费注册</a>
|
|
||||||
<a class="ui basic button" href="#">登录</a>
|
|
||||||
<a class="qq-lp-link" href="#">浏览全部仓库 →</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="qq-lp-visual">
|
|
||||||
<div class="qq-lp-graph" aria-hidden="true">
|
|
||||||
<svg class="qq-lp-graph-svg" viewBox="0 0 600 400" preserveAspectRatio="xMidYMid meet" focusable="false">
|
|
||||||
<defs>
|
|
||||||
<linearGradient id="qqg-line" x1="0" y1="1" x2="1" y2="0">
|
|
||||||
<stop offset="0%" stop-color="#1D4ED8"/>
|
|
||||||
<stop offset="55%" stop-color="#3B82F6"/>
|
|
||||||
<stop offset="100%" stop-color="#60A5FA"/>
|
|
||||||
</linearGradient>
|
|
||||||
</defs>
|
|
||||||
<g class="qqg-faint">
|
|
||||||
<path class="qqg-edge-faint" d="M46 300 C120 300 130 260 200 260 C280 260 300 300 370 300 C440 300 460 260 540 260"/>
|
|
||||||
<path class="qqg-edge-faint qqg-flow" d="M46 240 C120 240 120 150 200 150 C270 150 280 240 350 240 C420 240 430 150 510 150 C545 150 560 160 574 166"/>
|
|
||||||
<path class="qqg-link" d="M200 150 L200 260"/>
|
|
||||||
<path class="qqg-link" d="M350 240 L370 300"/>
|
|
||||||
<path class="qqg-link" d="M510 150 L540 260"/>
|
|
||||||
<circle class="qqg-node-soft" cx="46" cy="300" r="2.5"/>
|
|
||||||
<circle class="qqg-node-soft" cx="370" cy="300" r="2.5"/>
|
|
||||||
<circle class="qqg-node-soft" cx="540" cy="260" r="2.5"/>
|
|
||||||
</g>
|
|
||||||
<path class="qqg-edge" d="M46 240 C120 240 120 150 200 150 C270 150 280 240 350 240 C420 240 430 150 510 150 C545 150 560 160 574 166"/>
|
|
||||||
<path class="qqg-edge" d="M46 300 C120 300 130 260 200 260 C280 260 300 300 370 300 C440 300 460 260 540 260"/>
|
|
||||||
<path class="qqg-edge" d="M200 150 C235 150 240 205 275 205 C310 205 315 240 350 240"/>
|
|
||||||
<g class="qqg-nodes">
|
|
||||||
<circle class="qqg-node" cx="46" cy="240" r="5"/>
|
|
||||||
<circle class="qqg-node-core" cx="200" cy="150" r="6"/>
|
|
||||||
<circle class="qqg-node-core" cx="350" cy="240" r="6"/>
|
|
||||||
<circle class="qqg-node" cx="510" cy="150" r="5"/>
|
|
||||||
<circle class="qqg-node" cx="574" cy="166" r="4"/>
|
|
||||||
<circle class="qqg-node" cx="46" cy="300" r="5"/>
|
|
||||||
<circle class="qqg-node" cx="200" cy="260" r="4"/>
|
|
||||||
<circle class="qqg-node-core" cx="370" cy="300" r="6"/>
|
|
||||||
<circle class="qqg-node" cx="540" cy="260" r="4"/>
|
|
||||||
<circle class="qqg-node" cx="275" cy="205" r="4"/>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="qq-lp-term">
|
|
||||||
<div class="qq-lp-term-bar" aria-hidden="true">
|
|
||||||
<span class="qq-lp-term-dots"><i></i><i></i><i></i></span>
|
|
||||||
<span class="qq-lp-term-title">terminal</span>
|
|
||||||
</div>
|
|
||||||
<div class="qq-lp-term-line">
|
|
||||||
<code class="qq-lp-term-code"><span class="qq-prompt">$</span> git clone <span class="qq-url">https://git.qyhhh.top/qq/repo.git</span></code>
|
|
||||||
<span class="qq-qc-tip" aria-hidden="true">已复制</span>
|
|
||||||
<button class="qq-lp-copy" type="button" data-qq-copy="git clone https://git.qyhhh.top/qq/repo.git" aria-label="复制 clone 命令">
|
|
||||||
<svg class="qq-copy-icon" viewBox="0 0 16 16" width="15" height="15" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
||||||
<rect x="5.5" y="5.5" width="8" height="8" rx="1.6"/>
|
|
||||||
<path d="M10.5 5.5V4a1.5 1.5 0 0 0-1.5-1.5H4A1.5 1.5 0 0 0 2.5 4v5A1.5 1.5 0 0 0 4 10.5h1.5"/>
|
|
||||||
</svg>
|
|
||||||
<svg class="qq-copy-check" viewBox="0 0 16 16" width="15" height="15" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
||||||
<path d="M3 8.5 6.2 11.7 13 4.5"/>
|
|
||||||
</svg>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="qq-lp-hot" id="qq-hot-repos" data-demo="1" hidden>
|
|
||||||
<div class="qq-lp-sec-head">
|
|
||||||
<h2>热门公开仓库</h2>
|
|
||||||
<a class="qq-lp-more" href="#">查看全部 →</a>
|
|
||||||
</div>
|
|
||||||
<div class="qq-hot-grid" data-qq-hot-grid>
|
|
||||||
<div class="qq-repo-card qq-skeleton" aria-hidden="true"><span class="qq-sk-bar qq-sk-title"></span><span class="qq-sk-bar qq-sk-desc"></span><span class="qq-sk-bar qq-sk-desc qq-sk-desc-2"></span><div class="qq-sk-meta"><span class="qq-sk-bar qq-sk-pill"></span><span class="qq-sk-bar qq-sk-pill"></span><span class="qq-sk-bar qq-sk-pill qq-sk-pill-end"></span></div></div>
|
|
||||||
<div class="qq-repo-card qq-skeleton" aria-hidden="true"><span class="qq-sk-bar qq-sk-title"></span><span class="qq-sk-bar qq-sk-desc"></span><span class="qq-sk-bar qq-sk-desc qq-sk-desc-2"></span><div class="qq-sk-meta"><span class="qq-sk-bar qq-sk-pill"></span><span class="qq-sk-bar qq-sk-pill"></span><span class="qq-sk-bar qq-sk-pill qq-sk-pill-end"></span></div></div>
|
|
||||||
<div class="qq-repo-card qq-skeleton" aria-hidden="true"><span class="qq-sk-bar qq-sk-title"></span><span class="qq-sk-bar qq-sk-desc"></span><span class="qq-sk-bar qq-sk-desc qq-sk-desc-2"></span><div class="qq-sk-meta"><span class="qq-sk-bar qq-sk-pill"></span><span class="qq-sk-bar qq-sk-pill"></span><span class="qq-sk-bar qq-sk-pill qq-sk-pill-end"></span></div></div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="qq-lp-grid">
|
|
||||||
<article class="qq-lp-card">
|
|
||||||
<span class="qq-lp-icon"><svg viewBox="0 0 16 16" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M9.5 3.25a2.25 2.25 0 1 1 3 2.122V6A2.5 2.5 0 0 1 10 8.5H6a1 1 0 0 0-1 1v1.128a2.251 2.251 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.5 0v1.836A2.492 2.492 0 0 1 6 7h4a1 1 0 0 0 1-1v-.628A2.25 2.25 0 0 1 9.5 3.25Zm-6 0a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Zm8.25-.75a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM4.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z"/></svg></span>
|
|
||||||
<h2>版本控制</h2>
|
|
||||||
<p>Git 仓库、分支、标签、合并请求与代码评审,一套齐全。</p>
|
|
||||||
</article>
|
|
||||||
<article class="qq-lp-card">
|
|
||||||
<span class="qq-lp-icon"><svg viewBox="0 0 16 16" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"/><path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z"/></svg></span>
|
|
||||||
<h2>议题与看板</h2>
|
|
||||||
<p>Issues、里程碑、标签与看板,把待办和进展放在同一个地方。</p>
|
|
||||||
</article>
|
|
||||||
<article class="qq-lp-card">
|
|
||||||
<span class="qq-lp-icon"><svg viewBox="0 0 16 16" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="m8.533.133 5.25 1.68A1.75 1.75 0 0 1 15 3.48V7c0 1.566-.32 3.182-1.303 4.682-.983 1.498-2.585 2.813-5.032 3.855a1.697 1.697 0 0 1-1.33 0c-2.447-1.042-4.049-2.357-5.032-3.855C1.32 10.182 1 8.566 1 7V3.48a1.75 1.75 0 0 1 1.217-1.667l5.25-1.68a1.748 1.748 0 0 1 1.066 0Zm-.61 1.429.001.001-5.25 1.68a.251.251 0 0 0-.174.237V7c0 1.275.259 2.518 1.008 3.66.749 1.14 2.028 2.29 4.294 3.255a.197.197 0 0 0 .155 0c2.266-.965 3.545-2.115 4.294-3.255C13.75 9.518 14 8.275 14 7V3.48a.25.25 0 0 0-.173-.237l-5.25-1.68a.25.25 0 0 0-.155 0Z"/></svg></span>
|
|
||||||
<h2>数据自持</h2>
|
|
||||||
<p>跑在自己的服务器上,仓库、用户与备份都由自己掌握。</p>
|
|
||||||
</article>
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- ============ 2. 仓库列表 ============ -->
|
|
||||||
<div class="section-label">仓库列表(explore/repos)</div>
|
|
||||||
<div class="segment">
|
|
||||||
<div class="segment-header">最近更新的仓库</div>
|
|
||||||
<div class="repo-row">
|
|
||||||
<div class="dot">Q</div>
|
|
||||||
<div style="flex:1">
|
|
||||||
<h4><a href="#">qq/gitea-font</a> <span class="lang">· 私有</span></h4>
|
|
||||||
<div class="repo-meta">更新于 3 分钟前 · ★ 12 · 分支 2 · 标签 3</div>
|
|
||||||
<p class="repo-desc">Gitea 蓝白 ins 风外观定制:主题、模板钩子与 Logo 套件。</p>
|
|
||||||
</div>
|
|
||||||
<span class="label label-primary">CSS</span>
|
|
||||||
</div>
|
|
||||||
<div class="repo-row">
|
|
||||||
<div class="dot">N</div>
|
|
||||||
<div style="flex:1">
|
|
||||||
<h4><a href="#">qq/neovim-config</a></h4>
|
|
||||||
<div class="repo-meta">更新于 2 小时前 · ★ 48 · 分支 4</div>
|
|
||||||
<p class="repo-desc">个人 Neovim 配置,JetBrains Mono Nerd Font + LSP 全套。</p>
|
|
||||||
</div>
|
|
||||||
<span class="label label-primary">Lua</span>
|
|
||||||
</div>
|
|
||||||
<div class="repo-row">
|
|
||||||
<div class="dot">M</div>
|
|
||||||
<div style="flex:1">
|
|
||||||
<h4><a href="#">qq/materials-notes</a></h4>
|
|
||||||
<div class="repo-meta">更新于 昨天 · ★ 6</div>
|
|
||||||
<p class="repo-desc">材料科学论文笔记与数据整理。</p>
|
|
||||||
</div>
|
|
||||||
<span class="label label-primary">Markdown</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- ============ 3. 代码文件视图 ============ -->
|
|
||||||
<div class="section-label">仓库文件页(repo/file)</div>
|
|
||||||
<div class="segment">
|
|
||||||
<div class="segment-header" style="display:flex;align-items:center;gap:10px;flex-wrap:wrap">
|
|
||||||
<span class="mono" style="font-weight:500">qq / gitea-font</span>
|
|
||||||
<span class="label">main</span>
|
|
||||||
<span class="mono sha">62b45b2</span>
|
|
||||||
<span style="flex:1"></span>
|
|
||||||
<span class="btn">复制</span>
|
|
||||||
<span class="btn btn-primary">克隆</span>
|
|
||||||
</div>
|
|
||||||
<table>
|
|
||||||
<thead>
|
|
||||||
<tr><th style="width:36px">·</th><th>文件</th><th style="width:130px">最近提交</th><th style="width:90px">时间</th></tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr><td>▸</td><td><a href="#">custom/</a></td><td class="mono" style="color:var(--color-text-light-2)">chore: 主题与模板</td><td class="repo-meta">2 分钟前</td></tr>
|
|
||||||
<tr><td>▸</td><td><a href="#">preview/</a></td><td class="mono" style="color:var(--color-text-light-2)">feat: 离线预览</td><td class="repo-meta">2 分钟前</td></tr>
|
|
||||||
<tr><td>▤</td><td><a href="#">README.md</a></td><td class="mono" style="color:var(--color-text-light-2)">docs: 铁律与工作流</td><td class="repo-meta">5 分钟前</td></tr>
|
|
||||||
<tr><td>▤</td><td><a href="#">scripts/deploy.sh</a></td><td class="mono" style="color:var(--color-text-light-2)">feat: 一键部署</td><td class="repo-meta">8 分钟前</td></tr>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="segment" style="margin-top:16px">
|
|
||||||
<div class="segment-header">scripts/build_theme.py</div>
|
|
||||||
<pre><code><span style="color:var(--color-text-light-3)"># 从二进制里导出的官方 CSS 派生主题变量,改一个主色整族跟着变</span>
|
|
||||||
LIGHT_PRIMARY = <span style="color:var(--color-primary)">"#3B82F6"</span>
|
|
||||||
DARK_PRIMARY = <span style="color:var(--color-primary)">"#38BDF8"</span>
|
|
||||||
|
|
||||||
<span style="color:var(--color-text-light-3)">def</span> <span style="color:var(--color-primary)">mix</span>(a, b, t):
|
|
||||||
<span style="color:var(--color-text-light-3)">"""把 a 向 b 混合 t(0..1)"""</span>
|
|
||||||
ra, rb = hex_to_rgb(a), hex_to_rgb(b)
|
|
||||||
<span style="color:var(--color-text-light-3)">return</span> rgb_to_hex(tuple(ra[i] + (rb[i] - ra[i]) * t <span style="color:var(--color-text-light-3)">for</span> i <span style="color:var(--color-text-light-3)">in</span> range(3)))</code></pre>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- ============ 4. 组件状态 ============ -->
|
|
||||||
<div class="section-label">组件与状态色</div>
|
|
||||||
<div class="grid grid-2">
|
|
||||||
<div class="segment">
|
|
||||||
<div class="segment-header">按钮 / 标签</div>
|
|
||||||
<div class="segment-body" style="display:flex;flex-wrap:wrap;gap:10px;align-items:center">
|
|
||||||
<span class="btn btn-primary">新建仓库</span>
|
|
||||||
<span class="btn">取消</span>
|
|
||||||
<span class="label label-primary">open</span>
|
|
||||||
<span class="label label-success">checks passed</span>
|
|
||||||
<span class="label">v1.0-rc1</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="segment">
|
|
||||||
<div class="segment-header">输入框 / 搜索</div>
|
|
||||||
<div class="segment-body" style="display:flex;flex-direction:column;gap:10px">
|
|
||||||
<input type="text" placeholder="仓库名称">
|
|
||||||
<input type="search" placeholder="在 qq/gitea-font 中搜索">
|
|
||||||
<span class="repo-meta">提示:聚焦时边框使用主色 <span class="mono">--color-primary</span></span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- ============ 5. Logo 双底色校验 ============ -->
|
|
||||||
<div class="section-label">Logo 在浅色 / 深色顶栏上的表现(圆外零白边)</div>
|
|
||||||
<div class="logo-strip">
|
|
||||||
<div class="logo-chip on-white">
|
|
||||||
<img src="../custom/public/assets/img/logo-light.svg" alt="light logo">
|
|
||||||
<div><div style="font-weight:600">#FFFFFF 顶栏</div><small>日间版 · #60A5FA 圆章</small></div>
|
|
||||||
</div>
|
|
||||||
<div class="logo-chip on-dark">
|
|
||||||
<img src="../custom/public/assets/img/logo-light.svg" alt="light logo on dark">
|
|
||||||
<div><div style="font-weight:600">#0D1117 顶栏(日间版)</div><small>圆章自带底,深色下依旧清晰</small></div>
|
|
||||||
</div>
|
|
||||||
<div class="logo-chip on-dark">
|
|
||||||
<img src="../custom/public/assets/img/logo-dark.svg" alt="dark logo">
|
|
||||||
<div><div style="font-weight:600">#0D1117 顶栏(夜间版)</div><small>夜间版 · #38BDF8 圆章</small></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- ============ 6. 登录页(/user/login) ============ -->
|
|
||||||
<div class="section-label">登录页(user/login · 纯 CSS 改造,不覆盖模板)</div>
|
|
||||||
<div class="segment" id="login-demo" style="padding:26px 20px 30px">
|
|
||||||
<div class="page-content user signin">
|
|
||||||
<div class="new-menu navbar" style="display:flex;gap:4px;justify-content:center">
|
|
||||||
<a class="item active">登录</a>
|
|
||||||
<a class="item">注册帐号</a>
|
|
||||||
<a class="item">OpenID</a>
|
|
||||||
</div>
|
|
||||||
<div class="ui middle very relaxed page grid">
|
|
||||||
<div class="ui container column fluid">
|
|
||||||
<h4 class="ui top attached header center">登录</h4>
|
|
||||||
<div class="ui attached segment">
|
|
||||||
<form class="ui form">
|
|
||||||
<div class="required inline field">
|
|
||||||
<label for="p-user">用户名或邮箱</label>
|
|
||||||
<input id="p-user" type="text" placeholder="">
|
|
||||||
</div>
|
|
||||||
<div class="required inline field">
|
|
||||||
<label for="p-pass">密码</label>
|
|
||||||
<input id="p-pass" type="password">
|
|
||||||
</div>
|
|
||||||
<div class="inline field">
|
|
||||||
<div class="ui checkbox"><input type="checkbox" id="p-remember"><label for="p-remember">记住此设备</label></div>
|
|
||||||
</div>
|
|
||||||
<div class="inline field">
|
|
||||||
<button class="ui primary button" type="button">登录</button>
|
|
||||||
<a href="#" style="margin-left:10px">忘记密码?</a>
|
|
||||||
</div>
|
|
||||||
<div class="inline field">
|
|
||||||
<a href="#">还没帐户?马上注册。</a>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="page-footer qq-icp-footer">
|
|
||||||
<a class="qq-icp" href="https://beian.miit.gov.cn/">闽ICP备2023002932号</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
/* 离线预览用的假数据:字段与 /api/v1/repos/search 保持一致 */
|
|
||||||
(function () {
|
|
||||||
var h = 3600e3, d = 24 * h;
|
|
||||||
function ago(ms) { return new Date(Date.now() - ms).toISOString(); }
|
|
||||||
window.QQ_HOT_REPOS_DEMO = [
|
|
||||||
{ full_name: 'newbie/QQgit', html_url: '#', description: 'Gitea 蓝白 ins 风外观定制:主题、模板钩子与 Logo 套件。', language: 'CSS', stars_count: 12, forks_count: 2, updated_at: ago(2 * h), fork: false, mirror: false, private: false, archived: false, owner: { login: 'newbie' } },
|
|
||||||
{ full_name: 'newbie/Actuators', html_url: '#', description: '执行器选型笔记、固件脚本与实测数据整理。', language: 'Python', stars_count: 8, forks_count: 1, updated_at: ago(9 * d), fork: false, mirror: false, private: false, archived: false, owner: { login: 'newbie' } },
|
|
||||||
{ full_name: 'newbie/OMZ', html_url: '#', description: 'oh-my-zsh 个人配置:主题、插件与常用别名。', language: 'Shell', stars_count: 5, forks_count: 0, updated_at: ago(23 * d), fork: false, mirror: false, private: false, archived: false, owner: { login: 'newbie' } },
|
|
||||||
{ full_name: 'Skills/YYCangle-skill', html_url: '#', description: '角度/姿态相关的技能脚本与文档。', language: 'Markdown', stars_count: 3, forks_count: 0, updated_at: ago(40 * d), fork: false, mirror: false, private: false, archived: false, owner: { login: 'Skills' } },
|
|
||||||
{ full_name: 'newbie/nvim', html_url: '#', description: 'Neovim 配置,JetBrains Mono Nerd Font + LSP 全套。', language: 'Lua', stars_count: 2, forks_count: 0, updated_at: ago(60 * d), fork: false, mirror: false, private: false, archived: false, owner: { login: 'newbie' } },
|
|
||||||
{ full_name: 'Skills/QQzot-skill', html_url: '#', description: 'Zotero 文献库操作与 AI 笔记生成的技能封装。', language: 'Python', stars_count: 1, forks_count: 0, updated_at: ago(70 * d), fork: false, mirror: false, private: false, archived: false, owner: { login: 'Skills' } }
|
|
||||||
];
|
|
||||||
})();
|
|
||||||
</script>
|
|
||||||
<script src="../custom/public/assets/js/qq-home.js" defer></script>
|
|
||||||
<script src="../custom/public/assets/js/qq-fx.js" defer></script>
|
|
||||||
<script src="app.js"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
@ -1,78 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="zh-CN" data-theme="auto">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
<title>QQGit · 登录页预览</title>
|
|
||||||
|
|
||||||
<!-- 与线上一致的加载顺序:主题 → qq-ui → qq-fx -->
|
|
||||||
<link id="css-auto" rel="stylesheet" href="../custom/public/assets/css/theme-qq-auto.css">
|
|
||||||
<link id="css-light" rel="stylesheet" href="../custom/public/assets/css/theme-qq-light.css" disabled>
|
|
||||||
<link id="css-dark" rel="stylesheet" href="../custom/public/assets/css/theme-qq-dark.css" disabled>
|
|
||||||
<link rel="stylesheet" href="../custom/public/assets/css/qq-ui.css">
|
|
||||||
<link rel="stylesheet" href="../custom/public/assets/css/qq-fx.css">
|
|
||||||
<link rel="stylesheet" href="preview.css">
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<div class="switcher" role="group" aria-label="主题切换">
|
|
||||||
<button data-mode="light">浅色</button>
|
|
||||||
<button data-mode="auto" class="on">自动</button>
|
|
||||||
<button data-mode="dark">深色</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<nav id="navbar">
|
|
||||||
<a id="navbar-logo" href="#"><img src="../custom/public/assets/img/logo.svg" alt="logo"></a>
|
|
||||||
<a class="nav-item" href="#">探索</a>
|
|
||||||
<a class="nav-item" href="#">帮助</a>
|
|
||||||
<span class="nav-spacer"></span>
|
|
||||||
<a class="nav-item" href="#">注册</a>
|
|
||||||
<a class="nav-item active" href="#">登录</a>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<div class="page" style="padding-top:6vh">
|
|
||||||
<div class="page-content user signin">
|
|
||||||
<div class="new-menu navbar" style="display:flex;gap:4px;justify-content:center">
|
|
||||||
<a class="item active">登录</a>
|
|
||||||
<a class="item">注册帐号</a>
|
|
||||||
<a class="item">OpenID</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="ui middle very relaxed page grid">
|
|
||||||
<div class="ui container column fluid">
|
|
||||||
<h4 class="ui top attached header center">登录</h4>
|
|
||||||
<div class="ui attached segment">
|
|
||||||
<form class="ui form">
|
|
||||||
<div class="required inline field">
|
|
||||||
<label for="p-user">用户名或邮箱</label>
|
|
||||||
<input id="p-user" type="text">
|
|
||||||
</div>
|
|
||||||
<div class="required inline field">
|
|
||||||
<label for="p-pass">密码</label>
|
|
||||||
<input id="p-pass" type="password">
|
|
||||||
</div>
|
|
||||||
<div class="inline field checkbox-row">
|
|
||||||
<div class="ui checkbox"><input type="checkbox" id="p-remember"><label for="p-remember">记住此设备</label></div>
|
|
||||||
</div>
|
|
||||||
<div class="inline field submit-row">
|
|
||||||
<button class="ui primary button" type="button">登录</button>
|
|
||||||
<a href="#" style="margin-left:10px">忘记密码?</a>
|
|
||||||
</div>
|
|
||||||
<div class="inline field link-row">
|
|
||||||
<a href="#">还没帐户?马上注册。</a>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="page-footer qq-icp-footer">
|
|
||||||
<a class="qq-icp" href="https://beian.miit.gov.cn/">闽ICP备2023002932号</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<script src="../custom/public/assets/js/qq-fx.js" defer></script>
|
|
||||||
<script src="app.js"></script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html lang="zh-CN">
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<title>QQGit 预览 · 375px frame</title>
|
|
||||||
<style>
|
|
||||||
html, body { margin: 0; padding: 0; background: #fff; }
|
|
||||||
iframe { display: block; width: 375px; height: 2400px; border: 0; }
|
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<iframe id="f" src="index.html?only=home&bare=1&theme=light"></iframe>
|
|
||||||
<script>
|
|
||||||
var t = new URLSearchParams(location.search).get('theme') || 'light';
|
|
||||||
document.getElementById('f').src = 'index.html?only=home&bare=1&theme=' + t;
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
@ -1,432 +0,0 @@
|
||||||
/*!
|
|
||||||
* preview.css —— 仅用于离线预览画廊,不随 custom/ 发布。
|
|
||||||
* 目的:在浏览器里用「和 Gitea 1.21 相同的 CSS 变量 + 相近的组件写法」复刻界面,
|
|
||||||
* 从而在**不碰线上**的前提下判断配色、字号、留白是否合意。
|
|
||||||
*/
|
|
||||||
|
|
||||||
* { box-sizing: border-box; }
|
|
||||||
|
|
||||||
html, body {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
background: var(--color-body);
|
|
||||||
color: var(--color-text);
|
|
||||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
|
|
||||||
"Hiragino Sans GB", "Microsoft YaHei", sans-serif;
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
a { color: var(--color-primary); text-decoration: none; }
|
|
||||||
a:hover { color: var(--color-primary-hover); }
|
|
||||||
|
|
||||||
.mono { font-family: var(--qq-font-mono); }
|
|
||||||
|
|
||||||
/* ---------------------------------------------------------------- 顶栏 */
|
|
||||||
#navbar {
|
|
||||||
position: sticky;
|
|
||||||
top: 0;
|
|
||||||
z-index: 20;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 4px;
|
|
||||||
height: 52px;
|
|
||||||
padding: 0 18px;
|
|
||||||
background: var(--color-nav-bg);
|
|
||||||
border-bottom: 1px solid var(--color-secondary);
|
|
||||||
backdrop-filter: saturate(150%) blur(8px);
|
|
||||||
}
|
|
||||||
|
|
||||||
#navbar-logo {
|
|
||||||
display: inline-flex;
|
|
||||||
align-items: center;
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#navbar-logo img { width: 30px; height: 30px; display: block; transition: transform 160ms ease; }
|
|
||||||
#navbar-logo:hover img { transform: scale(1.08); }
|
|
||||||
|
|
||||||
.nav-item {
|
|
||||||
padding: 7px 12px;
|
|
||||||
border-radius: var(--border-radius);
|
|
||||||
color: var(--color-text);
|
|
||||||
font-weight: 500;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
.nav-item:hover { background: var(--color-hover); color: var(--color-text); }
|
|
||||||
.nav-item.active { background: var(--color-active); color: var(--color-primary); }
|
|
||||||
.nav-spacer { flex: 1; }
|
|
||||||
|
|
||||||
.avatar {
|
|
||||||
width: 26px; height: 26px; border-radius: 50%;
|
|
||||||
background: var(--color-primary);
|
|
||||||
color: var(--color-primary-contrast);
|
|
||||||
display: inline-flex; align-items: center; justify-content: center;
|
|
||||||
font-size: 12px; font-weight: 700;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ---------------------------------------------------------------- 布局 */
|
|
||||||
.page {
|
|
||||||
max-width: 1040px;
|
|
||||||
margin: 0 auto;
|
|
||||||
padding: 26px 20px 60px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.page-title { font-size: 20px; font-weight: 600; margin: 0 0 4px; }
|
|
||||||
.page-desc { color: var(--color-text-light-2); margin: 0 0 22px; }
|
|
||||||
|
|
||||||
.segment {
|
|
||||||
border: 1px solid var(--color-secondary);
|
|
||||||
border-radius: var(--border-radius);
|
|
||||||
background: var(--color-box-body);
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.segment-header {
|
|
||||||
padding: 12px 16px;
|
|
||||||
border-bottom: 1px solid var(--color-secondary);
|
|
||||||
background: var(--color-box-header);
|
|
||||||
font-weight: 600;
|
|
||||||
}
|
|
||||||
|
|
||||||
.segment-body { padding: 16px; }
|
|
||||||
|
|
||||||
.grid { display: grid; gap: 14px; }
|
|
||||||
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
|
|
||||||
|
|
||||||
/* ---------------------------------------------------------------- 首页 hero */
|
|
||||||
.hero-home { text-align: center; padding: 40px 0 10px; }
|
|
||||||
.hero-home img { width: 168px; height: 168px; margin-bottom: 18px; }
|
|
||||||
.hero-home h1 { font-size: 26px; margin: 0 0 6px; font-weight: 600; letter-spacing: 0.5px; }
|
|
||||||
.hero-home h2 { font-size: 15px; font-weight: 400; color: var(--color-text-light-2); margin: 0; }
|
|
||||||
|
|
||||||
.qq-home-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin: 36px auto 0; }
|
|
||||||
.qq-home-card {
|
|
||||||
flex: 1 1 240px; max-width: 290px; padding: 20px 22px;
|
|
||||||
border: 1px solid var(--color-secondary);
|
|
||||||
border-radius: var(--border-radius);
|
|
||||||
background: var(--color-box-body);
|
|
||||||
transition: border-color 160ms ease, transform 160ms ease;
|
|
||||||
}
|
|
||||||
.qq-home-card:hover { border-color: var(--color-primary); transform: translateY(-2px); }
|
|
||||||
.qq-home-card h3 { margin: 0 0 6px; font-size: 14px; display: flex; align-items: center; gap: 8px; }
|
|
||||||
.qq-home-card h3 span { color: var(--color-primary); }
|
|
||||||
.qq-home-card p { margin: 0; font-size: 13px; line-height: 1.6; color: var(--color-text-light-2); }
|
|
||||||
|
|
||||||
/* ---------------------------------------------------------------- 仓库列表 */
|
|
||||||
.repo-row {
|
|
||||||
display: flex; align-items: flex-start; gap: 12px;
|
|
||||||
padding: 14px 16px;
|
|
||||||
border-bottom: 1px solid var(--color-secondary);
|
|
||||||
}
|
|
||||||
.repo-row:last-child { border-bottom: 0; }
|
|
||||||
.repo-row .dot {
|
|
||||||
width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%;
|
|
||||||
background: var(--color-primary-alpha-20); color: var(--color-primary);
|
|
||||||
display: flex; align-items: center; justify-content: center; font-weight: 700;
|
|
||||||
}
|
|
||||||
.repo-row h4 { margin: 0 0 2px; font-size: 14px; font-weight: 600; }
|
|
||||||
.repo-row h4 .lang { font-weight: 400; color: var(--color-text-light-2); }
|
|
||||||
.repo-meta { color: var(--color-text-light-2); font-size: 12px; }
|
|
||||||
.repo-desc { margin: 4px 0 0; color: var(--color-text-light-2); font-size: 13px; }
|
|
||||||
|
|
||||||
/* ---------------------------------------------------------------- 表格 / 文件列表 */
|
|
||||||
table { width: 100%; border-collapse: collapse; }
|
|
||||||
th, td { text-align: left; padding: 9px 14px; font-size: 13px; }
|
|
||||||
th { color: var(--color-text-light-2); font-weight: 500; }
|
|
||||||
tbody tr + tr { border-top: 1px solid var(--color-secondary); }
|
|
||||||
tbody tr:hover { background: var(--color-hover); }
|
|
||||||
|
|
||||||
/* ---------------------------------------------------------------- 按钮 / 标签 / 输入 */
|
|
||||||
.btn {
|
|
||||||
display: inline-flex; align-items: center; gap: 6px;
|
|
||||||
padding: 7px 14px; border-radius: var(--border-radius);
|
|
||||||
border: 1px solid var(--color-secondary);
|
|
||||||
background: var(--color-button); color: var(--color-text);
|
|
||||||
font-size: 13px; font-weight: 500; cursor: pointer;
|
|
||||||
}
|
|
||||||
.btn:hover { border-color: var(--color-secondary-dark-1); }
|
|
||||||
.btn-primary {
|
|
||||||
background: var(--color-primary); border-color: var(--color-primary);
|
|
||||||
color: var(--color-primary-contrast);
|
|
||||||
}
|
|
||||||
.btn-primary:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); }
|
|
||||||
|
|
||||||
.label {
|
|
||||||
display: inline-flex; align-items: center; gap: 5px;
|
|
||||||
padding: 2px 9px; border-radius: 999px;
|
|
||||||
font-size: 12px; font-weight: 500;
|
|
||||||
background: var(--color-label-bg); color: var(--color-label-text);
|
|
||||||
}
|
|
||||||
.label-primary { background: var(--color-primary-alpha-20); color: var(--color-primary); }
|
|
||||||
.label-success { background: var(--color-success-bg); color: var(--color-success-text); }
|
|
||||||
|
|
||||||
input[type="text"], input[type="search"] {
|
|
||||||
width: 100%; padding: 8px 12px;
|
|
||||||
border: 1px solid var(--color-input-border);
|
|
||||||
border-radius: var(--border-radius);
|
|
||||||
background: var(--color-input-background);
|
|
||||||
color: var(--color-input-text);
|
|
||||||
font-size: 13px;
|
|
||||||
}
|
|
||||||
|
|
||||||
code, pre {
|
|
||||||
font-family: var(--qq-font-mono); font-variant-ligatures: none;
|
|
||||||
font-size: 12.5px;
|
|
||||||
}
|
|
||||||
pre {
|
|
||||||
margin: 0; padding: 14px 16px; overflow: auto;
|
|
||||||
background: var(--color-markup-code-block);
|
|
||||||
border-radius: var(--border-radius);
|
|
||||||
line-height: 1.65;
|
|
||||||
}
|
|
||||||
.sha { color: var(--color-primary); }
|
|
||||||
|
|
||||||
/* ---------------------------------------------------------------- 切换器 */
|
|
||||||
.switcher {
|
|
||||||
position: fixed; top: 14px; right: 16px; z-index: 50;
|
|
||||||
display: flex; gap: 2px; padding: 4px;
|
|
||||||
background: var(--color-menu);
|
|
||||||
border: 1px solid var(--color-secondary);
|
|
||||||
border-radius: 999px;
|
|
||||||
box-shadow: 0 6px 20px var(--color-shadow);
|
|
||||||
}
|
|
||||||
.switcher button {
|
|
||||||
border: 0; background: transparent; color: var(--color-text-light-2);
|
|
||||||
padding: 6px 12px; border-radius: 999px; font-size: 12px; cursor: pointer;
|
|
||||||
}
|
|
||||||
.switcher button.on { background: var(--color-primary); color: var(--color-primary-contrast); }
|
|
||||||
|
|
||||||
.section-label {
|
|
||||||
display: flex; align-items: center; gap: 10px;
|
|
||||||
margin: 46px 0 14px; font-size: 12px; letter-spacing: 1px;
|
|
||||||
text-transform: uppercase; color: var(--color-text-light-3);
|
|
||||||
}
|
|
||||||
.section-label::after { content: ""; flex: 1; height: 1px; background: var(--color-secondary); }
|
|
||||||
|
|
||||||
/* 演示「日夜 Logo」的两种底:模拟浅色顶栏与深色顶栏 */
|
|
||||||
.logo-strip { display: flex; flex-wrap: wrap; gap: 14px; }
|
|
||||||
.logo-chip {
|
|
||||||
display: flex; align-items: center; gap: 12px;
|
|
||||||
padding: 12px 16px; border-radius: var(--border-radius);
|
|
||||||
border: 1px solid var(--color-secondary);
|
|
||||||
}
|
|
||||||
.logo-chip.on-white { background: #ffffff; color: #0f172a; }
|
|
||||||
.logo-chip.on-dark { background: #0d1117; color: #e6edf3; }
|
|
||||||
.logo-chip img { width: 34px; height: 34px; }
|
|
||||||
.logo-chip small { font-size: 11px; opacity: 0.65; }
|
|
||||||
|
|
||||||
/* 备案号页脚(对应 custom/templates/base/footer_content.tmpl 覆盖后的效果) */
|
|
||||||
.page-footer.qq-icp-footer {
|
|
||||||
position: fixed;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
z-index: 20;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
gap: 8px;
|
|
||||||
padding: 9px 12px;
|
|
||||||
font-size: 12px;
|
|
||||||
color: var(--color-text-light-2);
|
|
||||||
background: var(--color-body);
|
|
||||||
border-top: 1px solid var(--color-secondary);
|
|
||||||
}
|
|
||||||
.qq-icp-footer .qq-icp {
|
|
||||||
color: var(--color-text-light-2);
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
.qq-icp-footer .qq-icp:hover {
|
|
||||||
color: var(--color-primary);
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
padding-bottom: 44px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ------------------------------------------------------------------
|
|
||||||
离线预览用:复刻 Gitea/Fomantic 的 .ui.form 布局(label 在左、输入框在右)
|
|
||||||
线上这套来自 index.css,预览页没有,所以这里补一份最小实现。
|
|
||||||
------------------------------------------------------------------ */
|
|
||||||
.ui.form .field {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 14px;
|
|
||||||
margin: 0 0 14px;
|
|
||||||
}
|
|
||||||
.ui.form .field > label {
|
|
||||||
flex: 0 0 96px;
|
|
||||||
text-align: right;
|
|
||||||
font-size: 13px;
|
|
||||||
color: var(--color-text-light-2);
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
.ui.form .field > input {
|
|
||||||
flex: 1 1 auto;
|
|
||||||
min-width: 0;
|
|
||||||
}
|
|
||||||
.ui.form .field.checkbox-field,
|
|
||||||
.ui.form .inline.field:last-child {
|
|
||||||
justify-content: flex-start;
|
|
||||||
}
|
|
||||||
.ui.checkbox {
|
|
||||||
display: inline-flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 6px;
|
|
||||||
font-size: 13px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 这几行没有 label,靠 gap 对齐即可 */
|
|
||||||
.ui.form .field.checkbox-row,
|
|
||||||
.ui.form .field.submit-row,
|
|
||||||
.ui.form .field.link-row {
|
|
||||||
justify-content: flex-start;
|
|
||||||
margin-left: 110px;
|
|
||||||
}
|
|
||||||
.ui.form .field.submit-row { margin-bottom: 10px; }
|
|
||||||
|
|
||||||
/* 卡片标题居中(线上由 Fomantic 的 .center 提供) */
|
|
||||||
.ui.header.center { text-align: center; }
|
|
||||||
|
|
||||||
/* ------------------------------------------------------------------
|
|
||||||
预览页自身在窄屏下的收纳(线上 Gitea 的导航会折叠成汉堡菜单,
|
|
||||||
这里不做那么复杂的复刻,直接把桌面向导和主题切换藏起来)
|
|
||||||
------------------------------------------------------------------ */
|
|
||||||
@media (max-width: 620px) {
|
|
||||||
html, body { max-width: 100%; overflow-x: hidden; }
|
|
||||||
#navbar { position: static; overflow: hidden; }
|
|
||||||
#navbar .switcher { display: none; }
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ------------------------------------------------------------------
|
|
||||||
Dashboard 预览专用样式(线上由 Gitea 的 JS 组件与 Fomantic 提供)
|
|
||||||
------------------------------------------------------------------ */
|
|
||||||
.qq-repo-item {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 6px;
|
|
||||||
padding: 5px 6px;
|
|
||||||
border-radius: 6px;
|
|
||||||
font-size: 13px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.qq-repo-item:hover {
|
|
||||||
background: color-mix(in srgb, var(--color-primary) 8%, transparent);
|
|
||||||
}
|
|
||||||
|
|
||||||
.qq-repo-badge {
|
|
||||||
font-size: 11px;
|
|
||||||
padding: 0 6px;
|
|
||||||
border: 1px solid var(--color-secondary);
|
|
||||||
border-radius: 999px;
|
|
||||||
color: var(--color-text-light-2);
|
|
||||||
}
|
|
||||||
|
|
||||||
.qq-heatmap-mock {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.qq-heatmap-cells {
|
|
||||||
display: grid;
|
|
||||||
grid-template-rows: repeat(7, 1fr);
|
|
||||||
grid-auto-flow: column;
|
|
||||||
grid-auto-columns: 1fr;
|
|
||||||
gap: 3px;
|
|
||||||
height: 84px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.qq-heatmap-cells i {
|
|
||||||
display: block;
|
|
||||||
border-radius: 2px;
|
|
||||||
background: color-mix(in srgb, var(--color-secondary) 70%, transparent);
|
|
||||||
}
|
|
||||||
|
|
||||||
.qq-heatmap-legend {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 4px;
|
|
||||||
font-size: 11px;
|
|
||||||
color: var(--color-text-light-2);
|
|
||||||
}
|
|
||||||
|
|
||||||
.qq-heatmap-legend i {
|
|
||||||
width: 10px;
|
|
||||||
height: 10px;
|
|
||||||
border-radius: 2px;
|
|
||||||
background: color-mix(in srgb, var(--color-primary) 28%, transparent);
|
|
||||||
}
|
|
||||||
|
|
||||||
.ui.feed .event {
|
|
||||||
display: flex;
|
|
||||||
gap: 10px;
|
|
||||||
padding: 10px 0;
|
|
||||||
border-bottom: 1px solid var(--color-secondary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.ui.feed .event:last-child {
|
|
||||||
border-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ui.feed .label .avatar {
|
|
||||||
width: 22px;
|
|
||||||
height: 22px;
|
|
||||||
font-size: 11px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ui.feed .date {
|
|
||||||
display: block;
|
|
||||||
margin-bottom: 2px;
|
|
||||||
font-size: 11px;
|
|
||||||
color: var(--color-text-light-2);
|
|
||||||
}
|
|
||||||
|
|
||||||
.ui.feed .summary {
|
|
||||||
font-size: 13px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 动态流:与线上 Gitea 1.21 的 .flex-list/.flex-item 对齐(预览页复刻) */
|
|
||||||
.flex-list {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
list-style: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.flex-item {
|
|
||||||
display: flex;
|
|
||||||
align-items: flex-start;
|
|
||||||
gap: 10px;
|
|
||||||
padding: 10px 16px;
|
|
||||||
border-top: 1px solid var(--color-secondary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.flex-item:first-child {
|
|
||||||
border-top: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.flex-item-leading .avatar {
|
|
||||||
display: inline-flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
width: 24px;
|
|
||||||
height: 24px;
|
|
||||||
font-size: 11px;
|
|
||||||
border-radius: 50%;
|
|
||||||
background: color-mix(in srgb, var(--color-primary) 18%, var(--color-box-body));
|
|
||||||
color: var(--color-primary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.flex-item-main {
|
|
||||||
flex: 1 1 auto;
|
|
||||||
min-width: 0;
|
|
||||||
font-size: 13px;
|
|
||||||
line-height: 1.55;
|
|
||||||
}
|
|
||||||
|
|
||||||
.flex-item-main .date {
|
|
||||||
display: block;
|
|
||||||
margin-bottom: 2px;
|
|
||||||
font-size: 11px;
|
|
||||||
color: var(--color-text-light-2);
|
|
||||||
}
|
|
||||||
|
|
@ -1,67 +0,0 @@
|
||||||
#!/usr/bin/env python3
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
"""配色审计:确认主题文件里不再残留绿色相,并统计变量覆盖情况。
|
|
||||||
|
|
||||||
用法:python3 scripts/audit_colors.py
|
|
||||||
"""
|
|
||||||
|
|
||||||
import colorsys
|
|
||||||
import re
|
|
||||||
import sys
|
|
||||||
from pathlib import Path
|
|
||||||
|
|
||||||
ROOT = Path(__file__).resolve().parent.parent
|
|
||||||
CSS_DIR = ROOT / "custom" / "public" / "assets" / "css"
|
|
||||||
HEX_RE = re.compile(r"#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})\b")
|
|
||||||
GREEN_RANGE = (60, 170) # 色相区间:绿 → 黄绿
|
|
||||||
|
|
||||||
FILES = [
|
|
||||||
"theme-qq-auto.css",
|
|
||||||
"theme-qq-light.css",
|
|
||||||
"theme-qq-dark.css",
|
|
||||||
"qq-ui.css",
|
|
||||||
"qq-pages.css",
|
|
||||||
"qq-fx.css",
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
def hue_of(h):
|
|
||||||
h = h.lstrip("#")
|
|
||||||
if len(h) == 3:
|
|
||||||
h = "".join(c * 2 for c in h)
|
|
||||||
r, g, b = (int(h[i:i + 2], 16) / 255 for i in (0, 2, 4))
|
|
||||||
hh, ll, ss = colorsys.rgb_to_hls(r, g, b)
|
|
||||||
return hh * 360, ss, ll
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
|
||||||
bad_total = 0
|
|
||||||
for name in FILES:
|
|
||||||
path = CSS_DIR / name
|
|
||||||
if not path.exists():
|
|
||||||
print(f"· {name:22s} 跳过(不存在)")
|
|
||||||
continue
|
|
||||||
text = path.read_text(encoding="utf-8")
|
|
||||||
offenders = []
|
|
||||||
for m in HEX_RE.finditer(text):
|
|
||||||
# 跳过内联 SVG 蒙版与注释中的颜色
|
|
||||||
line_start = text.rfind("\n", 0, m.start()) + 1
|
|
||||||
line = text[line_start:text.find("\n", m.start())]
|
|
||||||
if "url(" in line or line.lstrip().startswith("*"):
|
|
||||||
continue
|
|
||||||
hue, sat, light = hue_of(m.group(1))
|
|
||||||
if GREEN_RANGE[0] <= hue <= GREEN_RANGE[1] and sat > 0.12 and 0.03 < light < 0.97:
|
|
||||||
offenders.append((m.group(0), round(hue), round(sat, 2)))
|
|
||||||
bad_total += len(offenders)
|
|
||||||
vars_n = len(re.findall(r"^\s*--[a-z0-9-]+:", text, re.M))
|
|
||||||
status = "OK" if not offenders else f"{len(offenders)} 处残留绿色"
|
|
||||||
print(f"· {name:22s} 变量 {vars_n:>4d} {status}")
|
|
||||||
for off in offenders[:8]:
|
|
||||||
print(f" {off[0]} hue={off[1]}° sat={off[2]}")
|
|
||||||
print()
|
|
||||||
print("审计结果:", "全部通过,无绿色残留" if bad_total == 0 else f"仍有 {bad_total} 处需处理")
|
|
||||||
return 0 if bad_total == 0 else 1
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
sys.exit(main())
|
|
||||||
|
|
@ -1,310 +0,0 @@
|
||||||
#!/usr/bin/env python3
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
"""从 Gitea 1.21.11 官方 CSS 派生「蓝白 ins 风」主题变量。
|
|
||||||
|
|
||||||
设计原则
|
|
||||||
--------
|
|
||||||
1. **不改源码**:只读取二进制里导出的官方 CSS 作为数据源,产出标准的自定义主题文件。
|
|
||||||
2. **版本锁定**:数据源是 `vendor/index-1.21.11.css`(浅色 :root)与
|
|
||||||
`vendor/theme-auto-1.21.11.css`(深色 :root,位于 prefers-color-scheme 媒体查询内),
|
|
||||||
两者均来自 `gitea embedded view`,与线上 1.21.11 二进制 100% 对齐。
|
|
||||||
3. **颜色可推导**:主色 7 级深浅 + 9 级透明度全部由 `mix()` 计算,改一个主色整族跟着变。
|
|
||||||
4. **全局剔除绿色**:任何绿色系(色相 60°–170°)的变量值统一转到青蓝 188°,保留原有
|
|
||||||
明度与饱和度,这样 diff 高亮、成功态、告警橄榄色都不会再出现绿色,但语义层次仍可区分。
|
|
||||||
|
|
||||||
输出
|
|
||||||
----
|
|
||||||
custom/public/assets/css/theme-qq-auto.css 日夜自动(跟随系统)
|
|
||||||
custom/public/assets/css/theme-qq-light.css 仅浅色
|
|
||||||
custom/public/assets/css/theme-qq-dark.css 仅深色
|
|
||||||
|
|
||||||
用法
|
|
||||||
----
|
|
||||||
python3 scripts/build_theme.py
|
|
||||||
"""
|
|
||||||
|
|
||||||
import colorsys
|
|
||||||
import re
|
|
||||||
import sys
|
|
||||||
from pathlib import Path
|
|
||||||
|
|
||||||
ROOT = Path(__file__).resolve().parent.parent
|
|
||||||
VENDOR = ROOT / "vendor"
|
|
||||||
OUT = ROOT / "custom" / "public" / "assets" / "css"
|
|
||||||
VERSION = "1.21.11"
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------- 调色板
|
|
||||||
LIGHT_PRIMARY = "#3B82F6" # 按钮 / 链接主色(配纯白文字满足对比度)
|
|
||||||
LIGHT_PRIMARY_CONTRAST = "#FFFFFF"
|
|
||||||
LIGHT_HOVER = "#2563EB"
|
|
||||||
LIGHT_ACTIVE = "#1D4ED8"
|
|
||||||
|
|
||||||
DARK_PRIMARY = "#38BDF8" # 冰蓝主色(暗底上用深色文字保证对比度)
|
|
||||||
DARK_PRIMARY_CONTRAST = "#0B1220"
|
|
||||||
DARK_HOVER = "#7DD3FC"
|
|
||||||
DARK_ACTIVE = "#22D3EE"
|
|
||||||
|
|
||||||
CYAN_LIGHT, CYAN_LIGHT_TEXT = "#0891B2", "#0E7490"
|
|
||||||
CYAN_DARK, CYAN_DARK_TEXT = "#22D3EE", "#67E8F9"
|
|
||||||
|
|
||||||
LIGHT_SURFACES = {
|
|
||||||
"--color-body": "#FFFFFF",
|
|
||||||
"--color-box-body": "#FFFFFF",
|
|
||||||
"--color-box-header": "#F8FAFC",
|
|
||||||
"--color-card": "#F8FAFC",
|
|
||||||
"--color-menu": "#FFFFFF",
|
|
||||||
"--color-footer": "#FFFFFF",
|
|
||||||
"--color-nav-bg": "#FFFFFF",
|
|
||||||
"--color-header-wrapper": "#FFFFFF",
|
|
||||||
"--color-secondary-bg": "#F1F5F9",
|
|
||||||
"--color-input-background": "#F8FAFC",
|
|
||||||
"--color-input-border": "#E2E8F0",
|
|
||||||
"--color-input-text": "#0F172A",
|
|
||||||
"--color-secondary": "#E2E8F0",
|
|
||||||
"--color-secondary-dark-1": "#CBD5E1",
|
|
||||||
"--color-secondary-dark-2": "#94A3B8",
|
|
||||||
"--color-secondary-dark-3": "#64748B",
|
|
||||||
"--color-secondary-dark-4": "#475569",
|
|
||||||
"--color-secondary-light-1": "#E2E8F0",
|
|
||||||
"--color-secondary-light-2": "#F1F5F9",
|
|
||||||
"--color-text": "#0F172A",
|
|
||||||
"--color-text-dark": "#020617",
|
|
||||||
"--color-text-light": "#334155",
|
|
||||||
"--color-text-light-1": "#475569",
|
|
||||||
"--color-text-light-2": "#64748B",
|
|
||||||
"--color-text-light-3": "#94A3B8",
|
|
||||||
"--color-code-bg": "#FFFFFF",
|
|
||||||
"--color-code-sidebar-bg": "#F8FAFC",
|
|
||||||
"--color-markup-code-block": "#F1F5F9",
|
|
||||||
"--color-hover": "rgba(15,23,42,0.04)",
|
|
||||||
"--color-active": "rgba(15,23,42,0.07)",
|
|
||||||
"--color-shadow": "rgba(15,23,42,0.08)",
|
|
||||||
"--color-light-border": "rgba(15,23,42,0.08)",
|
|
||||||
"--color-button": "#FFFFFF",
|
|
||||||
"--color-label-text": "#0F172A",
|
|
||||||
"--color-success-text": CYAN_LIGHT_TEXT,
|
|
||||||
"--color-success-border": "#A5D8E4",
|
|
||||||
"--color-success-bg": "#F0FAFD",
|
|
||||||
"--color-green": CYAN_LIGHT,
|
|
||||||
"--color-green-light": "#22D3EE",
|
|
||||||
"--color-green-dark-1": CYAN_LIGHT_TEXT,
|
|
||||||
"--color-green-dark-2": "#155E75",
|
|
||||||
"--color-teal": CYAN_LIGHT,
|
|
||||||
}
|
|
||||||
|
|
||||||
DARK_SURFACES = {
|
|
||||||
"--color-body": "#0D1117",
|
|
||||||
"--color-box-body": "#161B22",
|
|
||||||
"--color-box-header": "#161B22",
|
|
||||||
"--color-box-body-highlight": "#1C2128",
|
|
||||||
"--color-card": "#161B22",
|
|
||||||
"--color-menu": "#161B22",
|
|
||||||
"--color-footer": "#0D1117",
|
|
||||||
"--color-nav-bg": "#161B22",
|
|
||||||
"--color-header-wrapper": "#161B22",
|
|
||||||
"--color-secondary-bg": "#1C2128",
|
|
||||||
"--color-input-background": "#0D1117",
|
|
||||||
"--color-input-border": "#30363D",
|
|
||||||
"--color-input-text": "#E6EDF3",
|
|
||||||
"--color-secondary": "#30363D",
|
|
||||||
"--color-secondary-dark-1": "#3D444D",
|
|
||||||
"--color-text": "#E6EDF3",
|
|
||||||
"--color-text-dark": "#F0F6FC",
|
|
||||||
"--color-text-light": "#C9D1D9",
|
|
||||||
"--color-text-light-1": "#B1BAC4",
|
|
||||||
"--color-text-light-2": "#8B949E",
|
|
||||||
"--color-text-light-3": "#6E7681",
|
|
||||||
"--color-code-bg": "#161B22",
|
|
||||||
"--color-code-sidebar-bg": "#0D1117",
|
|
||||||
"--color-markup-code-block": "rgba(240,246,252,0.06)",
|
|
||||||
"--color-hover": "rgba(240,246,252,0.08)",
|
|
||||||
"--color-active": "rgba(240,246,252,0.12)",
|
|
||||||
"--color-shadow": "rgba(1,4,9,0.45)",
|
|
||||||
"--color-light-border": "rgba(240,246,252,0.10)",
|
|
||||||
"--color-button": "#161B22",
|
|
||||||
"--color-label-text": "#E6EDF3",
|
|
||||||
"--color-success-text": CYAN_DARK_TEXT,
|
|
||||||
"--color-success-border": "#1E4C5C",
|
|
||||||
"--color-success-bg": "#0F2A33",
|
|
||||||
"--color-green": CYAN_DARK,
|
|
||||||
"--color-green-light": "#67E8F9",
|
|
||||||
"--color-green-dark-1": CYAN_DARK,
|
|
||||||
"--color-green-dark-2": "#0891B2",
|
|
||||||
"--color-teal": CYAN_DARK,
|
|
||||||
"--color-console-bg": "#0D1117",
|
|
||||||
"--color-console-border": "#30363D",
|
|
||||||
"--color-console-menu-bg": "#161B22",
|
|
||||||
}
|
|
||||||
|
|
||||||
HEX_RE = re.compile(r"#([0-9a-fA-F]{3,8})\b")
|
|
||||||
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------- 颜色工具
|
|
||||||
def hex_to_rgb(h):
|
|
||||||
h = h.lstrip("#")
|
|
||||||
if len(h) == 3:
|
|
||||||
h = "".join(c * 2 for c in h)
|
|
||||||
return tuple(int(h[i:i + 2], 16) for i in (0, 2, 4))
|
|
||||||
|
|
||||||
|
|
||||||
def rgb_to_hex(rgb):
|
|
||||||
return "#%02X%02X%02X" % tuple(max(0, min(255, round(v))) for v in rgb)
|
|
||||||
|
|
||||||
|
|
||||||
def mix(a, b, t):
|
|
||||||
"""把 a 向 b 混合 t(0..1)。"""
|
|
||||||
ra, rb = hex_to_rgb(a), hex_to_rgb(b)
|
|
||||||
return rgb_to_hex(tuple(ra[i] + (rb[i] - ra[i]) * t for i in range(3)))
|
|
||||||
|
|
||||||
|
|
||||||
def with_alpha(hex_color, pct):
|
|
||||||
"""#RRGGBB + 百分比 → #RRGGBBAA。"""
|
|
||||||
r, g, b = hex_to_rgb(hex_color)
|
|
||||||
return "#%02x%02x%02x%02x" % (r, g, b, round(pct / 100 * 255))
|
|
||||||
|
|
||||||
|
|
||||||
def degreen(match):
|
|
||||||
"""把绿色系(色相 60–170)统一转到青蓝 188°,保留明度/饱和度。"""
|
|
||||||
h = match.group(1)
|
|
||||||
if len(h) not in (3, 6):
|
|
||||||
return match.group(0)
|
|
||||||
r, g, b = hex_to_rgb(h)
|
|
||||||
hh, ll, ss = colorsys.rgb_to_hls(r / 255, g / 255, b / 255)
|
|
||||||
deg = hh * 360
|
|
||||||
if 60 <= deg <= 170 and ss > 0.08:
|
|
||||||
nr, ng, nb = colorsys.hls_to_rgb(188 / 360, ll, ss)
|
|
||||||
return "#%02x%02x%02x" % (round(nr * 255), round(ng * 255), round(nb * 255))
|
|
||||||
return match.group(0)
|
|
||||||
|
|
||||||
|
|
||||||
def primary_family(base, contrast, hover, active, toward_light, toward_dark):
|
|
||||||
"""生成 Gitea 需要的整套主色变量(深浅 7 级 + 透明度 9 级)。"""
|
|
||||||
fam = {
|
|
||||||
"--color-primary": base,
|
|
||||||
"--color-primary-contrast": contrast,
|
|
||||||
"--color-primary-hover": hover,
|
|
||||||
"--color-primary-active": active,
|
|
||||||
}
|
|
||||||
for n in range(1, 8): # dark-N:向浅色方向递进
|
|
||||||
fam[f"--color-primary-dark-{n}"] = mix(base, toward_light, n * 0.14)
|
|
||||||
for n in range(1, 8): # light-N:向深色方向递进
|
|
||||||
fam[f"--color-primary-light-{n}"] = mix(base, toward_dark, n * 0.11)
|
|
||||||
for n in range(1, 10):
|
|
||||||
fam[f"--color-primary-alpha-{n * 10}"] = with_alpha(base, n * 10)
|
|
||||||
return fam
|
|
||||||
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------- 解析官方 CSS
|
|
||||||
def extract_vars(path):
|
|
||||||
css = path.read_text(encoding="utf-8")
|
|
||||||
for m in re.finditer(r":root\s*\{([^{}]*)\}", css):
|
|
||||||
body = m.group(1)
|
|
||||||
if "--color-primary" not in body:
|
|
||||||
continue
|
|
||||||
out = {}
|
|
||||||
# 值里可能含 url("data:image/svg+xml;..."),分号必须受引号保护
|
|
||||||
for d in re.finditer(r"(--[a-z0-9-]+)\s*:\s*((?:[^;\"]|\"[^\"]*\")+)", body):
|
|
||||||
out[d.group(1)] = d.group(2).strip()
|
|
||||||
return out
|
|
||||||
raise SystemExit(f"未能在 {path} 中找到 :root 变量块")
|
|
||||||
|
|
||||||
|
|
||||||
def apply_palette(vars_in, surfaces, primary, contrast, hover, active,
|
|
||||||
toward_light, toward_dark, is_dark):
|
|
||||||
out = dict(vars_in)
|
|
||||||
out.update(surfaces)
|
|
||||||
out.update(primary_family(primary, contrast, hover, active, toward_light, toward_dark))
|
|
||||||
out["--color-accent"] = hover if not is_dark else active
|
|
||||||
out["--color-small-accent"] = mix(primary, "#FFFFFF" if not is_dark else "#000000", 0.45)
|
|
||||||
out["--is-dark-theme"] = "true" if is_dark else "false"
|
|
||||||
for k, v in list(out.items()):
|
|
||||||
# 内联 SVG 蒙版里的 #rrggbb 不能动,否则会破坏图标形状
|
|
||||||
out[k] = v if "url(" in v else HEX_RE.sub(degreen, v)
|
|
||||||
return out
|
|
||||||
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------- 输出
|
|
||||||
HEADER = """/*!
|
|
||||||
* Gitea 主题 · {title}
|
|
||||||
* 由 scripts/build_theme.py 从 Gitea {version} 官方 CSS 自动派生,请勿手改本文件。
|
|
||||||
* 视觉规范:蓝白 ins 风 —— 纯白 / 深墨底 + 清透蓝主色 + 零绿色。
|
|
||||||
* 生成时间以 Git 提交为准;重新生成:python3 scripts/build_theme.py
|
|
||||||
*/""".format(version=VERSION, title="{title}")
|
|
||||||
|
|
||||||
|
|
||||||
def render_var_block(vars_map, indent):
|
|
||||||
pad = " " * indent
|
|
||||||
return "\n".join(f"{pad}{k}:{vars_map[k]};" for k in sorted(vars_map))
|
|
||||||
|
|
||||||
|
|
||||||
def write_theme(path, title, blocks, display=None):
|
|
||||||
"""blocks: [(selector, indent_for_root, vars_map, extras)],selector 为 '@media ...{ :root{...} }' 时用 nested。
|
|
||||||
display: 写进 gitea-theme-meta-info 的显示名;Gitea 支持时主题选择器里就显示这个名字,而不是文件名。"""
|
|
||||||
parts = [HEADER.format(title=title), ""]
|
|
||||||
if display:
|
|
||||||
parts.extend([
|
|
||||||
"gitea-theme-meta-info {",
|
|
||||||
f' --theme-display-name: "{display}";',
|
|
||||||
"}",
|
|
||||||
"",
|
|
||||||
])
|
|
||||||
for selector, nested, vars_map, extras in blocks:
|
|
||||||
if not nested:
|
|
||||||
parts.append(f"{selector}" + "{")
|
|
||||||
parts.append(render_var_block(vars_map, 2))
|
|
||||||
parts.extend(f" {e};" for e in extras)
|
|
||||||
parts.append("}")
|
|
||||||
else: # @media 包裹
|
|
||||||
parts.append(f"{selector}")
|
|
||||||
parts.append(" :root{")
|
|
||||||
parts.append(render_var_block(vars_map, 4))
|
|
||||||
parts.extend(f" {e};" for e in extras)
|
|
||||||
parts.append(" }")
|
|
||||||
parts.append("}")
|
|
||||||
parts.append("")
|
|
||||||
path.write_text("\n".join(parts), encoding="utf-8")
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
|
||||||
light_src = extract_vars(VENDOR / f"index-{VERSION}.css")
|
|
||||||
dark_src = extract_vars(VENDOR / f"theme-auto-{VERSION}.css")
|
|
||||||
|
|
||||||
light = apply_palette(
|
|
||||||
light_src, LIGHT_SURFACES, LIGHT_PRIMARY, LIGHT_PRIMARY_CONTRAST,
|
|
||||||
LIGHT_HOVER, LIGHT_ACTIVE,
|
|
||||||
toward_light="#FFFFFF", toward_dark="#0F172A", is_dark=False,
|
|
||||||
)
|
|
||||||
# 深色块 = 浅色变量全集打底(官方深色块只覆盖部分键),再叠深色台面与主色
|
|
||||||
dark_base = {k: v for k, v in light.items()}
|
|
||||||
dark = apply_palette(
|
|
||||||
dark_base, DARK_SURFACES, DARK_PRIMARY, DARK_PRIMARY_CONTRAST,
|
|
||||||
DARK_HOVER, DARK_ACTIVE,
|
|
||||||
toward_light="#F0F6FC", toward_dark="#010409", is_dark=True,
|
|
||||||
)
|
|
||||||
# 官方深色块里显式声明过的键优先(例如 --color-diff-* 的深色取值)
|
|
||||||
for k, v in dark_src.items():
|
|
||||||
if k in dark and k not in DARK_SURFACES and not k.startswith("--color-primary"):
|
|
||||||
dark[k] = v if "url(" in v else HEX_RE.sub(degreen, v)
|
|
||||||
|
|
||||||
OUT.mkdir(parents=True, exist_ok=True)
|
|
||||||
light_extras = ["color-scheme:light", "accent-color:var(--color-primary)"]
|
|
||||||
dark_extras = ["color-scheme:dark", "accent-color:var(--color-primary)"]
|
|
||||||
|
|
||||||
write_theme(OUT / "theme-qq-light.css", "qq-light(蓝白 ins 风 · 仅浅色)",
|
|
||||||
[(":root", False, light, light_extras)], display="QQGit · 浅色")
|
|
||||||
write_theme(OUT / "theme-qq-dark.css", "qq-dark(蓝白 ins 风 · 仅深色)",
|
|
||||||
[(":root", False, dark, dark_extras)], display="QQGit · 深色")
|
|
||||||
write_theme(OUT / "theme-qq-auto.css", "qq(蓝白 ins 风 · 日夜自动跟随系统)",
|
|
||||||
[(":root", False, light, light_extras),
|
|
||||||
("@media (prefers-color-scheme:dark) {", True, dark, dark_extras)],
|
|
||||||
display="QQGit · 跟随系统")
|
|
||||||
|
|
||||||
for name, data in (("theme-qq-auto.css", light), ("theme-qq-light.css", light), ("theme-qq-dark.css", dark)):
|
|
||||||
p = OUT / name
|
|
||||||
print(f"{name:22s} {p.stat().st_size:>7d} bytes vars={len(data)}")
|
|
||||||
print(f"浅色 primary={light['--color-primary']} body={light['--color-body']}")
|
|
||||||
print(f"深色 primary={dark['--color-primary']} body={dark['--color-body']}")
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
sys.exit(main())
|
|
||||||
|
|
@ -1,54 +0,0 @@
|
||||||
"""预览页自检:确认 preview / qq-ui / 模板之间没有对不上的 CSS 变量或类名。
|
|
||||||
|
|
||||||
用法:python3 scripts/check_preview.py
|
|
||||||
"""
|
|
||||||
import pathlib
|
|
||||||
import re
|
|
||||||
import sys
|
|
||||||
|
|
||||||
ROOT = pathlib.Path(__file__).resolve().parent.parent
|
|
||||||
CSS = ROOT / 'custom/public/assets/css'
|
|
||||||
OWN = {'--qq-font-mono', '--disc', '--mark'}
|
|
||||||
|
|
||||||
|
|
||||||
def vars_in(p):
|
|
||||||
out = set()
|
|
||||||
for v in re.findall(r'--[a-z0-9-]+', pathlib.Path(p).read_text(encoding="utf-8")):
|
|
||||||
if v.strip('-') and not v.endswith('-'):
|
|
||||||
out.add(v)
|
|
||||||
return out
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
|
||||||
used = (vars_in(ROOT / 'preview/preview.css')
|
|
||||||
| vars_in(ROOT / 'preview/index.html')
|
|
||||||
| vars_in(CSS / 'qq-ui.css'))
|
|
||||||
light = vars_in(CSS / 'theme-qq-light.css')
|
|
||||||
dark = vars_in(CSS / 'theme-qq-dark.css')
|
|
||||||
|
|
||||||
ok = True
|
|
||||||
for name, defined in (('light', light), ('dark', dark)):
|
|
||||||
missing = sorted(used - defined - OWN)
|
|
||||||
print(f'{name:5s} 缺失变量: {missing if missing else "无"}')
|
|
||||||
ok = ok and not missing
|
|
||||||
|
|
||||||
tmpl = (ROOT / 'custom/templates/home.tmpl').read_text(encoding="utf-8")
|
|
||||||
classes = sorted({c for group in re.findall(r'class="([^"]+)"', tmpl) for c in group.split()})
|
|
||||||
ui = (CSS / 'qq-ui.css').read_text(encoding="utf-8")
|
|
||||||
for cls in ('qq-home-cards', 'qq-home-card', 'qq-footer', 'page-content'):
|
|
||||||
has = ('.' + cls) in ui
|
|
||||||
print(f'qq-ui 含 .{cls}: {has}')
|
|
||||||
ok = ok and has
|
|
||||||
|
|
||||||
auto = (CSS / 'theme-qq-auto.css').read_text(encoding="utf-8").replace(' ', '')
|
|
||||||
has_media = '@media(prefers-color-scheme:dark)' in auto
|
|
||||||
print('theme-qq-auto 含日夜媒体查询:', has_media)
|
|
||||||
ok = ok and has_media
|
|
||||||
|
|
||||||
print('模板类名:', ' '.join(classes))
|
|
||||||
print('\n结论:', '通过' if ok else '有问题')
|
|
||||||
return 0 if ok else 1
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
sys.exit(main())
|
|
||||||
|
|
@ -1,160 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
# =============================================================================
|
|
||||||
# deploy.sh —— 把工作目录里验收通过的 custom/ 同步到线上 Gitea
|
|
||||||
#
|
|
||||||
# 默认:只做预演,打印动作,不修改线上文件。
|
|
||||||
# 真正执行:必须显式加 --yes;只有 QQ 明确同意后才能运行。
|
|
||||||
# =============================================================================
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
REPO_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
||||||
SRC_CUSTOM="$REPO_DIR/custom"
|
|
||||||
DST_CUSTOM="/var/lib/gitea/custom"
|
|
||||||
APP_INI="/etc/gitea/app.ini"
|
|
||||||
STAMP="$(date +%Y%m%d-%H%M%S)"
|
|
||||||
BACKUP="/var/backups/gitea-custom-$STAMP.tar.gz"
|
|
||||||
|
|
||||||
DO_IT=0
|
|
||||||
PATCH_INI=0
|
|
||||||
for arg in "$@"; do
|
|
||||||
case "$arg" in
|
|
||||||
--yes) DO_IT=1 ;;
|
|
||||||
--patch-ini) PATCH_INI=1 ;;
|
|
||||||
-h|--help) sed -n '2,8p' "$0"; exit 0 ;;
|
|
||||||
*) echo "未知参数: $arg" >&2; exit 2 ;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
say() { printf '\033[36m==>\033[0m %s\n' "$*"; }
|
|
||||||
warn() { printf '\033[33m[!]\033[0m %s\n' "$*"; }
|
|
||||||
fail() { printf '\033[31m[错误]\033[0m %s\n' "$*" >&2; exit 1; }
|
|
||||||
|
|
||||||
[ -d "$SRC_CUSTOM" ] || fail "找不到 $SRC_CUSTOM"
|
|
||||||
for required in \
|
|
||||||
templates/base/footer_content.tmpl \
|
|
||||||
public/assets/css/qq-pages.css \
|
|
||||||
public/assets/css/theme-qq-auto.css \
|
|
||||||
public/assets/css/theme-qq-light.css \
|
|
||||||
public/assets/css/theme-qq-dark.css; do
|
|
||||||
[ -f "$SRC_CUSTOM/$required" ] || fail "源码缺少关键文件:custom/$required"
|
|
||||||
done
|
|
||||||
|
|
||||||
say "源目录:$SRC_CUSTOM"
|
|
||||||
find "$SRC_CUSTOM" -type f | sed "s|$SRC_CUSTOM/| custom/|" | sort
|
|
||||||
|
|
||||||
if [ "$DO_IT" -eq 0 ]; then
|
|
||||||
say "预演:加 --yes 后会执行"
|
|
||||||
echo " 1) 完整备份 $DST_CUSTOM 与 $APP_INI -> $BACKUP"
|
|
||||||
echo " 2) 校验备份含 app.ini、QQ 主题与关键模板"
|
|
||||||
echo " 3) rsync --delete-delay 同步 custom/(保留线上额外的 theme-*.css)"
|
|
||||||
echo " 4) 修正权限、重启并执行 HTTP 健康检查"
|
|
||||||
echo " 5) 任一步骤失败时调用 rollback.sh 精确回滚"
|
|
||||||
[ "$PATCH_INI" -eq 1 ] && echo " 6) 同步改写 $APP_INI 的 [ui] DEFAULT_THEME / THEMES"
|
|
||||||
echo
|
|
||||||
warn "线上未做任何修改。获得 QQ 明确批准后才能执行:./scripts/deploy.sh --yes"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
say "完整备份到 $BACKUP"
|
|
||||||
sudo mkdir -p /var/backups
|
|
||||||
sudo tar czf "$BACKUP" -C / var/lib/gitea/custom etc/gitea/app.ini
|
|
||||||
sudo chmod 600 "$BACKUP"
|
|
||||||
sudo tar tzf "$BACKUP" >/dev/null
|
|
||||||
for required in \
|
|
||||||
var/lib/gitea/custom/templates/base/footer_content.tmpl \
|
|
||||||
var/lib/gitea/custom/public/assets/css/qq-pages.css \
|
|
||||||
var/lib/gitea/custom/public/assets/css/theme-qq-auto.css \
|
|
||||||
var/lib/gitea/custom/public/assets/css/theme-qq-light.css \
|
|
||||||
var/lib/gitea/custom/public/assets/css/theme-qq-dark.css \
|
|
||||||
etc/gitea/app.ini; do
|
|
||||||
sudo tar tzf "$BACKUP" | grep -Fx "$required" >/dev/null || fail "备份缺少关键文件:$required"
|
|
||||||
done
|
|
||||||
say "备份校验通过:$(sudo du -h "$BACKUP" | cut -f1)"
|
|
||||||
|
|
||||||
rollback_on_failure() {
|
|
||||||
trap - ERR
|
|
||||||
warn "部署验证失败,立即从 $BACKUP 精确回滚"
|
|
||||||
"$REPO_DIR/scripts/rollback.sh" --yes "$BACKUP" || {
|
|
||||||
printf '\033[31m[严重]\033[0m 自动回滚失败,请立即人工处理。备份:%s\n' "$BACKUP" >&2
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
fail "部署失败,已恢复到部署前状态"
|
|
||||||
}
|
|
||||||
trap 'rollback_on_failure' ERR
|
|
||||||
|
|
||||||
say "同步 custom/ -> $DST_CUSTOM/"
|
|
||||||
sudo mkdir -p "$DST_CUSTOM"
|
|
||||||
# theme-*.css 可能是管理员另外安装的旧主题;保护它们不被 --delete 删除,
|
|
||||||
# 同名 QQ 主题仍会从源码正常更新。
|
|
||||||
if ! sudo rsync -a --delete-delay \
|
|
||||||
--exclude='.git*' \
|
|
||||||
--filter='protect public/assets/css/theme-*.css' \
|
|
||||||
"$SRC_CUSTOM/" "$DST_CUSTOM/"; then
|
|
||||||
rollback_on_failure
|
|
||||||
fi
|
|
||||||
sudo chown -R git:git "$DST_CUSTOM"
|
|
||||||
|
|
||||||
if [ "$PATCH_INI" -eq 1 ]; then
|
|
||||||
say "改写 $APP_INI 的 [ui] 段"
|
|
||||||
sudo cp -a "$APP_INI" "$APP_INI.bak-$STAMP"
|
|
||||||
if ! sudo python3 - "$APP_INI" <<'PY'
|
|
||||||
import pathlib
|
|
||||||
import sys
|
|
||||||
|
|
||||||
p = pathlib.Path(sys.argv[1])
|
|
||||||
txt = p.read_text(encoding="utf-8")
|
|
||||||
themes = ["auto", "gitea", "arc-green", "gitea-gruvbox",
|
|
||||||
"github-auto", "github-light", "github-dark", "github-soft-dark",
|
|
||||||
"qq-auto", "qq-light", "qq-dark"]
|
|
||||||
lines = txt.splitlines()
|
|
||||||
out, in_ui = [], False
|
|
||||||
seen = set()
|
|
||||||
for line in lines:
|
|
||||||
stripped = line.strip()
|
|
||||||
if stripped.startswith("[") and stripped.endswith("]"):
|
|
||||||
in_ui = stripped == "[ui]"
|
|
||||||
if in_ui:
|
|
||||||
if stripped.lower().startswith("default_theme"):
|
|
||||||
out.append("DEFAULT_THEME = qq-auto")
|
|
||||||
seen.add("default")
|
|
||||||
continue
|
|
||||||
if stripped.lower().startswith("themes"):
|
|
||||||
out.append("THEMES = " + ",".join(themes))
|
|
||||||
seen.add("themes")
|
|
||||||
continue
|
|
||||||
out.append(line)
|
|
||||||
if "default" not in seen or "themes" not in seen:
|
|
||||||
updated = []
|
|
||||||
for line in out:
|
|
||||||
updated.append(line)
|
|
||||||
if line.strip() == "[ui]":
|
|
||||||
if "default" not in seen:
|
|
||||||
updated.append("DEFAULT_THEME = qq-auto")
|
|
||||||
if "themes" not in seen:
|
|
||||||
updated.append("THEMES = " + ",".join(themes))
|
|
||||||
out = updated
|
|
||||||
p.write_text("\n".join(out) + "\n", encoding="utf-8")
|
|
||||||
PY
|
|
||||||
then
|
|
||||||
rollback_on_failure
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
say "重启 Gitea"
|
|
||||||
if ! sudo systemctl restart gitea; then
|
|
||||||
rollback_on_failure
|
|
||||||
fi
|
|
||||||
|
|
||||||
healthy=0
|
|
||||||
for _ in 1 2 3 4 5; do
|
|
||||||
if systemctl is-active --quiet gitea && \
|
|
||||||
(! command -v curl >/dev/null || curl -fsS -o /dev/null https://git.qyhhh.top/); then
|
|
||||||
healthy=1
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
sleep 2
|
|
||||||
done
|
|
||||||
[ "$healthy" -eq 1 ] || rollback_on_failure
|
|
||||||
|
|
||||||
say "部署完成,Gitea 运行正常"
|
|
||||||
echo "回滚命令:./scripts/rollback.sh $BACKUP"
|
|
||||||
|
|
@ -1,114 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
# =============================================================================
|
|
||||||
# rollback.sh —— 从 /var/backups 的完整快照精确还原线上 custom/ 与 app.ini
|
|
||||||
#
|
|
||||||
# ./scripts/rollback.sh --list
|
|
||||||
# ./scripts/rollback.sh <备份文件> # 交互确认
|
|
||||||
# ./scripts/rollback.sh --yes <备份文件> # 自动确认(供 deploy.sh 失败回滚)
|
|
||||||
# ./scripts/rollback.sh --allow-incomplete <旧备份> # 允许缺少 QQ 主题的历史备份
|
|
||||||
# =============================================================================
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
BACKUP_DIR="/var/backups"
|
|
||||||
DST_CUSTOM="/var/lib/gitea/custom"
|
|
||||||
APP_INI="/etc/gitea/app.ini"
|
|
||||||
STAMP="$(date +%Y%m%d-%H%M%S)"
|
|
||||||
DO_IT=0
|
|
||||||
ALLOW_INCOMPLETE=0
|
|
||||||
BACKUP=""
|
|
||||||
|
|
||||||
say() { printf '\033[36m==>\033[0m %s\n' "$*"; }
|
|
||||||
warn() { printf '\033[33m[!]\033[0m %s\n' "$*"; }
|
|
||||||
fail() { printf '\033[31m[错误]\033[0m %s\n' "$*" >&2; exit 1; }
|
|
||||||
|
|
||||||
for arg in "$@"; do
|
|
||||||
case "$arg" in
|
|
||||||
--yes) DO_IT=1 ;;
|
|
||||||
--allow-incomplete) ALLOW_INCOMPLETE=1 ;;
|
|
||||||
--list) ;;
|
|
||||||
-h|--help)
|
|
||||||
sed -n '2,9p' "$0"
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
-*) fail "未知参数:$arg" ;;
|
|
||||||
*)
|
|
||||||
[ -z "$BACKUP" ] || fail "只能指定一个备份文件"
|
|
||||||
BACKUP="$arg"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ -z "$BACKUP" ]; then
|
|
||||||
echo "可用备份(新的在上):"
|
|
||||||
ls -1t "$BACKUP_DIR"/gitea-custom-*.tar.gz 2>/dev/null || echo " (没有找到备份)"
|
|
||||||
echo
|
|
||||||
echo "还原用法:./scripts/rollback.sh $BACKUP_DIR/gitea-custom-<时间戳>.tar.gz"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
[ -f "$BACKUP" ] || fail "备份不存在:$BACKUP"
|
|
||||||
|
|
||||||
say "校验备份完整性"
|
|
||||||
sudo tar tzf "$BACKUP" >/dev/null
|
|
||||||
if sudo tar tzf "$BACKUP" | grep -E '(^/|(^|/)\.\.(/|$))' >/dev/null; then
|
|
||||||
fail "备份包含不安全路径,拒绝解包"
|
|
||||||
fi
|
|
||||||
for required in \
|
|
||||||
var/lib/gitea/custom/templates/base/footer_content.tmpl \
|
|
||||||
var/lib/gitea/custom/public/assets/css/qq-pages.css \
|
|
||||||
etc/gitea/app.ini; do
|
|
||||||
sudo tar tzf "$BACKUP" | grep -Fx "$required" >/dev/null || fail "备份缺少关键文件:$required"
|
|
||||||
done
|
|
||||||
|
|
||||||
missing_themes=0
|
|
||||||
for theme in theme-qq-auto.css theme-qq-light.css theme-qq-dark.css; do
|
|
||||||
if ! sudo tar tzf "$BACKUP" | grep -Fx "var/lib/gitea/custom/public/assets/css/$theme" >/dev/null; then
|
|
||||||
warn "备份缺少 $theme"
|
|
||||||
missing_themes=1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if [ "$missing_themes" -eq 1 ] && [ "$ALLOW_INCOMPLETE" -ne 1 ]; then
|
|
||||||
fail "这是历史不完整备份。默认拒绝精确回滚;确认承担主题文件缺失风险后才可加 --allow-incomplete"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$DO_IT" -ne 1 ]; then
|
|
||||||
echo "将精确还原 $BACKUP:"
|
|
||||||
echo " 1) 先完整备份当前 custom/ 与 app.ini"
|
|
||||||
echo " 2) 解包到临时目录并再次校验"
|
|
||||||
echo " 3) 停止 Gitea,以 rsync --delete 精确还原 custom/"
|
|
||||||
echo " 4) 还原 app.ini、权限并启动 Gitea"
|
|
||||||
read -r -p "确认还原?(y/N) " ans
|
|
||||||
[ "$ans" = "y" ] || [ "$ans" = "Y" ] || { echo "已取消"; exit 0; }
|
|
||||||
fi
|
|
||||||
|
|
||||||
TMP_DIR="$(mktemp -d)"
|
|
||||||
trap 'sudo rm -rf "$TMP_DIR"' EXIT
|
|
||||||
sudo tar xzf "$BACKUP" -C "$TMP_DIR"
|
|
||||||
SRC_CUSTOM="$TMP_DIR/var/lib/gitea/custom"
|
|
||||||
SRC_APP_INI="$TMP_DIR/etc/gitea/app.ini"
|
|
||||||
[ -d "$SRC_CUSTOM" ] || fail "解包后找不到 custom/"
|
|
||||||
[ -f "$SRC_APP_INI" ] || fail "解包后找不到 app.ini"
|
|
||||||
|
|
||||||
SAFETY_BACKUP="$BACKUP_DIR/gitea-pre-rollback-$STAMP.tar.gz"
|
|
||||||
say "回滚前保护当前状态:$SAFETY_BACKUP"
|
|
||||||
sudo tar czf "$SAFETY_BACKUP" -C / var/lib/gitea/custom etc/gitea/app.ini
|
|
||||||
sudo chmod 600 "$SAFETY_BACKUP"
|
|
||||||
|
|
||||||
say "停止 Gitea 并精确还原"
|
|
||||||
sudo systemctl stop gitea
|
|
||||||
sudo mkdir -p "$DST_CUSTOM"
|
|
||||||
sudo rsync -a --delete "$SRC_CUSTOM/" "$DST_CUSTOM/"
|
|
||||||
sudo cp -a "$SRC_APP_INI" "$APP_INI"
|
|
||||||
sudo chown -R git:git "$DST_CUSTOM"
|
|
||||||
sudo systemctl start gitea
|
|
||||||
sleep 2
|
|
||||||
|
|
||||||
if ! systemctl is-active --quiet gitea; then
|
|
||||||
fail "Gitea 未能启动;回滚前状态保存在 $SAFETY_BACKUP"
|
|
||||||
fi
|
|
||||||
if command -v curl >/dev/null && ! curl -fsS -o /dev/null https://git.qyhhh.top/; then
|
|
||||||
fail "Gitea 已启动但站点健康检查失败;回滚前状态保存在 $SAFETY_BACKUP"
|
|
||||||
fi
|
|
||||||
|
|
||||||
say "还原完成,Gitea 运行正常"
|
|
||||||
echo "回滚前状态备份:$SAFETY_BACKUP"
|
|
||||||
|
|
@ -1,127 +0,0 @@
|
||||||
<div id="activity-feed" class="flex-list">
|
|
||||||
{{range .Feeds}}
|
|
||||||
<div class="flex-item">
|
|
||||||
<div class="flex-item-leading">
|
|
||||||
{{ctx.AvatarUtils.AvatarByAction .}}
|
|
||||||
</div>
|
|
||||||
<div class="flex-item-main gt-gap-3">
|
|
||||||
<div>
|
|
||||||
{{if gt .ActUser.ID 0}}
|
|
||||||
<a href="{{AppSubUrl}}/{{(.GetActUserName ctx) | PathEscape}}" title="{{.GetDisplayNameTitle ctx}}">{{.GetDisplayName ctx}}</a>
|
|
||||||
{{else}}
|
|
||||||
{{.ShortActUserName ctx}}
|
|
||||||
{{end}}
|
|
||||||
{{if .GetOpType.InActions "create_repo"}}
|
|
||||||
{{ctx.Locale.Tr "action.create_repo" ((.GetRepoLink ctx)|Escape) ((.ShortRepoPath ctx)|Escape) | Str2html}}
|
|
||||||
{{else if .GetOpType.InActions "rename_repo"}}
|
|
||||||
{{ctx.Locale.Tr "action.rename_repo" (.GetContent|Escape) ((.GetRepoLink ctx)|Escape) ((.ShortRepoPath ctx)|Escape) | Str2html}}
|
|
||||||
{{else if .GetOpType.InActions "commit_repo"}}
|
|
||||||
{{if .Content}}
|
|
||||||
{{ctx.Locale.Tr "action.commit_repo" ((.GetRepoLink ctx)|Escape) ((.GetRefLink ctx)|Escape) (Escape .GetBranch) ((.ShortRepoPath ctx)|Escape) | Str2html}}
|
|
||||||
{{else}}
|
|
||||||
{{ctx.Locale.Tr "action.create_branch" ((.GetRepoLink ctx)|Escape) ((.GetRefLink ctx)|Escape) (Escape .GetBranch) ((.ShortRepoPath ctx)|Escape) | Str2html}}
|
|
||||||
{{end}}
|
|
||||||
{{else if .GetOpType.InActions "create_issue"}}
|
|
||||||
{{$index := index .GetIssueInfos 0}}
|
|
||||||
{{ctx.Locale.Tr "action.create_issue" ((printf "%s/issues/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape) | Str2html}}
|
|
||||||
{{else if .GetOpType.InActions "create_pull_request"}}
|
|
||||||
{{$index := index .GetIssueInfos 0}}
|
|
||||||
{{ctx.Locale.Tr "action.create_pull_request" ((printf "%s/pulls/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape) | Str2html}}
|
|
||||||
{{else if .GetOpType.InActions "transfer_repo"}}
|
|
||||||
{{ctx.Locale.Tr "action.transfer_repo" .GetContent ((.GetRepoLink ctx)|Escape) ((.ShortRepoPath ctx)|Escape) | Str2html}}
|
|
||||||
{{else if .GetOpType.InActions "push_tag"}}
|
|
||||||
{{ctx.Locale.Tr "action.push_tag" ((.GetRepoLink ctx)|Escape) ((.GetRefLink ctx)|Escape) (.GetTag|Escape) ((.ShortRepoPath ctx)|Escape) | Str2html}}
|
|
||||||
{{else if .GetOpType.InActions "comment_issue"}}
|
|
||||||
{{$index := index .GetIssueInfos 0}}
|
|
||||||
{{ctx.Locale.Tr "action.comment_issue" ((printf "%s/issues/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape) | Str2html}}
|
|
||||||
{{else if .GetOpType.InActions "merge_pull_request"}}
|
|
||||||
{{$index := index .GetIssueInfos 0}}
|
|
||||||
{{ctx.Locale.Tr "action.merge_pull_request" ((printf "%s/pulls/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape) | Str2html}}
|
|
||||||
{{else if .GetOpType.InActions "close_issue"}}
|
|
||||||
{{$index := index .GetIssueInfos 0}}
|
|
||||||
{{ctx.Locale.Tr "action.close_issue" ((printf "%s/issues/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape) | Str2html}}
|
|
||||||
{{else if .GetOpType.InActions "reopen_issue"}}
|
|
||||||
{{$index := index .GetIssueInfos 0}}
|
|
||||||
{{ctx.Locale.Tr "action.reopen_issue" ((printf "%s/issues/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape) | Str2html}}
|
|
||||||
{{else if .GetOpType.InActions "close_pull_request"}}
|
|
||||||
{{$index := index .GetIssueInfos 0}}
|
|
||||||
{{ctx.Locale.Tr "action.close_pull_request" ((printf "%s/pulls/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape) | Str2html}}
|
|
||||||
{{else if .GetOpType.InActions "reopen_pull_request"}}
|
|
||||||
{{$index := index .GetIssueInfos 0}}
|
|
||||||
{{ctx.Locale.Tr "action.reopen_pull_request" ((printf "%s/pulls/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape) | Str2html}}
|
|
||||||
{{else if .GetOpType.InActions "delete_tag"}}
|
|
||||||
{{$index := index .GetIssueInfos 0}}
|
|
||||||
{{ctx.Locale.Tr "action.delete_tag" ((.GetRepoLink ctx)|Escape) (.GetTag|Escape) ((.ShortRepoPath ctx)|Escape) | Str2html}}
|
|
||||||
{{else if .GetOpType.InActions "delete_branch"}}
|
|
||||||
{{$index := index .GetIssueInfos 0}}
|
|
||||||
{{ctx.Locale.Tr "action.delete_branch" ((.GetRepoLink ctx)|Escape) (.GetBranch|Escape) ((.ShortRepoPath ctx)|Escape) | Str2html}}
|
|
||||||
{{else if .GetOpType.InActions "mirror_sync_push"}}
|
|
||||||
{{ctx.Locale.Tr "action.mirror_sync_push" ((.GetRepoLink ctx)|Escape) ((.GetRefLink ctx)|Escape) (.GetBranch|Escape) ((.ShortRepoPath ctx)|Escape) | Str2html}}
|
|
||||||
{{else if .GetOpType.InActions "mirror_sync_create"}}
|
|
||||||
{{ctx.Locale.Tr "action.mirror_sync_create" ((.GetRepoLink ctx)|Escape) ((.GetRefLink ctx)|Escape) (.GetBranch|Escape) ((.ShortRepoPath ctx)|Escape) | Str2html}}
|
|
||||||
{{else if .GetOpType.InActions "mirror_sync_delete"}}
|
|
||||||
{{ctx.Locale.Tr "action.mirror_sync_delete" ((.GetRepoLink ctx)|Escape) (.GetBranch|Escape) ((.ShortRepoPath ctx)|Escape) | Str2html}}
|
|
||||||
{{else if .GetOpType.InActions "approve_pull_request"}}
|
|
||||||
{{$index := index .GetIssueInfos 0}}
|
|
||||||
{{ctx.Locale.Tr "action.approve_pull_request" ((printf "%s/pulls/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape) | Str2html}}
|
|
||||||
{{else if .GetOpType.InActions "reject_pull_request"}}
|
|
||||||
{{$index := index .GetIssueInfos 0}}
|
|
||||||
{{ctx.Locale.Tr "action.reject_pull_request" ((printf "%s/pulls/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape) | Str2html}}
|
|
||||||
{{else if .GetOpType.InActions "comment_pull"}}
|
|
||||||
{{$index := index .GetIssueInfos 0}}
|
|
||||||
{{ctx.Locale.Tr "action.comment_pull" ((printf "%s/pulls/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape) | Str2html}}
|
|
||||||
{{else if .GetOpType.InActions "publish_release"}}
|
|
||||||
{{$linkText := .Content | RenderEmoji $.Context}}
|
|
||||||
{{ctx.Locale.Tr "action.publish_release" ((.GetRepoLink ctx)|Escape) ((printf "%s/releases/tag/%s" (.GetRepoLink ctx) .GetTag)|Escape) ((.ShortRepoPath ctx)|Escape) $linkText | Str2html}}
|
|
||||||
{{else if .GetOpType.InActions "review_dismissed"}}
|
|
||||||
{{$index := index .GetIssueInfos 0}}
|
|
||||||
{{$reviewer := index .GetIssueInfos 1}}
|
|
||||||
{{ctx.Locale.Tr "action.review_dismissed" ((printf "%s/pulls/%s" (.GetRepoLink ctx) $index) |Escape) $index ((.ShortRepoPath ctx)|Escape) $reviewer | Str2html}}
|
|
||||||
{{end}}
|
|
||||||
{{TimeSince .GetCreate ctx.Locale}}
|
|
||||||
</div>
|
|
||||||
{{if .GetOpType.InActions "commit_repo" "mirror_sync_push"}}
|
|
||||||
{{$push := ActionContent2Commits .}}
|
|
||||||
{{$repoLink := (.GetRepoLink ctx)}}
|
|
||||||
{{$repo := .Repo}}
|
|
||||||
<div class="gt-df gt-fc gt-gap-2">
|
|
||||||
{{range $push.Commits}}
|
|
||||||
{{$commitLink := printf "%s/commit/%s" $repoLink .Sha1}}
|
|
||||||
<div class="flex-text-block">
|
|
||||||
<img class="ui avatar" src="{{$push.AvatarLink $.Context .AuthorEmail}}" title="{{.AuthorName}}" width="16" height="16">
|
|
||||||
<a class="ui sha label" href="{{$commitLink}}">{{ShortSha .Sha1}}</a>
|
|
||||||
<span class="text truncate">
|
|
||||||
{{RenderCommitMessage $.Context .Message $repo.ComposeMetas}}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
</div>
|
|
||||||
{{if and (gt $push.Len 1) $push.CompareURL}}
|
|
||||||
<a href="{{AppSubUrl}}/{{$push.CompareURL}}">{{ctx.Locale.Tr "action.compare_commits" $push.Len}} »</a>
|
|
||||||
{{end}}
|
|
||||||
{{else if .GetOpType.InActions "create_issue"}}
|
|
||||||
<span class="text truncate issue title">{{index .GetIssueInfos 1 | RenderEmoji $.Context | RenderCodeBlock}}</span>
|
|
||||||
{{else if .GetOpType.InActions "create_pull_request"}}
|
|
||||||
<span class="text truncate issue title">{{index .GetIssueInfos 1 | RenderEmoji $.Context | RenderCodeBlock}}</span>
|
|
||||||
{{else if .GetOpType.InActions "comment_issue" "approve_pull_request" "reject_pull_request" "comment_pull"}}
|
|
||||||
<a href="{{.GetCommentLink ctx}}" class="text truncate issue title">{{(.GetIssueTitle ctx) | RenderEmoji $.Context | RenderCodeBlock}}</a>
|
|
||||||
{{$comment := index .GetIssueInfos 1}}
|
|
||||||
{{if $comment}}
|
|
||||||
<div class="markup gt-font-14">{{RenderMarkdownToHtml ctx $comment}}</div>
|
|
||||||
{{end}}
|
|
||||||
{{else if .GetOpType.InActions "merge_pull_request"}}
|
|
||||||
<div class="flex-item-body text black">{{index .GetIssueInfos 1}}</div>
|
|
||||||
{{else if .GetOpType.InActions "close_issue" "reopen_issue" "close_pull_request" "reopen_pull_request"}}
|
|
||||||
<span class="text truncate issue title">{{(.GetIssueTitle ctx) | RenderEmoji $.Context | RenderCodeBlock}}</span>
|
|
||||||
{{else if .GetOpType.InActions "pull_review_dismissed"}}
|
|
||||||
<div class="flex-item-body text black">{{ctx.Locale.Tr "action.review_dismissed_reason"}}</div>
|
|
||||||
<div class="flex-item-body text black">{{index .GetIssueInfos 2 | RenderEmoji $.Context}}</div>
|
|
||||||
{{end}}
|
|
||||||
</div>
|
|
||||||
<div class="flex-item-trailing">
|
|
||||||
{{svg (printf "octicon-%s" (ActionIcon .GetOpType)) 32 "text grey gt-mr-2"}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
{{template "base/paginate" .}}
|
|
||||||
</div>
|
|
||||||
|
|
@ -1,108 +0,0 @@
|
||||||
<div class="dashboard-navbar">
|
|
||||||
<div class="ui secondary stackable menu">
|
|
||||||
<div class="item">
|
|
||||||
<div class="ui floating dropdown jump">
|
|
||||||
<span class="text truncated-item-container">
|
|
||||||
{{ctx.AvatarUtils.Avatar .ContextUser}}
|
|
||||||
<span class="truncated-item-name">{{.ContextUser.ShortName 40}}</span>
|
|
||||||
<span class="org-visibility">
|
|
||||||
{{if .ContextUser.Visibility.IsLimited}}<div class="ui basic tiny horizontal label">{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}}
|
|
||||||
{{if .ContextUser.Visibility.IsPrivate}}<div class="ui basic tiny horizontal label">{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}</div>{{end}}
|
|
||||||
</span>
|
|
||||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
|
||||||
</span>
|
|
||||||
<div class="context user overflow menu">
|
|
||||||
<div class="ui header">
|
|
||||||
{{ctx.Locale.Tr "home.switch_dashboard_context"}}
|
|
||||||
</div>
|
|
||||||
<div class="scrolling menu items">
|
|
||||||
<a class="{{if eq .ContextUser.ID .SignedUser.ID}}active selected{{end}} item truncated-item-container" href="{{AppSubUrl}}/{{if .PageIsIssues}}issues{{else if .PageIsPulls}}pulls{{else if .PageIsMilestonesDashboard}}milestones{{end}}">
|
|
||||||
{{ctx.AvatarUtils.Avatar .SignedUser}}
|
|
||||||
<span class="truncated-item-name">{{.SignedUser.ShortName 40}}</span>
|
|
||||||
<span class="org-visibility">
|
|
||||||
{{if .SignedUser.Visibility.IsLimited}}<div class="ui basic tiny horizontal label">{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}}
|
|
||||||
{{if .SignedUser.Visibility.IsPrivate}}<div class="ui basic tiny horizontal label">{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}</div>{{end}}
|
|
||||||
</span>
|
|
||||||
</a>
|
|
||||||
{{range .Orgs}}
|
|
||||||
<a class="{{if eq $.ContextUser.ID .ID}}active selected{{end}} item truncated-item-container" title="{{.Name}}" href="{{.OrganisationLink}}/{{if $.PageIsIssues}}issues{{else if $.PageIsPulls}}pulls{{else if $.PageIsMilestonesDashboard}}milestones{{else}}dashboard{{end}}">
|
|
||||||
{{ctx.AvatarUtils.Avatar .}}
|
|
||||||
<span class="truncated-item-name">{{.ShortName 40}}</span>
|
|
||||||
<span class="org-visibility">
|
|
||||||
{{if .Visibility.IsLimited}}<div class="ui basic tiny horizontal label">{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}}
|
|
||||||
{{if .Visibility.IsPrivate}}<div class="ui basic tiny horizontal label">{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}</div>{{end}}
|
|
||||||
</span>
|
|
||||||
</a>
|
|
||||||
{{end}}
|
|
||||||
</div>
|
|
||||||
{{if .SignedUser.CanCreateOrganization}}
|
|
||||||
<a class="item" href="{{AppSubUrl}}/org/create">
|
|
||||||
{{svg "octicon-plus"}} {{ctx.Locale.Tr "new_org"}}
|
|
||||||
</a>
|
|
||||||
{{end}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{if .ContextUser.IsOrganization}}
|
|
||||||
<div class="item">
|
|
||||||
<div class="ui floating dropdown jump">
|
|
||||||
<span class="text">
|
|
||||||
{{svg "octicon-people" 18}}
|
|
||||||
{{if .Team}}
|
|
||||||
{{.Team.Name}}
|
|
||||||
{{else}}
|
|
||||||
{{ctx.Locale.Tr "org.teams"}}
|
|
||||||
{{end}}
|
|
||||||
</span>
|
|
||||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
|
||||||
<div class="context user overflow menu">
|
|
||||||
<div class="ui header">
|
|
||||||
{{ctx.Locale.Tr "home.filter_by_team_repositories"}}
|
|
||||||
</div>
|
|
||||||
<div class="scrolling menu items">
|
|
||||||
<a class="{{if not $.Team}}active selected{{end}} item" title="{{ctx.Locale.Tr "all"}}" href="{{$.Org.OrganisationLink}}/{{if $.PageIsIssues}}issues{{else if $.PageIsPulls}}pulls{{else if $.PageIsMilestonesDashboard}}milestones{{else}}dashboard{{end}}">
|
|
||||||
{{ctx.Locale.Tr "all"}}
|
|
||||||
</a>
|
|
||||||
{{range .Teams}}
|
|
||||||
{{if not .IncludesAllRepositories}}
|
|
||||||
<a class="{{if $.Team}}{{if eq $.Team.ID .ID}}active selected{{end}}{{end}} item" title="{{.Name}}" href="{{$.Org.OrganisationLink}}/{{if $.PageIsIssues}}issues{{else if $.PageIsPulls}}pulls{{else if $.PageIsMilestonesDashboard}}milestones{{else}}dashboard{{end}}/{{.Name}}">
|
|
||||||
{{.Name}}
|
|
||||||
</a>
|
|
||||||
{{end}}
|
|
||||||
{{end}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
|
|
||||||
{{if .ContextUser.IsOrganization}}
|
|
||||||
<div class="right menu">
|
|
||||||
<a class="{{if .PageIsNews}}active {{end}}item gt-ml-auto" href="{{.ContextUser.DashboardLink}}{{if .Team}}/{{PathEscape .Team.Name}}{{end}}">
|
|
||||||
{{svg "octicon-rss"}} {{ctx.Locale.Tr "activities"}}
|
|
||||||
</a>
|
|
||||||
{{if not .UnitIssuesGlobalDisabled}}
|
|
||||||
<a class="{{if .PageIsIssues}}active {{end}}item" href="{{.ContextUser.OrganisationLink}}/issues{{if .Team}}/{{PathEscape .Team.Name}}{{end}}">
|
|
||||||
{{svg "octicon-issue-opened"}} {{ctx.Locale.Tr "issues"}}
|
|
||||||
</a>
|
|
||||||
{{end}}
|
|
||||||
{{if not .UnitPullsGlobalDisabled}}
|
|
||||||
<a class="{{if .PageIsPulls}}active {{end}}item" href="{{.ContextUser.OrganisationLink}}/pulls{{if .Team}}/{{PathEscape .Team.Name}}{{end}}">
|
|
||||||
{{svg "octicon-git-pull-request"}} {{ctx.Locale.Tr "pull_requests"}}
|
|
||||||
</a>
|
|
||||||
{{end}}
|
|
||||||
{{if and .ShowMilestonesDashboardPage (not (and .UnitIssuesGlobalDisabled .UnitPullsGlobalDisabled))}}
|
|
||||||
<a class="{{if .PageIsMilestonesDashboard}}active {{end}}item" href="{{.ContextUser.OrganisationLink}}/milestones{{if .Team}}/{{PathEscape .Team.Name}}{{end}}">
|
|
||||||
{{svg "octicon-milestone"}} {{ctx.Locale.Tr "milestones"}}
|
|
||||||
</a>
|
|
||||||
{{end}}
|
|
||||||
<div class="item">
|
|
||||||
<a class="ui primary basic button" href="{{.ContextUser.HomeLink}}" title="{{ctx.Locale.Tr "home.view_home" .ContextUser.Name}}">
|
|
||||||
{{ctx.Locale.Tr "home.view_home" (.ContextUser.ShortName 40)}}
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="divider"></div>
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
{{if .HeatmapData}}
|
|
||||||
<div id="user-heatmap" class="is-loading"
|
|
||||||
data-heatmap-data="{{JsonUtils.EncodeToString .HeatmapData}}"
|
|
||||||
data-locale-total-contributions="{{ctx.Locale.Tr "heatmap.number_of_contributions_in_the_last_12_months" (ctx.Locale.PrettyNumber .HeatmapTotalContributions)}}"
|
|
||||||
data-locale-no-contributions="{{ctx.Locale.Tr "heatmap.no_contributions"}}"
|
|
||||||
data-locale-more="{{ctx.Locale.Tr "heatmap.more"}}"
|
|
||||||
data-locale-less="{{ctx.Locale.Tr "heatmap.less"}}"
|
|
||||||
></div>
|
|
||||||
<div class="divider"></div>
|
|
||||||
{{end}}
|
|
||||||