QQgit/custom/templates/home.tmpl

127 lines
7.3 KiB
Cheetah
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.

{{/* 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" .}}