diff --git a/custom/public/assets/css/qq-pages.css b/custom/public/assets/css/qq-pages.css new file mode 100644 index 0000000..5aadc56 --- /dev/null +++ b/custom/public/assets/css/qq-pages.css @@ -0,0 +1,538 @@ +/* =================================================================== + qq-pages.css —— 首页(未登录落地页)+ 登录后 Dashboard 的版式 + 参考 GitHub 的首页与 control panel 布局,配色仍走 QQGit 的蓝白主题变量。 + 只在 .qq-landing / .qq-dash 作用域内生效,不影响其它页面。 + =================================================================== */ + +/* ---------------------------------------------------------------- 首页落地页 */ +.page-content.home.qq-landing { + max-width: 1080px; + margin: 0 auto; + padding: 7vh 20px 10vh; +} + +.qq-lp-hero { + display: flex; + flex-direction: column; + align-items: center; + text-align: center; + gap: 10px; +} + +.qq-lp-logo { + width: 72px; + height: 72px; + margin-bottom: 10px; +} + +.qq-lp-logo img { + width: 72px; + height: 72px; + display: block; +} + +.qq-lp-eyebrow { + margin: 0; + padding: 4px 12px; + border: 1px solid var(--color-secondary); + border-radius: 999px; + font-size: 12px; + letter-spacing: 0.08em; + color: var(--color-text-light-2); + background: color-mix(in srgb, var(--color-box-body) 70%, transparent); +} + +.qq-lp-title { + margin: 6px 0 0; + font-size: clamp(44px, 7.6vw, 74px); + font-weight: 800; + letter-spacing: -0.02em; + line-height: 1.05; + background: linear-gradient(100deg, #2563eb 0%, #3b82f6 38%, #38bdf8 70%, #60a5fa 100%); + -webkit-background-clip: text; + background-clip: text; + color: transparent; +} + +.qq-lp-sub { + margin: 0; + font-size: 17px; + color: var(--color-text-light-2); +} + +.qq-lp-search { + display: flex; + gap: 10px; + width: 100%; + max-width: 560px; + margin: 18px auto 4px; +} + +.qq-lp-search input[type="search"] { + flex: 1 1 auto; + min-width: 0; + height: 46px; + padding: 0 16px; + font-size: 14px; + border: 1px solid var(--color-input-border, var(--color-secondary)); + border-radius: 10px; + background: var(--color-input-background, var(--color-box-body)); + color: var(--color-input-text, var(--color-text)); +} + +.qq-lp-search input[type="search"]:focus { + outline: none; + border-color: var(--color-primary); + box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-primary) 16%, transparent); +} + +.qq-lp-search .ui.primary.button { + flex: 0 0 auto; + height: 46px; + padding: 0 22px; + border: 0; + border-radius: 10px; + font-size: 14px; + white-space: nowrap; + color: #fff !important; + background: linear-gradient(120deg, var(--color-primary), #38bdf8 60%, var(--color-primary)); +} + +.qq-lp-cta { + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: center; + gap: 12px; + margin-top: 14px; +} + +.qq-lp-cta .ui.button { + flex: 0 0 auto; + border-radius: 10px; + font-size: 14px; + padding: 10px 20px; + line-height: 1.4; + white-space: nowrap; +} + +/* 主按钮:渐变底 + 白字;次按钮:描边(不依赖 Fomantic 的具体实现) */ +.qq-lp-cta .ui.primary.button { + border: 0; + color: #fff !important; + background: linear-gradient(120deg, #2563eb, #3b82f6 45%, #38bdf8 100%); + box-shadow: 0 8px 20px -12px color-mix(in srgb, var(--color-primary) 90%, transparent); +} + +.qq-lp-cta .ui.primary.button:hover { + filter: brightness(1.06); + transform: translateY(-1px); +} + +.qq-lp-cta .ui.basic.button { + border: 1px solid var(--color-secondary); + color: var(--color-text) !important; + background: transparent; +} + +.qq-lp-cta .ui.basic.button:hover { + border-color: var(--color-primary); + color: var(--color-primary) !important; +} + +.qq-lp-link { + font-size: 13px; + color: var(--color-text-light-2); +} + +.qq-lp-link:hover { + color: var(--color-primary); +} + +/* 三张功能卡 */ +.qq-lp-grid { + display: grid; + grid-template-columns: repeat(3, minmax(0, 1fr)); + gap: 18px; + margin-top: 9vh; +} + +.qq-lp-card { + padding: 22px 20px; + border: 1px solid var(--color-secondary); + border-radius: 14px; + background: color-mix(in srgb, var(--color-box-body) 88%, transparent); + backdrop-filter: blur(10px); + -webkit-backdrop-filter: blur(10px); + transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease; +} + +.qq-lp-card:hover { + transform: translateY(-3px); + border-color: color-mix(in srgb, var(--color-primary) 45%, var(--color-secondary)); + box-shadow: 0 12px 30px -18px color-mix(in srgb, var(--color-primary) 70%, transparent); +} + +.qq-lp-icon { + display: inline-flex; + align-items: center; + justify-content: center; + width: 34px; + height: 34px; + border-radius: 10px; + color: var(--color-primary); + background: color-mix(in srgb, var(--color-primary) 14%, transparent); +} + +.qq-lp-card h2 { + margin: 14px 0 6px; + font-size: 16px; + font-weight: 600; + color: var(--color-text); +} + +.qq-lp-card p { + margin: 0; + font-size: 13.5px; + line-height: 1.7; + color: var(--color-text-light-2); +} + +/* 事实条 */ +.qq-lp-stats { + display: grid; + grid-template-columns: repeat(4, minmax(0, 1fr)); + gap: 1px; + margin-top: 7vh; + border: 1px solid var(--color-secondary); + border-radius: 14px; + overflow: hidden; + background: var(--color-secondary); +} + +.qq-lp-stat { + display: flex; + flex-direction: column; + align-items: center; + gap: 4px; + padding: 18px 12px; + background: var(--color-box-body); +} + +.qq-lp-stat strong { + font-size: 17px; + font-weight: 600; + color: var(--color-text); +} + +.qq-lp-stat span { + font-size: 12px; + color: var(--color-text-light-2); +} + +@media (max-width: 860px) { + .qq-lp-grid { + grid-template-columns: 1fr; + margin-top: 6vh; + } + + .qq-lp-stats { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } +} + +/* ---------------------------------------------------------------- Dashboard */ +.page-content.dashboard.qq-dash { + padding: 0; +} + +.qq-dash-shell { + max-width: 1400px; + margin: 0 auto; + padding: 26px 24px 90px; +} + +.qq-dash-grid { + display: grid; + grid-template-columns: 232px minmax(0, 1fr) 296px; + gap: 24px; + align-items: start; +} + +/* 左栏 */ +.qq-dash-side { + position: sticky; + top: 16px; +} + +.qq-dash-nav { + display: flex; + flex-direction: column; + gap: 2px; + margin-bottom: 22px; +} + +.qq-dash-nav .item { + display: flex; + align-items: center; + gap: 9px; + padding: 8px 10px; + border-radius: 8px; + font-size: 13.5px; + color: var(--color-text); + transition: background 150ms ease, color 150ms ease; +} + +.qq-dash-nav .item:hover { + background: color-mix(in srgb, var(--color-primary) 8%, transparent); + color: var(--color-primary); +} + +.qq-dash-nav .item.active { + font-weight: 600; + color: var(--color-primary); + background: color-mix(in srgb, var(--color-primary) 12%, transparent); +} + +.qq-dash-nav .item svg { + flex: 0 0 auto; + color: var(--color-text-light-2); +} + +.qq-dash-nav .item.active svg { + color: var(--color-primary); +} + +.qq-dash-side-head { + display: flex; + align-items: center; + justify-content: space-between; + margin-bottom: 8px; + padding: 0 4px; + font-size: 12px; + letter-spacing: 0.04em; + color: var(--color-text-light-2); +} + +/* 官方 repolist 是 JS 渲染的,去掉它自带的栅格宽度 */ +.qq-dash-repos #dashboard-repo-list { + width: auto !important; + float: none !important; + padding: 0 !important; + margin: 0 !important; +} + +.qq-dash-repos #dashboard-repo-list input[type="search"] { + width: 100%; + height: 34px; + padding: 0 10px; + margin-bottom: 10px; + font-size: 13px; + border: 1px solid var(--color-input-border, var(--color-secondary)); + border-radius: 8px; + background: var(--color-input-background, var(--color-box-body)); + color: var(--color-input-text, var(--color-text)); +} + +.qq-dash-repos a { + font-size: 13px; +} + +/* 中栏 */ +.qq-dash-hello { + margin: 2px 0 16px; + font-size: 25px; + font-weight: 650; + letter-spacing: -0.01em; + color: var(--color-text); +} + +.qq-dash-hi { + font-weight: 400; + color: var(--color-text-light-2); +} + +.qq-dash-search { + display: flex; + align-items: center; + gap: 9px; + margin-bottom: 18px; + padding: 10px 14px; + border: 1px solid var(--color-input-border, var(--color-secondary)); + border-radius: 10px; + background: var(--color-input-background, var(--color-box-body)); + color: var(--color-text-light-2); +} + +.qq-dash-search input { + flex: 1 1 auto; + min-width: 0; + border: 0; + background: transparent; + color: var(--color-text); + font-size: 13.5px; +} + +.qq-dash-search input:focus { + outline: none; +} + +.qq-dash-card { + margin-bottom: 18px; + border: 1px solid var(--color-secondary); + border-radius: 12px; + background: var(--color-box-body); + overflow: hidden; +} + +.qq-panel-head { + padding: 11px 16px; + font-size: 13px; + font-weight: 600; + color: var(--color-text); + border-bottom: 1px solid var(--color-secondary); + background: color-mix(in srgb, var(--color-box-header) 70%, var(--color-box-body)); +} + +.qq-quick-row { + display: grid; + grid-template-columns: repeat(3, minmax(0, 1fr)); +} + +.qq-quick { + display: flex; + flex-direction: column; + gap: 3px; + padding: 14px 16px; + border-right: 1px solid var(--color-secondary); + color: var(--color-text); + transition: background 150ms ease; +} + +.qq-quick:last-child { + border-right: 0; +} + +.qq-quick:hover { + background: color-mix(in srgb, var(--color-primary) 7%, transparent); +} + +.qq-quick svg { + color: var(--color-primary); + margin-bottom: 4px; +} + +.qq-quick-t { + font-size: 13.5px; + font-weight: 600; +} + +.qq-quick-d { + font-size: 12px; + color: var(--color-text-light-2); +} + +/* 热力图卡片:官方模板自带 divider,卡片里不需要 */ +.qq-dash-heat { + padding: 14px 16px 8px; +} + +.qq-dash-heat .divider { + display: none; +} + +.qq-dash-heat #user-heatmap { + margin: 0; +} + +.qq-dash-feed .ui.feed { + padding: 10px 16px 16px; + margin: 0; +} + +.qq-dash-feed .ui.feed .event { + font-size: 13px; +} + +/* 右栏 */ +.qq-info-list { + margin: 0; + padding: 6px 0; + list-style: none; +} + +.qq-info-list li { + display: flex; + align-items: center; + justify-content: space-between; + gap: 10px; + padding: 7px 16px; + font-size: 13px; + color: var(--color-text-light-2); +} + +.qq-info-list strong { + font-weight: 600; + color: var(--color-text); +} + +.qq-info-links { + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: 8px; + padding: 12px 16px 16px; + border-top: 1px solid var(--color-secondary); +} + +.qq-info-links a { + font-size: 13px; + color: var(--color-primary); +} + +.qq-dash-tip p { + margin: 0; + padding: 12px 16px 16px; + font-size: 12.5px; + line-height: 1.75; + color: var(--color-text-light-2); +} + +@media (max-width: 1180px) { + .qq-dash-grid { + grid-template-columns: 216px minmax(0, 1fr); + } + + .qq-dash-aside { + grid-column: 1 / -1; + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + gap: 18px; + } +} + +@media (max-width: 860px) { + .qq-dash-shell { + padding: 18px 16px 80px; + } + + .qq-dash-grid { + grid-template-columns: 1fr; + } + + .qq-dash-side { + position: static; + } + + .qq-dash-aside { + grid-template-columns: 1fr; + } + + .qq-quick-row { + grid-template-columns: 1fr; + } + + .qq-quick { + border-right: 0; + border-bottom: 1px solid var(--color-secondary); + } +} diff --git a/custom/templates/custom/header.tmpl b/custom/templates/custom/header.tmpl index d1996b1..ca9710e 100644 --- a/custom/templates/custom/header.tmpl +++ b/custom/templates/custom/header.tmpl @@ -6,6 +6,7 @@ + diff --git a/custom/templates/home.tmpl b/custom/templates/home.tmpl index 3b3ed23..ed1ba58 100644 --- a/custom/templates/home.tmpl +++ b/custom/templates/home.tmpl @@ -1,35 +1,73 @@ -{{/* home.tmpl —— 未登录首页(基于 Gitea 1.21.11 官方 home.tmpl 精简) - 改动: - · 四栏宣传块 → 三张毛玻璃小卡片 - · Logo 套旋转光环,标题走渐变流动,口号打字机(动效在 qq-fx.css / qq-fx.js) - · 文案沿用官方 i18n key,不硬编码中文(口号除外,它已经是我们自己的文案) - 这是**模板覆盖**,不改源码,删掉本文件即回到官方首页。 */}} +{{/* home.tmpl —— 未登录首页(模板覆盖,不改源码;删掉本文件即回到官方首页) + 版式参考 GitHub 首页: + · 居中的大标题 + 一句话说明 + 搜索框 + 主次按钮 + · 下面一排功能卡片,再往下一条数字/事实带 + · 品牌色仍是蓝白,动效(粒子星座 / 光雾)由 qq-fx.css + qq-fx.js 提供 + i18n:新的标题/卡片文案是本项目自己的,直接写中文;Gitea 版本号用 {{AppVer}}。 */}} {{template "base/head" .}} -
-
-
-
- -
-

{{AppName}}

- {{/* 品牌口号:想换回官方文案就换成 {{ctx.Locale.Tr "startpage.app_desc"}} */}} -

自己的代码,自己的地方。

-
-
+
-
-
-

{{svg "octicon-device-desktop" 16}} {{ctx.Locale.Tr "startpage.platform"}}

-

{{ctx.Locale.Tr "startpage.platform_desc" | Str2html}}

+
+ -
-

{{svg "octicon-rocket" 16}} {{ctx.Locale.Tr "startpage.lightweight"}}

-

{{ctx.Locale.Tr "startpage.lightweight_desc" | Str2html}}

+

私有部署 · 轻量 · 全功能

+

{{AppName}}

+

自己的代码,自己的地方。

+ + + +
+ {{if .IsSigned}} + 进入控制台 + 新建仓库 + {{else}} + 免费注册 + 登录 + {{end}} + 浏览全部仓库 →
-
-

{{svg "octicon-code" 16}} {{ctx.Locale.Tr "startpage.license"}}

-

{{ctx.Locale.Tr "startpage.license_desc" | Str2html}}

+
+ +
+
+ {{svg "octicon-git-branch" 18}} +

版本控制

+

Git 仓库、分支、标签、合并请求与代码评审,一套齐全。

+
+
+ {{svg "octicon-issue-opened" 18}} +

议题与看板

+

Issues、里程碑、标签与看板,把待办和进展放在同一个地方。

+
+
+ {{svg "octicon-shield-lock" 18}} +

数据自持

+

跑在自己的服务器上,仓库、用户与备份都由自己掌握。

+
+
+ +
+
+ {{AppVer}} + Gitea 版本
-
+
+ MIT + 开源协议 +
+
+ SQLite + 零依赖存储 +
+
+ 1 台 + 服务器即可跑 +
+ +
{{template "base/footer" .}} diff --git a/custom/templates/user/dashboard/dashboard.tmpl b/custom/templates/user/dashboard/dashboard.tmpl new file mode 100644 index 0000000..4ec1399 --- /dev/null +++ b/custom/templates/user/dashboard/dashboard.tmpl @@ -0,0 +1,97 @@ +{{/* user/dashboard/dashboard.tmpl —— 登录后的控制台(模板覆盖,不改源码) + 版式参考 GitHub Dashboard: + 左栏 = 我的仓库 + 快捷导航;中栏 = 问候 / 搜索 / PR·Issues / 贡献热力图 / 动态; + 右栏 = 站点信息卡片。 + 只用官方已提供的数据与子模板(user/dashboard/repolist、user/heatmap、 + user/dashboard/feeds),不引入新的后端数据,避免升级后 500。 */}} +{{template "base/head" .}} +
+
+ {{template "base/alert" .}} + +
+ + + +
+

+ {{.SignedUser.Name}},欢迎回来 +

+ + + +
+
我参与的
+ +
+ +
+ {{template "user/heatmap" .}} +
+ +
+
最近动态
+ {{template "user/dashboard/feeds" .}} +
+
+ + + +
+
+
+{{template "base/footer" .}} diff --git a/preview/_debug.html b/preview/_debug.html deleted file mode 100644 index 7503a77..0000000 --- a/preview/_debug.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - -
pending
- - - - - diff --git a/preview/_footer_probe.html b/preview/_footer_probe.html deleted file mode 100644 index 841a7a2..0000000 --- a/preview/_footer_probe.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - -
占位
- -
pending
- - - diff --git a/preview/dashboard.html b/preview/dashboard.html new file mode 100644 index 0000000..c846886 --- /dev/null +++ b/preview/dashboard.html @@ -0,0 +1,182 @@ + + + + + +QQGit · Dashboard 预览(照 GitHub 版式) + + + + + + + + + +
+ + + +
+ + + +
+
+ +
+ + + +
+

newbie,欢迎回来

+ + + +
+
我参与的
+ +
+ +
+
+
+
少多
+
+
+ +
+
最近动态
+
+
+
Q
+
+ 3 分钟前 +
qq 推送了 qq/gitea-font 的 main 分支
+
feat(fx): 首页与登录页动效层
+
+
+
+
Q
+
+ 2 小时前 +
新建仓库 qq/materials-notes
+
+
+
+
Q
+
+ 昨天 +
在 qq/neovim-config 创建了标签 v3.1
+
+
+
+
+
+ + + +
+
+
+ + + + + + + diff --git a/preview/index.html b/preview/index.html index 43c21d0..87862be 100644 --- a/preview/index.html +++ b/preview/index.html @@ -11,6 +11,7 @@ + @@ -39,30 +40,48 @@ -
-
-
-
- -
-

QQGit

-

自己的代码,自己的地方。

-
-
-
-

◆跨平台

-

支持 Linux、macOS 和 Windows,从 x86 到 ARM 再到 PowerPC 均可运行。

+
+
+
+ +

私有部署 · 轻量 · 全功能

+

QQGit

+

自己的代码,自己的地方。

+ + -
-

▲轻量快速

-

一条命令即可启动,低资源占用,普通的树莓派也能跑得很轻快。

-
-
-

◇开源免费

-

MIT 协议,社区驱动,所有代码与决策都完全开放透明。

-
-
-
+ + +
+
+ +

版本控制

+

Git 仓库、分支、标签、合并请求与代码评审,一套齐全。

+
+
+ +

议题与看板

+

Issues、里程碑、标签与看板,把待办和进展放在同一个地方。

+
+
+ +

数据自持

+

跑在自己的服务器上,仓库、用户与备份都由自己掌握。

+
+
+ +
+
1.21.11Gitea 版本
+
MIT开源协议
+
SQLite零依赖存储
+
1 台服务器即可跑
+
diff --git a/preview/preview.css b/preview/preview.css index 745de4d..a72178f 100644 --- a/preview/preview.css +++ b/preview/preview.css @@ -297,3 +297,91 @@ body { #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; +} diff --git a/upstream-templates-1.21.11/user/dashboard/feeds.tmpl b/upstream-templates-1.21.11/user/dashboard/feeds.tmpl new file mode 100644 index 0000000..da796fc --- /dev/null +++ b/upstream-templates-1.21.11/user/dashboard/feeds.tmpl @@ -0,0 +1,127 @@ +
+ {{range .Feeds}} +
+
+ {{ctx.AvatarUtils.AvatarByAction .}} +
+
+
+ {{if gt .ActUser.ID 0}} + {{.GetDisplayName ctx}} + {{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}} +
+ {{if .GetOpType.InActions "commit_repo" "mirror_sync_push"}} + {{$push := ActionContent2Commits .}} + {{$repoLink := (.GetRepoLink ctx)}} + {{$repo := .Repo}} +
+ {{range $push.Commits}} + {{$commitLink := printf "%s/commit/%s" $repoLink .Sha1}} +
+ + {{ShortSha .Sha1}} + + {{RenderCommitMessage $.Context .Message $repo.ComposeMetas}} + +
+ {{end}} +
+ {{if and (gt $push.Len 1) $push.CompareURL}} + {{ctx.Locale.Tr "action.compare_commits" $push.Len}} » + {{end}} + {{else if .GetOpType.InActions "create_issue"}} + {{index .GetIssueInfos 1 | RenderEmoji $.Context | RenderCodeBlock}} + {{else if .GetOpType.InActions "create_pull_request"}} + {{index .GetIssueInfos 1 | RenderEmoji $.Context | RenderCodeBlock}} + {{else if .GetOpType.InActions "comment_issue" "approve_pull_request" "reject_pull_request" "comment_pull"}} + {{(.GetIssueTitle ctx) | RenderEmoji $.Context | RenderCodeBlock}} + {{$comment := index .GetIssueInfos 1}} + {{if $comment}} +
{{RenderMarkdownToHtml ctx $comment}}
+ {{end}} + {{else if .GetOpType.InActions "merge_pull_request"}} +
{{index .GetIssueInfos 1}}
+ {{else if .GetOpType.InActions "close_issue" "reopen_issue" "close_pull_request" "reopen_pull_request"}} + {{(.GetIssueTitle ctx) | RenderEmoji $.Context | RenderCodeBlock}} + {{else if .GetOpType.InActions "pull_review_dismissed"}} +
{{ctx.Locale.Tr "action.review_dismissed_reason"}}
+
{{index .GetIssueInfos 2 | RenderEmoji $.Context}}
+ {{end}} +
+
+ {{svg (printf "octicon-%s" (ActionIcon .GetOpType)) 32 "text grey gt-mr-2"}} +
+
+ {{end}} + {{template "base/paginate" .}} +
diff --git a/upstream-templates-1.21.11/user/dashboard/navbar.tmpl b/upstream-templates-1.21.11/user/dashboard/navbar.tmpl new file mode 100644 index 0000000..af07897 --- /dev/null +++ b/upstream-templates-1.21.11/user/dashboard/navbar.tmpl @@ -0,0 +1,108 @@ +
+ +
+
diff --git a/upstream-templates-1.21.11/user/heatmap.tmpl b/upstream-templates-1.21.11/user/heatmap.tmpl new file mode 100644 index 0000000..b604b92 --- /dev/null +++ b/upstream-templates-1.21.11/user/heatmap.tmpl @@ -0,0 +1,10 @@ +{{if .HeatmapData}} +
+
+{{end}}