feat(pages): 首页与登录后控制台改成 GitHub 版式
- custom/templates/home.tmpl:未登录落地页 → 大标题 + 搜索框 + 主次按钮 + 三张功能卡 + 事实带 - custom/templates/user/dashboard/dashboard.tmpl:登录后控制台 → 左栏我的仓库、中栏问候/快捷入口/热力图/动态、右栏站点信息 - custom/public/assets/css/qq-pages.css:两个页面共用样式(含 1180px/860px 断点) - preview/dashboard.html:离线 mock 预览;preview/index.html 同步新落地页 - 只用官方已有数据与子模板(repolist / heatmap / feeds),不引入后端改动
This commit is contained in:
parent
b9c3c1a912
commit
58817325c4
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
@ -6,6 +6,7 @@
|
|||
<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">
|
||||
<link rel="stylesheet" href="{{AssetUrlPrefix}}/css/qq-fx.css">
|
||||
<link rel="stylesheet" href="{{AssetUrlPrefix}}/css/qq-pages.css">
|
||||
<meta name="theme-color" content="#60A5FA" media="(prefers-color-scheme: light)">
|
||||
<meta name="theme-color" content="#0D1117" media="(prefers-color-scheme: dark)">
|
||||
|
||||
|
|
|
|||
|
|
@ -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" .}}
|
||||
<div role="main" aria-label="{{ctx.Locale.Tr "home"}}" class="page-content home qq-home">
|
||||
<div class="gt-px-5">
|
||||
<div class="qq-hero">
|
||||
<div class="qq-logo-halo">
|
||||
<img class="logo" width="152" height="152" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{ctx.Locale.Tr "logo"}}">
|
||||
</div>
|
||||
<h1 class="qq-hero-title">{{AppName}}</h1>
|
||||
{{/* 品牌口号:想换回官方文案就换成 {{ctx.Locale.Tr "startpage.app_desc"}} */}}
|
||||
<p class="qq-hero-tag" data-qq-type="自己的代码,自己的地方。">自己的代码,自己的地方。</p>
|
||||
</div>
|
||||
</div>
|
||||
<div role="main" aria-label="{{ctx.Locale.Tr "home"}}" class="page-content home qq-landing">
|
||||
|
||||
<div class="qq-home-cards">
|
||||
<div class="qq-home-card">
|
||||
<h3>{{svg "octicon-device-desktop" 16}} {{ctx.Locale.Tr "startpage.platform"}}</h3>
|
||||
<p>{{ctx.Locale.Tr "startpage.platform_desc" | Str2html}}</p>
|
||||
<section class="qq-lp-hero">
|
||||
<div class="qq-logo-halo qq-lp-logo">
|
||||
<img width="72" height="72" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{AppName}}">
|
||||
</div>
|
||||
<div class="qq-home-card">
|
||||
<h3>{{svg "octicon-rocket" 16}} {{ctx.Locale.Tr "startpage.lightweight"}}</h3>
|
||||
<p>{{ctx.Locale.Tr "startpage.lightweight_desc" | Str2html}}</p>
|
||||
<p class="qq-lp-eyebrow">私有部署 · 轻量 · 全功能</p>
|
||||
<h1 class="qq-lp-title">{{AppName}}</h1>
|
||||
<p class="qq-lp-sub">自己的代码,自己的地方。</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 class="qq-home-card">
|
||||
<h3>{{svg "octicon-code" 16}} {{ctx.Locale.Tr "startpage.license"}}</h3>
|
||||
<p>{{ctx.Locale.Tr "startpage.license_desc" | Str2html}}</p>
|
||||
</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>
|
||||
|
||||
<section class="qq-lp-stats">
|
||||
<div class="qq-lp-stat">
|
||||
<strong>{{AppVer}}</strong>
|
||||
<span>Gitea 版本</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="qq-lp-stat">
|
||||
<strong>MIT</strong>
|
||||
<span>开源协议</span>
|
||||
</div>
|
||||
<div class="qq-lp-stat">
|
||||
<strong>SQLite</strong>
|
||||
<span>零依赖存储</span>
|
||||
</div>
|
||||
<div class="qq-lp-stat">
|
||||
<strong>1 台</strong>
|
||||
<span>服务器即可跑</span>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
{{template "base/footer" .}}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,97 @@
|
|||
{{/* 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" .}}
|
||||
|
||||
<div class="qq-dash-grid">
|
||||
|
||||
<aside class="qq-dash-side">
|
||||
<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>
|
||||
|
||||
<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">
|
||||
<h1 class="qq-dash-hello">
|
||||
{{.SignedUser.Name}}<span class="qq-dash-hi">,欢迎回来</span>
|
||||
</h1>
|
||||
|
||||
<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-heat">
|
||||
{{template "user/heatmap" .}}
|
||||
</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-info">
|
||||
<div class="qq-panel-head">站点</div>
|
||||
<ul class="qq-info-list">
|
||||
<li><span>名称</span><strong>{{AppName}}</strong></li>
|
||||
<li><span>版本</span><strong>{{AppVer}}</strong></li>
|
||||
<li><span>账号</span><strong>{{.SignedUser.Name}}</strong></li>
|
||||
</ul>
|
||||
<div class="qq-info-links">
|
||||
<a href="{{AppSubUrl}}/explore/repos">探索仓库</a>
|
||||
<a href="{{AppSubUrl}}/explore/users">发现用户</a>
|
||||
<a href="{{AppSubUrl}}/help">帮助</a>
|
||||
</div>
|
||||
</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,51 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<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>
|
||||
<pre id="out">pending</pre>
|
||||
<div class="page-content user signin">
|
||||
<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="u">user</label><input id="u" type="text"></div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="app.js"></script>
|
||||
<script>
|
||||
(function () {
|
||||
var cs = getComputedStyle;
|
||||
var html = document.documentElement, body = document.body;
|
||||
var inp = document.getElementById('u');
|
||||
var sheets = [].map.call(document.styleSheets, function (s) {
|
||||
var n = 0;
|
||||
try { n = s.cssRules.length; } catch (e) { n = -1; }
|
||||
return (s.href || '').split('/').pop() + ' rules=' + n + ' disabled=' + (s.disabled);
|
||||
});
|
||||
var lines = [
|
||||
'theme param = ' + new URLSearchParams(location.search).get('theme'),
|
||||
'--color-body html = ' + cs(html).getPropertyValue('--color-body').trim(),
|
||||
'--color-body body = ' + cs(body).getPropertyValue('--color-body').trim(),
|
||||
'--color-body input = ' + cs(inp).getPropertyValue('--color-body').trim(),
|
||||
'--input-bg input = ' + cs(inp).getPropertyValue('--color-input-background').trim(),
|
||||
'html bg = ' + cs(html).backgroundColor + ' | body bg = ' + cs(body).backgroundColor,
|
||||
'input bg = ' + cs(inp).backgroundColor + ' | border = ' + cs(inp).borderTopColor,
|
||||
'sheets: ' + sheets.join(' ;; ')
|
||||
];
|
||||
document.getElementById('out').textContent = lines.join('\n');
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh-CN" class="theme-qq-auto">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="https://git.qyhhh.top/assets/css/index.css?v=1.21.11">
|
||||
<link rel="stylesheet" href="https://git.qyhhh.top/assets/css/theme-qq-auto.css?v=1.21.11">
|
||||
<link rel="stylesheet" href="https://git.qyhhh.top/assets/css/qq-ui.css">
|
||||
</head>
|
||||
<body>
|
||||
<div style="height:600px">占位</div>
|
||||
<footer class="page-footer qq-icp-footer" role="contentinfo" aria-label="备案信息">
|
||||
<a class="qq-icp" href="https://beian.miit.gov.cn/">闽ICP备2023002932号</a>
|
||||
<nav class="qq-lang" aria-label="语言 / Language">
|
||||
<span class="qq-lang-cur">简体中文</span>
|
||||
<a href="/?lang=en-US">English</a>
|
||||
</nav>
|
||||
</footer>
|
||||
<pre id="out">pending</pre>
|
||||
<script>
|
||||
var f = document.querySelector('.page-footer'), n = document.querySelector('.qq-lang');
|
||||
var cf = getComputedStyle(f), cn = getComputedStyle(n);
|
||||
document.getElementById('out').textContent = [
|
||||
'footer display = ' + cf.display,
|
||||
'footer justify = ' + cf.justifyContent,
|
||||
'footer flexDirection = ' + cf.flexDirection,
|
||||
'footer position = ' + cf.position,
|
||||
'lang position = ' + cn.position + ' right=' + cn.right,
|
||||
'lang display = ' + cn.display
|
||||
].join('\n');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,182 @@
|
|||
<!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">
|
||||
|
||||
<div class="qq-dash-grid">
|
||||
|
||||
<aside class="qq-dash-side">
|
||||
<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>
|
||||
|
||||
<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">
|
||||
<h1 class="qq-dash-hello">newbie<span class="qq-dash-hi">,欢迎回来</span></h1>
|
||||
|
||||
<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-heat">
|
||||
<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>
|
||||
|
||||
<section class="qq-dash-card qq-dash-feed">
|
||||
<div class="qq-panel-head">最近动态</div>
|
||||
<div class="ui feed">
|
||||
<div class="event">
|
||||
<div class="label"><span class="avatar">Q</span></div>
|
||||
<div class="content">
|
||||
<span class="date">3 分钟前</span>
|
||||
<div class="summary"><a href="#">qq</a> 推送了 <a href="#">qq/gitea-font</a> 的 <code>main</code> 分支</div>
|
||||
<div class="extra text muted">feat(fx): 首页与登录页动效层</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="event">
|
||||
<div class="label"><span class="avatar">Q</span></div>
|
||||
<div class="content">
|
||||
<span class="date">2 小时前</span>
|
||||
<div class="summary">新建仓库 <a href="#">qq/materials-notes</a></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="event">
|
||||
<div class="label"><span class="avatar">Q</span></div>
|
||||
<div class="content">
|
||||
<span class="date">昨天</span>
|
||||
<div class="summary">在 <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-info">
|
||||
<div class="qq-panel-head">站点</div>
|
||||
<ul class="qq-info-list">
|
||||
<li><span>名称</span><strong>QQGit</strong></li>
|
||||
<li><span>版本</span><strong>1.21.11</strong></li>
|
||||
<li><span>账号</span><strong>newbie</strong></li>
|
||||
</ul>
|
||||
<div class="qq-info-links">
|
||||
<a href="#">探索仓库</a>
|
||||
<a href="#">发现用户</a>
|
||||
<a href="#">帮助</a>
|
||||
</div>
|
||||
</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">
|
||||
<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;
|
||||
}
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -11,6 +11,7 @@
|
|||
<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>
|
||||
|
|
@ -39,30 +40,48 @@
|
|||
|
||||
<!-- ============ 1. 未登录首页 ============ -->
|
||||
<div class="section-label">首页(未登录 · custom/templates/home.tmpl)</div>
|
||||
<div class="segment" style="padding-bottom:34px">
|
||||
<div class="page-content home qq-home" style="padding-top:0">
|
||||
<div class="qq-hero">
|
||||
<div class="qq-logo-halo">
|
||||
<img class="logo" src="../custom/public/assets/img/logo.svg" alt="logo">
|
||||
</div>
|
||||
<h1 class="qq-hero-title">QQGit</h1>
|
||||
<p class="qq-hero-tag" data-qq-type="自己的代码,自己的地方。">自己的代码,自己的地方。</p>
|
||||
</div>
|
||||
<div class="qq-home-cards" style="max-width:900px;margin:8px auto 0">
|
||||
<div class="qq-home-card">
|
||||
<h3><span>◆</span>跨平台</h3>
|
||||
<p>支持 Linux、macOS 和 Windows,从 x86 到 ARM 再到 PowerPC 均可运行。</p>
|
||||
<div class="segment" style="padding:0">
|
||||
<div class="page-content home qq-landing" style="padding-top:24px">
|
||||
<section class="qq-lp-hero">
|
||||
<div class="qq-logo-halo qq-lp-logo"><img src="../custom/public/assets/img/logo.svg" alt="logo"></div>
|
||||
<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 class="qq-home-card">
|
||||
<h3><span>▲</span>轻量快速</h3>
|
||||
<p>一条命令即可启动,低资源占用,普通的树莓派也能跑得很轻快。</p>
|
||||
</div>
|
||||
<div class="qq-home-card">
|
||||
<h3><span>◇</span>开源免费</h3>
|
||||
<p>MIT 协议,社区驱动,所有代码与决策都完全开放透明。</p>
|
||||
</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>
|
||||
|
||||
<section class="qq-lp-stats">
|
||||
<div class="qq-lp-stat"><strong>1.21.11</strong><span>Gitea 版本</span></div>
|
||||
<div class="qq-lp-stat"><strong>MIT</strong><span>开源协议</span></div>
|
||||
<div class="qq-lp-stat"><strong>SQLite</strong><span>零依赖存储</span></div>
|
||||
<div class="qq-lp-stat"><strong>1 台</strong><span>服务器即可跑</span></div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,127 @@
|
|||
<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>
|
||||
|
|
@ -0,0 +1,108 @@
|
|||
<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>
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
{{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}}
|
||||
Loading…
Reference in New Issue