QQgit/preview/index.html

327 lines
20 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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>