feat(landing): v1.4 方案 A+B 首屏与热门公开仓库
首屏改左文右图:渐变标题、口号、搜索、双按钮 + 毛玻璃分支图与 terminal 复制窗;新增热门公开仓库三卡(公开 API 取数,前端过滤 fork/镜像并排序);按方案 A 删除数字条,功能卡降级为收尾;补齐 1024/640 断点、暗色与 reduced-motion。
This commit is contained in:
parent
926b8fc9b0
commit
bbce78ae2c
|
|
@ -4,35 +4,51 @@
|
||||||
只在 .qq-landing / .qq-dash 作用域内生效,不影响其它页面。
|
只在 .qq-landing / .qq-dash 作用域内生效,不影响其它页面。
|
||||||
=================================================================== */
|
=================================================================== */
|
||||||
|
|
||||||
/* ---------------------------------------------------------------- 首页落地页 */
|
/* ---------------------------------------------------------------- 首页落地页 v1.4 */
|
||||||
/* 与控制台统一:同样是 GitHub container-xl 的 1280px 限宽 + 32px 左右内边距 */
|
/* 方案 A 首屏(左文右图)+ 热门公开仓库;与控制台同一 1280px 限宽 */
|
||||||
.page-content.home.qq-landing {
|
.page-content.home.qq-landing {
|
||||||
max-width: 1280px;
|
max-width: 1280px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
padding: 7vh 32px 10vh;
|
padding: 5vh 32px 9vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ① 首屏:左 7 / 右 5 */
|
||||||
.qq-lp-hero {
|
.qq-lp-hero {
|
||||||
display: flex;
|
position: relative;
|
||||||
flex-direction: column;
|
display: grid;
|
||||||
|
grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
|
||||||
|
gap: 56px;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
text-align: center;
|
--qq-mx: 24%;
|
||||||
gap: 10px;
|
--qq-my: 32%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.qq-lp-logo {
|
/* 跟随鼠标的柔光:JS 只改两个变量,不触发重排 */
|
||||||
width: 72px;
|
.qq-lp-hero::before {
|
||||||
height: 72px;
|
content: "";
|
||||||
margin-bottom: 10px;
|
position: absolute;
|
||||||
|
inset: -14% -10%;
|
||||||
|
z-index: 0;
|
||||||
|
pointer-events: none;
|
||||||
|
background: radial-gradient(420px circle at var(--qq-mx) var(--qq-my),
|
||||||
|
color-mix(in srgb, var(--color-primary) 10%, transparent),
|
||||||
|
transparent 64%);
|
||||||
|
transition: background 0.12s linear;
|
||||||
}
|
}
|
||||||
|
|
||||||
.qq-lp-logo img {
|
.qq-lp-hero-copy,
|
||||||
width: 72px;
|
.qq-lp-visual {
|
||||||
height: 72px;
|
position: relative;
|
||||||
display: block;
|
z-index: 1;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-lp-hero-copy {
|
||||||
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.qq-lp-eyebrow {
|
.qq-lp-eyebrow {
|
||||||
|
display: inline-block;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 4px 12px;
|
padding: 4px 12px;
|
||||||
border: 1px solid var(--color-secondary);
|
border: 1px solid var(--color-secondary);
|
||||||
|
|
@ -44,29 +60,42 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.qq-lp-title {
|
.qq-lp-title {
|
||||||
margin: 6px 0 0;
|
margin: 18px 0 0;
|
||||||
font-size: clamp(44px, 7.6vw, 74px);
|
font-family: var(--qq-font-mono);
|
||||||
|
font-size: clamp(52px, 6.6vw, 86px);
|
||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
letter-spacing: -0.02em;
|
letter-spacing: -0.035em;
|
||||||
line-height: 1.05;
|
line-height: 1.02;
|
||||||
background: linear-gradient(100deg, #2563eb 0%, #3b82f6 38%, #38bdf8 70%, #60a5fa 100%);
|
background: linear-gradient(100deg, #1D4ED8 0%, #2563EB 24%, #3B82F6 52%, #60A5FA 78%, #38BDF8 100%);
|
||||||
-webkit-background-clip: text;
|
-webkit-background-clip: text;
|
||||||
background-clip: text;
|
background-clip: text;
|
||||||
color: transparent;
|
color: transparent;
|
||||||
|
-webkit-text-fill-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.qq-lp-sub {
|
.qq-lp-sub {
|
||||||
margin: 0;
|
min-height: 1.7em;
|
||||||
font-size: 17px;
|
margin: 16px 0 0;
|
||||||
|
font-size: clamp(16px, 1.6vw, 20px);
|
||||||
|
letter-spacing: 0.01em;
|
||||||
color: var(--color-text-light-2);
|
color: var(--color-text-light-2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.qq-lp-sub.qq-typing::after,
|
||||||
|
.qq-lp-sub.qq-typed::after {
|
||||||
|
content: "▌";
|
||||||
|
margin-left: 2px;
|
||||||
|
color: var(--color-primary);
|
||||||
|
animation: qq-caret 1.1s step-end infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 搜索框:左对齐,跟随左栏宽度 */
|
||||||
.qq-lp-search {
|
.qq-lp-search {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 560px;
|
max-width: 560px;
|
||||||
margin: 18px auto 4px;
|
margin: 28px 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.qq-lp-search input[type="search"] {
|
.qq-lp-search input[type="search"] {
|
||||||
|
|
@ -96,16 +125,16 @@
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
color: #fff !important;
|
color: #fff !important;
|
||||||
background: linear-gradient(120deg, var(--color-primary), #38bdf8 60%, var(--color-primary));
|
background: linear-gradient(120deg, #2563EB, #3B82F6 55%, #38BDF8 100%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.qq-lp-cta {
|
.qq-lp-cta {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: flex-start;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
margin-top: 14px;
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.qq-lp-cta .ui.button {
|
.qq-lp-cta .ui.button {
|
||||||
|
|
@ -117,11 +146,10 @@
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 主按钮:渐变底 + 白字;次按钮:描边(不依赖 Fomantic 的具体实现) */
|
|
||||||
.qq-lp-cta .ui.primary.button {
|
.qq-lp-cta .ui.primary.button {
|
||||||
border: 0;
|
border: 0;
|
||||||
color: #fff !important;
|
color: #fff !important;
|
||||||
background: linear-gradient(120deg, #2563eb, #3b82f6 45%, #38bdf8 100%);
|
background: linear-gradient(120deg, #1D4ED8, #2563EB 45%, #3B82F6 100%);
|
||||||
box-shadow: 0 8px 20px -12px color-mix(in srgb, var(--color-primary) 90%, transparent);
|
box-shadow: 0 8px 20px -12px color-mix(in srgb, var(--color-primary) 90%, transparent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -150,96 +178,650 @@
|
||||||
color: var(--color-primary);
|
color: var(--color-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 三张功能卡 */
|
/* 右侧:毛玻璃卡片里的 SVG 分支图 */
|
||||||
|
.qq-lp-visual {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-lp-graph {
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
aspect-ratio: 6 / 5;
|
||||||
|
min-height: 320px;
|
||||||
|
border: 1px solid var(--color-secondary);
|
||||||
|
border-radius: 18px;
|
||||||
|
background:
|
||||||
|
linear-gradient(155deg,
|
||||||
|
color-mix(in srgb, var(--color-primary) 9%, var(--color-box-body)) 0%,
|
||||||
|
color-mix(in srgb, #38BDF8 7%, var(--color-box-body)) 52%,
|
||||||
|
var(--color-box-body) 100%);
|
||||||
|
box-shadow: 0 30px 64px -44px color-mix(in srgb, var(--color-primary) 70%, transparent);
|
||||||
|
backdrop-filter: blur(12px);
|
||||||
|
-webkit-backdrop-filter: blur(12px);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 卡片内的一层柔光,避免整块太空 */
|
||||||
|
.qq-lp-graph::before {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
inset: -30% -10% auto -10%;
|
||||||
|
height: 80%;
|
||||||
|
pointer-events: none;
|
||||||
|
background: radial-gradient(closest-side,
|
||||||
|
color-mix(in srgb, var(--color-primary) 14%, transparent),
|
||||||
|
transparent 78%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-lp-graph-svg {
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qqg-edge {
|
||||||
|
fill: none;
|
||||||
|
stroke: url(#qqg-line);
|
||||||
|
stroke-width: 2;
|
||||||
|
stroke-linecap: round;
|
||||||
|
stroke-linejoin: round;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qqg-edge-faint {
|
||||||
|
fill: none;
|
||||||
|
stroke: color-mix(in srgb, var(--color-primary) 22%, transparent);
|
||||||
|
stroke-width: 1;
|
||||||
|
stroke-linecap: round;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qqg-flow {
|
||||||
|
stroke-dasharray: 5 11;
|
||||||
|
animation: qqg-dash 22s linear infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes qqg-dash {
|
||||||
|
to { stroke-dashoffset: -320; }
|
||||||
|
}
|
||||||
|
|
||||||
|
.qqg-node {
|
||||||
|
fill: var(--color-box-body);
|
||||||
|
stroke: #3B82F6;
|
||||||
|
stroke-width: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qqg-node-core {
|
||||||
|
fill: #3B82F6;
|
||||||
|
stroke: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qqg-node-soft {
|
||||||
|
fill: color-mix(in srgb, #93C5FD 55%, transparent);
|
||||||
|
stroke: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qqg-link {
|
||||||
|
stroke: color-mix(in srgb, var(--color-primary) 30%, transparent);
|
||||||
|
stroke-width: 1;
|
||||||
|
stroke-dasharray: 3 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 叠在右下角的 terminal 小窗 */
|
||||||
|
.qq-lp-term {
|
||||||
|
position: absolute;
|
||||||
|
right: 14px;
|
||||||
|
bottom: 14px;
|
||||||
|
width: min(94%, 468px);
|
||||||
|
overflow: hidden;
|
||||||
|
border: 1px solid rgba(148, 163, 184, 0.22);
|
||||||
|
border-radius: 12px;
|
||||||
|
background: #0B1220;
|
||||||
|
box-shadow: 0 20px 44px -24px rgba(2, 6, 23, 0.9);
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-lp-term-bar {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
height: 26px;
|
||||||
|
padding: 0 10px;
|
||||||
|
border-bottom: 1px solid rgba(148, 163, 184, 0.12);
|
||||||
|
background: rgba(148, 163, 184, 0.08);
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-lp-term-dots {
|
||||||
|
display: inline-flex;
|
||||||
|
gap: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-lp-term-dots i {
|
||||||
|
width: 7px;
|
||||||
|
height: 7px;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: #334155;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-lp-term-title {
|
||||||
|
font-family: var(--qq-font-mono);
|
||||||
|
font-size: 10px;
|
||||||
|
font-weight: 500;
|
||||||
|
letter-spacing: 0.1em;
|
||||||
|
text-transform: none;
|
||||||
|
color: #94A3B8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-lp-term-line {
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
padding: 12px 12px 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-lp-term-code {
|
||||||
|
flex: 1 1 auto;
|
||||||
|
min-width: 0;
|
||||||
|
overflow-x: auto;
|
||||||
|
white-space: nowrap;
|
||||||
|
font-family: var(--qq-font-mono);
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 500;
|
||||||
|
line-height: 1.5;
|
||||||
|
color: #E2E8F0;
|
||||||
|
scrollbar-width: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-lp-term-code::-webkit-scrollbar {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-prompt {
|
||||||
|
margin-right: 2px;
|
||||||
|
color: #38BDF8;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-url {
|
||||||
|
color: #93C5FD;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-lp-copy {
|
||||||
|
flex: 0 0 auto;
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
width: 30px;
|
||||||
|
height: 30px;
|
||||||
|
padding: 0;
|
||||||
|
border: 0;
|
||||||
|
border-radius: 8px;
|
||||||
|
background: rgba(148, 163, 184, 0.12);
|
||||||
|
color: #CBD5E1;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: background 0.16s ease, color 0.16s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-lp-copy:hover {
|
||||||
|
background: rgba(56, 189, 248, 0.18);
|
||||||
|
color: #E0F2FE;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-lp-copy:focus-visible {
|
||||||
|
outline: 2px solid #38BDF8;
|
||||||
|
outline-offset: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-lp-copy svg {
|
||||||
|
width: 15px;
|
||||||
|
height: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-lp-copy .qq-copy-check {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-lp-copy.is-copied {
|
||||||
|
background: rgba(37, 99, 235, 0.32);
|
||||||
|
color: #DBEAFE;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-lp-copy.is-copied .qq-copy-icon {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-lp-copy.is-copied .qq-copy-check {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-qc-tip {
|
||||||
|
position: absolute;
|
||||||
|
right: 48px;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
padding: 3px 8px;
|
||||||
|
border-radius: 6px;
|
||||||
|
font-size: 11px;
|
||||||
|
line-height: 1.4;
|
||||||
|
color: #DBEAFE;
|
||||||
|
background: rgba(37, 99, 235, 0.9);
|
||||||
|
opacity: 0;
|
||||||
|
pointer-events: none;
|
||||||
|
transition: opacity 0.16s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-qc-tip.is-on {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ② 热门公开仓库 */
|
||||||
|
.qq-lp-hot {
|
||||||
|
margin-top: 76px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-lp-sec-head {
|
||||||
|
display: flex;
|
||||||
|
align-items: baseline;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 16px;
|
||||||
|
margin-bottom: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-lp-sec-head h2 {
|
||||||
|
margin: 0;
|
||||||
|
font-size: 20px;
|
||||||
|
font-weight: 600;
|
||||||
|
letter-spacing: -0.01em;
|
||||||
|
color: var(--color-text);
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-lp-more {
|
||||||
|
font-size: 13px;
|
||||||
|
color: var(--color-text-light-2);
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-lp-more:hover {
|
||||||
|
color: var(--color-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-hot-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||||
|
gap: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-repo-card {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 10px;
|
||||||
|
padding: 16px 18px 14px;
|
||||||
|
border: 1px solid var(--color-secondary);
|
||||||
|
border-radius: 8px;
|
||||||
|
background: color-mix(in srgb, var(--color-box-body) 92%, transparent);
|
||||||
|
color: var(--color-text);
|
||||||
|
transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-repo-card:hover {
|
||||||
|
transform: translateY(-2px);
|
||||||
|
border-color: var(--color-primary);
|
||||||
|
color: var(--color-text);
|
||||||
|
box-shadow: 0 14px 28px -22px color-mix(in srgb, var(--color-primary) 70%, transparent);
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-repo-card:focus-visible {
|
||||||
|
outline: 2px solid var(--color-primary);
|
||||||
|
outline-offset: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-repo-head {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-repo-avatar {
|
||||||
|
flex: 0 0 auto;
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
border-radius: 4px;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-repo-avatar-fallback {
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
font-family: var(--qq-font-mono);
|
||||||
|
font-size: 11px;
|
||||||
|
font-weight: 700;
|
||||||
|
color: var(--color-primary);
|
||||||
|
background: color-mix(in srgb, var(--color-primary) 16%, transparent);
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-repo-name {
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
font-family: var(--qq-font-mono);
|
||||||
|
font-size: 13.5px;
|
||||||
|
font-weight: 500;
|
||||||
|
letter-spacing: -0.01em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-repo-owner {
|
||||||
|
font-weight: 400;
|
||||||
|
color: var(--color-text-light-2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-repo-desc {
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
overflow: hidden;
|
||||||
|
min-height: 2.6em;
|
||||||
|
margin: 0;
|
||||||
|
font-size: 12.5px;
|
||||||
|
line-height: 1.65;
|
||||||
|
color: var(--color-text-light-2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-repo-meta {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 14px;
|
||||||
|
margin-top: auto;
|
||||||
|
font-size: 11.5px;
|
||||||
|
white-space: nowrap;
|
||||||
|
color: var(--color-text-light-2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-repo-lang {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 6px;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-repo-lang-name {
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-repo-dot {
|
||||||
|
flex: 0 0 auto;
|
||||||
|
width: 8px;
|
||||||
|
height: 8px;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: var(--qq-dot, #3B82F6);
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-repo-stat {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 4px;
|
||||||
|
font-variant-numeric: tabular-nums;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-repo-stat-icon {
|
||||||
|
font-size: 10px;
|
||||||
|
color: var(--color-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-repo-time {
|
||||||
|
overflow: hidden;
|
||||||
|
margin-left: auto;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 骨架屏 */
|
||||||
|
.qq-skeleton {
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-skeleton::after {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
background: linear-gradient(100deg,
|
||||||
|
transparent 18%,
|
||||||
|
color-mix(in srgb, var(--color-primary) 9%, transparent) 50%,
|
||||||
|
transparent 82%);
|
||||||
|
transform: translateX(-100%);
|
||||||
|
animation: qq-skeleton-sweep 1.5s ease-in-out infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-skeleton {
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-sk-bar {
|
||||||
|
display: block;
|
||||||
|
height: 10px;
|
||||||
|
border-radius: 5px;
|
||||||
|
background: color-mix(in srgb, var(--color-text-light-2) 14%, transparent);
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-sk-title {
|
||||||
|
width: 52%;
|
||||||
|
height: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-sk-desc {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-sk-desc-2 {
|
||||||
|
width: 68%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-sk-meta {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
margin-top: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-sk-pill {
|
||||||
|
width: 54px;
|
||||||
|
height: 9px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-sk-pill-end {
|
||||||
|
width: 66px;
|
||||||
|
margin-left: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes qq-skeleton-sweep {
|
||||||
|
to { transform: translateX(100%); }
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ③ 功能卡:收尾,视觉降一级(不再用毛玻璃与上浮) */
|
||||||
.qq-lp-grid {
|
.qq-lp-grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||||
gap: 18px;
|
gap: 16px;
|
||||||
margin-top: 9vh;
|
margin-top: 64px;
|
||||||
|
padding-top: 40px;
|
||||||
|
border-top: 1px solid var(--color-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.qq-lp-card {
|
.qq-lp-card {
|
||||||
padding: 22px 20px;
|
padding: 18px;
|
||||||
border: 1px solid var(--color-secondary);
|
border: 1px solid var(--color-secondary);
|
||||||
border-radius: 14px;
|
border-radius: 12px;
|
||||||
background: color-mix(in srgb, var(--color-box-body) 88%, transparent);
|
background: transparent;
|
||||||
backdrop-filter: blur(10px);
|
transition: border-color 0.18s ease;
|
||||||
-webkit-backdrop-filter: blur(10px);
|
|
||||||
transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.qq-lp-card:hover {
|
.qq-lp-card:hover {
|
||||||
transform: translateY(-3px);
|
border-color: color-mix(in srgb, var(--color-primary) 34%, var(--color-secondary));
|
||||||
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 {
|
.qq-lp-icon {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
width: 34px;
|
width: 30px;
|
||||||
height: 34px;
|
height: 30px;
|
||||||
border-radius: 10px;
|
border-radius: 8px;
|
||||||
color: var(--color-primary);
|
color: var(--color-primary);
|
||||||
background: color-mix(in srgb, var(--color-primary) 14%, transparent);
|
background: color-mix(in srgb, var(--color-primary) 12%, transparent);
|
||||||
}
|
}
|
||||||
|
|
||||||
.qq-lp-card h2 {
|
.qq-lp-card h2 {
|
||||||
margin: 14px 0 6px;
|
margin: 12px 0 4px;
|
||||||
font-size: 16px;
|
font-size: 15px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: var(--color-text);
|
color: var(--color-text);
|
||||||
}
|
}
|
||||||
|
|
||||||
.qq-lp-card p {
|
.qq-lp-card p {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: 13.5px;
|
font-size: 13px;
|
||||||
line-height: 1.7;
|
line-height: 1.7;
|
||||||
color: var(--color-text-light-2);
|
color: var(--color-text-light-2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 事实条 */
|
/* 响应式:>1024 分栏;641–1024 上下堆叠;≤640 单列 + 分支图隐藏 */
|
||||||
.qq-lp-stats {
|
@media (max-width: 1024px) {
|
||||||
display: grid;
|
.page-content.home.qq-landing {
|
||||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
padding: 4vh 24px 9vh;
|
||||||
gap: 1px;
|
|
||||||
margin-top: 7vh;
|
|
||||||
border: 1px solid var(--color-secondary);
|
|
||||||
border-radius: 14px;
|
|
||||||
overflow: hidden;
|
|
||||||
background: var(--color-secondary);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.qq-lp-stat {
|
.qq-lp-hero {
|
||||||
display: flex;
|
grid-template-columns: minmax(0, 1fr);
|
||||||
flex-direction: column;
|
gap: 38px;
|
||||||
align-items: center;
|
--qq-mx: 20%;
|
||||||
gap: 4px;
|
|
||||||
padding: 18px 12px;
|
|
||||||
background: var(--color-box-body);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.qq-lp-stat strong {
|
.qq-lp-visual {
|
||||||
font-size: 17px;
|
width: 100%;
|
||||||
font-weight: 600;
|
max-width: 660px;
|
||||||
color: var(--color-text);
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.qq-lp-stat span {
|
.qq-lp-graph {
|
||||||
font-size: 12px;
|
aspect-ratio: 16 / 10;
|
||||||
color: var(--color-text-light-2);
|
min-height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 860px) {
|
.qq-hot-grid {
|
||||||
.qq-lp-grid {
|
|
||||||
grid-template-columns: 1fr;
|
|
||||||
margin-top: 6vh;
|
|
||||||
}
|
|
||||||
|
|
||||||
.qq-lp-stats {
|
|
||||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.qq-lp-grid {
|
||||||
|
margin-top: 48px;
|
||||||
|
padding-top: 32px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 640px) {
|
||||||
|
.page-content.home.qq-landing {
|
||||||
|
padding: 24px 18px 72px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-lp-hero {
|
||||||
|
gap: 26px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-lp-title {
|
||||||
|
margin-top: 14px;
|
||||||
|
font-size: clamp(44px, 13vw, 56px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-lp-sub {
|
||||||
|
font-size: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-lp-search {
|
||||||
|
gap: 8px;
|
||||||
|
margin-top: 22px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-lp-search input[type="search"] {
|
||||||
|
height: 44px;
|
||||||
|
padding: 0 12px;
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-lp-search .ui.primary.button {
|
||||||
|
height: 44px;
|
||||||
|
padding: 0 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-lp-cta {
|
||||||
|
gap: 10px;
|
||||||
|
margin-top: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-lp-cta .ui.button {
|
||||||
|
padding: 9px 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 分支图隐藏,terminal 变单行可横向滚动 */
|
||||||
|
.qq-lp-graph {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-lp-term {
|
||||||
|
position: static;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-lp-term-line {
|
||||||
|
padding: 11px 10px 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-lp-term-code {
|
||||||
|
font-size: 11px;
|
||||||
|
/* 小屏单行可横滑:右缘渐隐提示还有内容 */
|
||||||
|
-webkit-mask-image: linear-gradient(90deg, #000 84%, transparent 100%);
|
||||||
|
mask-image: linear-gradient(90deg, #000 84%, transparent 100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-lp-hot {
|
||||||
|
margin-top: 44px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-lp-sec-head {
|
||||||
|
margin-bottom: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-lp-sec-head h2 {
|
||||||
|
font-size: 17px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-hot-grid {
|
||||||
|
grid-template-columns: minmax(0, 1fr);
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-lp-grid {
|
||||||
|
grid-template-columns: minmax(0, 1fr);
|
||||||
|
gap: 12px;
|
||||||
|
margin-top: 40px;
|
||||||
|
padding-top: 28px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 减少动效:分支图静止、骨架不闪 */
|
||||||
|
@media (prefers-reduced-motion: reduce) {
|
||||||
|
.qqg-flow {
|
||||||
|
animation: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-skeleton::after {
|
||||||
|
animation: none;
|
||||||
|
opacity: 0.35;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-lp-hero::before {
|
||||||
|
transition: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qq-lp-sub.qq-typing::after,
|
||||||
|
.qq-lp-sub.qq-typed::after {
|
||||||
|
animation: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------------------------------------------------------------- Dashboard */
|
/* ---------------------------------------------------------------- Dashboard */
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,274 @@
|
||||||
|
/*
|
||||||
|
* qq-home.js —— 未登录首页的两件小事(纯前端,无依赖)
|
||||||
|
* ---------------------------------------------------------------------------
|
||||||
|
* 1. 热门公开仓库:调 Gitea 公开 API → 前端过滤/排序 → 渲染 3 张卡片
|
||||||
|
* 2. terminal 小窗的「复制 clone 命令」按钮
|
||||||
|
*
|
||||||
|
* 只在首页存在 #qq-hot-repos 时启动;其余页面直接 return。
|
||||||
|
* 取数失败的策略是「静默隐藏整块」,不弹错、不留空框。
|
||||||
|
*/
|
||||||
|
(function () {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
/* ---------------- 0. 小工具 ---------------- */
|
||||||
|
var HOT_LIMIT = 3; // 最终展示几条
|
||||||
|
var FETCH_LIMIT = 50; // 接口多取一些,前端再筛
|
||||||
|
var FETCH_TIMEOUT = 5000; // 5s 超时后静默隐藏
|
||||||
|
// 语言圆点:只用品牌蓝色阶(按语言名哈希取色),不用 Gitea 原生语言色
|
||||||
|
var DOT_COLORS = ['#1D4ED8', '#3B82F6', '#60A5FA', '#93C5FD'];
|
||||||
|
var reduceMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
||||||
|
|
||||||
|
function make(tag, className, text) {
|
||||||
|
var node = document.createElement(tag);
|
||||||
|
if (className) node.className = className;
|
||||||
|
if (text != null) node.textContent = text;
|
||||||
|
return node;
|
||||||
|
}
|
||||||
|
|
||||||
|
function hashStr(str) {
|
||||||
|
var h = 0;
|
||||||
|
for (var i = 0; i < str.length; i++) {
|
||||||
|
h = (h * 31 + str.charCodeAt(i)) | 0;
|
||||||
|
}
|
||||||
|
return Math.abs(h);
|
||||||
|
}
|
||||||
|
|
||||||
|
function dotColor(language) {
|
||||||
|
if (!language) return DOT_COLORS[1];
|
||||||
|
return DOT_COLORS[hashStr(language) % DOT_COLORS.length];
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 相对时间:刚刚 / N 分钟前 / N 小时前 / N 天前 / N 个月前 / N 年前 */
|
||||||
|
function relativeTime(iso) {
|
||||||
|
var t = Date.parse(iso || '');
|
||||||
|
if (isNaN(t)) return '';
|
||||||
|
var sec = Math.max(0, (Date.now() - t) / 1000);
|
||||||
|
if (sec < 60) return '刚刚';
|
||||||
|
if (sec < 3600) return Math.floor(sec / 60) + ' 分钟前';
|
||||||
|
if (sec < 86400) return Math.floor(sec / 3600) + ' 小时前';
|
||||||
|
if (sec < 2592000) return Math.floor(sec / 86400) + ' 天前';
|
||||||
|
if (sec < 31536000) return Math.floor(sec / 2592000) + ' 个月前';
|
||||||
|
return Math.floor(sec / 31536000) + ' 年前';
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 过滤 + 排序:排除 fork / 镜像 / 私有 / 归档;星标降序,同星按更新时间降序 */
|
||||||
|
function pickRepos(list) {
|
||||||
|
return (list || []).filter(function (repo) {
|
||||||
|
return repo && repo.full_name && !repo.fork && !repo.mirror && !repo.private && !repo.archived;
|
||||||
|
}).sort(function (a, b) {
|
||||||
|
var byStars = (b.stars_count || 0) - (a.stars_count || 0);
|
||||||
|
if (byStars) return byStars;
|
||||||
|
return Date.parse(b.updated_at || 0) - Date.parse(a.updated_at || 0);
|
||||||
|
}).slice(0, HOT_LIMIT);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---------------- 1. 热门公开仓库 ---------------- */
|
||||||
|
function initHotRepos() {
|
||||||
|
var section = document.getElementById('qq-hot-repos');
|
||||||
|
if (!section) return;
|
||||||
|
var grid = section.querySelector('[data-qq-hot-grid]');
|
||||||
|
if (!grid) return;
|
||||||
|
|
||||||
|
function hide() {
|
||||||
|
section.hidden = true;
|
||||||
|
grid.textContent = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
function skeletonCard() {
|
||||||
|
var card = make('div', 'qq-repo-card qq-skeleton');
|
||||||
|
card.setAttribute('aria-hidden', 'true');
|
||||||
|
card.appendChild(make('span', 'qq-sk-bar qq-sk-title'));
|
||||||
|
card.appendChild(make('span', 'qq-sk-bar qq-sk-desc'));
|
||||||
|
card.appendChild(make('span', 'qq-sk-bar qq-sk-desc qq-sk-desc-2'));
|
||||||
|
var meta = make('div', 'qq-sk-meta');
|
||||||
|
meta.appendChild(make('span', 'qq-sk-bar qq-sk-pill'));
|
||||||
|
meta.appendChild(make('span', 'qq-sk-bar qq-sk-pill'));
|
||||||
|
meta.appendChild(make('span', 'qq-sk-bar qq-sk-pill qq-sk-pill-end'));
|
||||||
|
card.appendChild(meta);
|
||||||
|
return card;
|
||||||
|
}
|
||||||
|
|
||||||
|
function showSkeletons() {
|
||||||
|
grid.textContent = '';
|
||||||
|
for (var i = 0; i < HOT_LIMIT; i++) grid.appendChild(skeletonCard());
|
||||||
|
section.hidden = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function avatar(repo) {
|
||||||
|
var owner = (repo.owner && repo.owner.login) || (repo.full_name || '').split('/')[0] || '?';
|
||||||
|
var src = repo.owner && repo.owner.avatar_url;
|
||||||
|
if (src) {
|
||||||
|
var img = document.createElement('img');
|
||||||
|
img.className = 'qq-repo-avatar';
|
||||||
|
img.src = src;
|
||||||
|
img.alt = '';
|
||||||
|
img.width = 20;
|
||||||
|
img.height = 20;
|
||||||
|
img.loading = 'lazy';
|
||||||
|
img.decoding = 'async';
|
||||||
|
// 头像挂了就退回首字母,不出现破图
|
||||||
|
img.addEventListener('error', function () {
|
||||||
|
var fallback = make('span', 'qq-repo-avatar qq-repo-avatar-fallback', owner.charAt(0).toUpperCase());
|
||||||
|
if (img.parentNode) img.parentNode.replaceChild(fallback, img);
|
||||||
|
});
|
||||||
|
return img;
|
||||||
|
}
|
||||||
|
return make('span', 'qq-repo-avatar qq-repo-avatar-fallback', owner.charAt(0).toUpperCase());
|
||||||
|
}
|
||||||
|
|
||||||
|
function repoCard(repo) {
|
||||||
|
var card = document.createElement('a');
|
||||||
|
card.className = 'qq-repo-card';
|
||||||
|
card.href = repo.html_url || '#';
|
||||||
|
|
||||||
|
var head = make('div', 'qq-repo-head');
|
||||||
|
head.appendChild(avatar(repo));
|
||||||
|
var name = make('span', 'qq-repo-name');
|
||||||
|
var parts = String(repo.full_name).split('/');
|
||||||
|
name.appendChild(make('span', 'qq-repo-owner', parts[0] + '/'));
|
||||||
|
name.appendChild(make('span', 'qq-repo-repo', parts.slice(1).join('/')));
|
||||||
|
name.title = repo.full_name;
|
||||||
|
head.appendChild(name);
|
||||||
|
card.appendChild(head);
|
||||||
|
|
||||||
|
var desc = make('p', 'qq-repo-desc', repo.description || '暂无简介');
|
||||||
|
card.appendChild(desc);
|
||||||
|
|
||||||
|
var meta = make('div', 'qq-repo-meta');
|
||||||
|
var lang = make('span', 'qq-repo-lang');
|
||||||
|
var dot = make('span', 'qq-repo-dot');
|
||||||
|
dot.style.setProperty('--qq-dot', dotColor(repo.language));
|
||||||
|
lang.appendChild(dot);
|
||||||
|
lang.appendChild(make('span', 'qq-repo-lang-name', repo.language || '未标注语言'));
|
||||||
|
meta.appendChild(lang);
|
||||||
|
|
||||||
|
var stars = make('span', 'qq-repo-stat');
|
||||||
|
stars.appendChild(make('span', 'qq-repo-stat-icon', '★'));
|
||||||
|
stars.appendChild(make('span', null, String(repo.stars_count || 0)));
|
||||||
|
stars.title = '星标';
|
||||||
|
meta.appendChild(stars);
|
||||||
|
|
||||||
|
var forks = make('span', 'qq-repo-stat');
|
||||||
|
forks.appendChild(make('span', 'qq-repo-stat-icon', '⑂'));
|
||||||
|
forks.appendChild(make('span', null, String(repo.forks_count || 0)));
|
||||||
|
forks.title = '分支';
|
||||||
|
meta.appendChild(forks);
|
||||||
|
|
||||||
|
var updated = relativeTime(repo.updated_at);
|
||||||
|
meta.appendChild(make('span', 'qq-repo-time', updated ? updated + '更新' : ''));
|
||||||
|
|
||||||
|
card.appendChild(meta);
|
||||||
|
return card;
|
||||||
|
}
|
||||||
|
|
||||||
|
function render(list) {
|
||||||
|
if (!list.length) { hide(); return; }
|
||||||
|
grid.textContent = '';
|
||||||
|
list.forEach(function (repo) { grid.appendChild(repoCard(repo)); });
|
||||||
|
section.hidden = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 离线预览:不碰网络,直接用页面里的假数据 */
|
||||||
|
var demo = section.getAttribute('data-demo') === '1' && window.QQ_HOT_REPOS_DEMO;
|
||||||
|
if (demo) {
|
||||||
|
showSkeletons();
|
||||||
|
window.setTimeout(function () { render(pickRepos(window.QQ_HOT_REPOS_DEMO)); }, reduceMotion ? 0 : 320);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var endpoint = section.getAttribute('data-endpoint');
|
||||||
|
if (!endpoint) { hide(); return; }
|
||||||
|
|
||||||
|
showSkeletons();
|
||||||
|
|
||||||
|
var controller = window.AbortController ? new window.AbortController() : null;
|
||||||
|
var settled = false;
|
||||||
|
var timer = window.setTimeout(function () {
|
||||||
|
if (settled) return;
|
||||||
|
settled = true;
|
||||||
|
if (controller) {
|
||||||
|
try { controller.abort(); } catch (e) { /* ignore */ }
|
||||||
|
}
|
||||||
|
hide();
|
||||||
|
}, FETCH_TIMEOUT);
|
||||||
|
|
||||||
|
function done() {
|
||||||
|
settled = true;
|
||||||
|
window.clearTimeout(timer);
|
||||||
|
}
|
||||||
|
|
||||||
|
var sep = endpoint.indexOf('?') === -1 ? '?' : '&';
|
||||||
|
var url = endpoint + sep + 'sort=updated&order=desc&limit=' + FETCH_LIMIT + '&mode=source';
|
||||||
|
|
||||||
|
window.fetch(url, {
|
||||||
|
method: 'GET',
|
||||||
|
credentials: 'same-origin',
|
||||||
|
headers: { Accept: 'application/json' },
|
||||||
|
signal: controller ? controller.signal : undefined
|
||||||
|
}).then(function (res) {
|
||||||
|
if (!res.ok) throw new Error('HTTP ' + res.status);
|
||||||
|
return res.json();
|
||||||
|
}).then(function (data) {
|
||||||
|
done();
|
||||||
|
render(pickRepos(data && data.data));
|
||||||
|
}).catch(function () {
|
||||||
|
if (settled) return;
|
||||||
|
done();
|
||||||
|
hide();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---------------- 2. 复制 clone 命令 ---------------- */
|
||||||
|
function fallbackCopy(text) {
|
||||||
|
var area = document.createElement('textarea');
|
||||||
|
area.value = text;
|
||||||
|
area.setAttribute('readonly', '');
|
||||||
|
area.style.position = 'fixed';
|
||||||
|
area.style.top = '-1000px';
|
||||||
|
area.style.opacity = '0';
|
||||||
|
document.body.appendChild(area);
|
||||||
|
area.select();
|
||||||
|
var ok = false;
|
||||||
|
try { ok = document.execCommand('copy'); } catch (e) { ok = false; }
|
||||||
|
document.body.removeChild(area);
|
||||||
|
return ok;
|
||||||
|
}
|
||||||
|
|
||||||
|
function initCopy() {
|
||||||
|
var buttons = document.querySelectorAll('[data-qq-copy]');
|
||||||
|
Array.prototype.forEach.call(buttons, function (btn) {
|
||||||
|
var text = btn.getAttribute('data-qq-copy');
|
||||||
|
if (!text) return;
|
||||||
|
var tip = btn.parentNode ? btn.parentNode.querySelector('.qq-qc-tip') : null;
|
||||||
|
var resetTimer = 0;
|
||||||
|
|
||||||
|
function feedback() {
|
||||||
|
btn.classList.add('is-copied');
|
||||||
|
btn.setAttribute('aria-label', '已复制');
|
||||||
|
if (tip) {
|
||||||
|
tip.classList.add('is-on');
|
||||||
|
tip.textContent = '已复制';
|
||||||
|
}
|
||||||
|
window.clearTimeout(resetTimer);
|
||||||
|
resetTimer = window.setTimeout(function () {
|
||||||
|
btn.classList.remove('is-copied');
|
||||||
|
btn.setAttribute('aria-label', '复制 clone 命令');
|
||||||
|
if (tip) tip.classList.remove('is-on');
|
||||||
|
}, 1600);
|
||||||
|
}
|
||||||
|
|
||||||
|
btn.addEventListener('click', function () {
|
||||||
|
if (navigator.clipboard && navigator.clipboard.writeText) {
|
||||||
|
navigator.clipboard.writeText(text).then(feedback, function () {
|
||||||
|
if (fallbackCopy(text)) feedback();
|
||||||
|
});
|
||||||
|
} else if (fallbackCopy(text)) {
|
||||||
|
feedback();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
initHotRepos();
|
||||||
|
initCopy();
|
||||||
|
})();
|
||||||
|
|
@ -15,4 +15,4 @@
|
||||||
动效层:只在首页(.page-content.home)和登录页(.page-content.user.signin)生效,
|
动效层:只在首页(.page-content.home)和登录页(.page-content.user.signin)生效,
|
||||||
其它页面 qq-fx.js 里第一行就 return,不会加载 canvas、不会挂 rAF。
|
其它页面 qq-fx.js 里第一行就 return,不会加载 canvas、不会挂 rAF。
|
||||||
*/}}
|
*/}}
|
||||||
<script src="{{AssetUrlPrefix}}/js/qq-fx.js" defer></script>
|
<script src="{{AssetUrlPrefix}}/js/qq-fx.js?v=2" defer></script>
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
<link rel="preload" href="{{AssetUrlPrefix}}/fonts/jetbrains-mono-latin-400-normal.woff2" as="font" type="font/woff2" crossorigin="anonymous">
|
<link rel="preload" href="{{AssetUrlPrefix}}/fonts/jetbrains-mono-latin-400-normal.woff2" as="font" type="font/woff2" crossorigin="anonymous">
|
||||||
<link rel="stylesheet" href="{{AssetUrlPrefix}}/css/qq-ui.css?v=29">
|
<link rel="stylesheet" href="{{AssetUrlPrefix}}/css/qq-ui.css?v=29">
|
||||||
<link rel="stylesheet" href="{{AssetUrlPrefix}}/css/qq-fx.css?v=26">
|
<link rel="stylesheet" href="{{AssetUrlPrefix}}/css/qq-fx.css?v=26">
|
||||||
<link rel="stylesheet" href="{{AssetUrlPrefix}}/css/qq-pages.css?v=29">
|
<link rel="stylesheet" href="{{AssetUrlPrefix}}/css/qq-pages.css?v=30">
|
||||||
<meta name="theme-color" content="#60A5FA" media="(prefers-color-scheme: light)">
|
<meta name="theme-color" content="#60A5FA" media="(prefers-color-scheme: light)">
|
||||||
<meta name="theme-color" content="#0D1117" media="(prefers-color-scheme: dark)">
|
<meta name="theme-color" content="#0D1117" media="(prefers-color-scheme: dark)">
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,18 @@
|
||||||
{{/* home.tmpl —— 未登录首页(模板覆盖,不改源码;删掉本文件即回到官方首页)
|
{{/* home.tmpl —— 未登录首页(模板覆盖,不改源码;删掉本文件即回到官方首页)
|
||||||
版式参考 GitHub 首页:
|
v1.4 版式(方案 A + B 合并):
|
||||||
· 居中的大标题 + 一句话说明 + 搜索框 + 主次按钮
|
· 首屏左右分栏:左 7/12 标题/口号/搜索/按钮,右 5/12 毛玻璃分支图 + terminal 小窗
|
||||||
· 下面一排功能卡片,再往下一条数字/事实带
|
· 热门公开仓库:/api/v1/repos/search 取数,前端过滤排序后只留 3 条
|
||||||
· 品牌色仍是蓝白,动效(粒子星座 / 光雾)由 qq-fx.css + qq-fx.js 提供
|
· 三张功能卡收尾,数字条已按方案 A 删除
|
||||||
|
品牌色仍是蓝白;动效(粒子星座 / 光雾 / 打字机)由 qq-fx.css + qq-fx.js 提供。
|
||||||
i18n:新的标题/卡片文案是本项目自己的,直接写中文;Gitea 版本号用 {{AppVer}}。 */}}
|
i18n:新的标题/卡片文案是本项目自己的,直接写中文;Gitea 版本号用 {{AppVer}}。 */}}
|
||||||
{{template "base/head" .}}
|
{{template "base/head" .}}
|
||||||
<div role="main" aria-label="{{ctx.Locale.Tr "home"}}" class="page-content home qq-landing">
|
<div role="main" aria-label="{{ctx.Locale.Tr "home"}}" class="page-content home qq-landing">
|
||||||
|
|
||||||
<section class="qq-lp-hero">
|
<section class="qq-lp-hero">
|
||||||
<div class="qq-logo-halo qq-lp-logo">
|
<div class="qq-lp-hero-copy">
|
||||||
<img width="72" height="72" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{AppName}}">
|
|
||||||
</div>
|
|
||||||
<p class="qq-lp-eyebrow">私有部署 · 轻量 · 全功能</p>
|
<p class="qq-lp-eyebrow">私有部署 · 轻量 · 全功能</p>
|
||||||
<h1 class="qq-lp-title">{{AppName}}</h1>
|
<h1 class="qq-lp-title">{{AppName}}</h1>
|
||||||
<p class="qq-lp-sub">自己的代码,自己的地方。</p>
|
<p class="qq-lp-sub" data-qq-type="自己的代码,自己的地方。">自己的代码,自己的地方。</p>
|
||||||
|
|
||||||
<form class="qq-lp-search" action="{{AppSubUrl}}/explore/repos" method="get">
|
<form class="qq-lp-search" action="{{AppSubUrl}}/explore/repos" method="get">
|
||||||
<input type="search" name="q" placeholder="搜索仓库、用户、组织…" aria-label="搜索仓库">
|
<input type="search" name="q" placeholder="搜索仓库、用户、组织…" aria-label="搜索仓库">
|
||||||
|
|
@ -30,6 +29,78 @@
|
||||||
{{end}}
|
{{end}}
|
||||||
<a class="qq-lp-link" href="{{AppSubUrl}}/explore/repos">浏览全部仓库 →</a>
|
<a class="qq-lp-link" href="{{AppSubUrl}}/explore/repos">浏览全部仓库 →</a>
|
||||||
</div>
|
</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>
|
||||||
|
|
||||||
<section class="qq-lp-grid">
|
<section class="qq-lp-grid">
|
||||||
|
|
@ -50,24 +121,6 @@
|
||||||
</article>
|
</article>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="qq-lp-stats">
|
|
||||||
<div class="qq-lp-stat">
|
|
||||||
<strong>{{AppVer}}</strong>
|
|
||||||
<span>Gitea 版本</span>
|
|
||||||
</div>
|
|
||||||
<div class="qq-lp-stat">
|
|
||||||
<strong>MIT</strong>
|
|
||||||
<span>开源协议</span>
|
|
||||||
</div>
|
|
||||||
<div class="qq-lp-stat">
|
|
||||||
<strong>MySQL</strong>
|
|
||||||
<span>独立数据库存储</span>
|
|
||||||
</div>
|
|
||||||
<div class="qq-lp-stat">
|
|
||||||
<strong>1 台</strong>
|
|
||||||
<span>服务器即可跑</span>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<script src="{{AssetUrlPrefix}}/js/qq-home.js?v=1" defer></script>
|
||||||
{{template "base/footer" .}}
|
{{template "base/footer" .}}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,140 @@
|
||||||
|
# 规划 · 未登录首页 v1.4(方案 A 首屏 + 热门公开仓库)
|
||||||
|
|
||||||
|
> 状态:**仅规划,未动任何代码**(2026-11-05)
|
||||||
|
> 目标实例:`https://git.qyhhh.top`(Gitea 1.21.11)
|
||||||
|
> 铁律不变:只走 `custom/` 覆盖、先 `preview/` 后线上、蓝白配色、**禁止绿色**、大量留白。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 1. 已确认的决策
|
||||||
|
|
||||||
|
| # | 问题 | 决定 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| 1 | 热门仓库放几个 | **单行 3 个**(宽屏 3 列 × 1 行) |
|
||||||
|
| 2 | 排序 | **星标优先**(同星数再按最近更新) |
|
||||||
|
| 3 | Fork / 镜像仓库 | **排除** |
|
||||||
|
| 4 | 数字条 | **待定**,默认建议:删除(见 §6) |
|
||||||
|
| 5 | 终端 `git clone` 示例 | **占位地址** `https://git.qyhhh.top/qq/repo.git` |
|
||||||
|
|
||||||
|
参考效果图:`dsh-image-gen/image-5f71a3ab.png`(方案 A)、`dsh-image-gen/image-c8208180.png`(方案 B 的仓库区)。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 2. 页面结构(自上而下)
|
||||||
|
|
||||||
|
| 区块 | 内容 | 备注 |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| 顶栏 | Gitea 原生顶栏 | 不动,沿用 `qq-ui.css` 毛玻璃 |
|
||||||
|
| ① 首屏 Hero(左右分栏) | **左 7/12**:渐变大标题 `{{AppName}}`、口号「自己的代码,自己的地方。」、搜索框(提交到 `/explore/repos`)、主按钮「免费注册」/ 次按钮「登录」/ 文字链「浏览全部仓库 →」<br>**右 5/12**:毛玻璃卡片,内含 SVG 提交分支图(蓝色节点 + 分叉线),右下叠终端小窗 `$ git clone https://git.qyhhh.top/qq/repo.git` + 复制按钮 | 方案 A |
|
||||||
|
| ② 热门公开仓库 | 标题「热门公开仓库」+ 右侧「查看全部 →」(`/explore/repos?sort=moststars`);**3 张卡片单行** | 方案 B 的仓库区 |
|
||||||
|
| ③ 功能卡 | 沿用现有三卡(版本控制 / 议题与看板 / 数据自持),视觉降一级作为收尾 | 文案不变 |
|
||||||
|
| ④ 数字条 | 待定(§6) | — |
|
||||||
|
| 页脚 | 左站点信息 / 中语言切换 / 右 ICP 备案号 | 不动 |
|
||||||
|
|
||||||
|
整体限宽 **1280px 居中**,与登录后控制台一致。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 3. 仓库卡片规格
|
||||||
|
|
||||||
|
```
|
||||||
|
┌────────────────────────────────────┐
|
||||||
|
│ (头像20px) owner/仓库名 │
|
||||||
|
│ 描述文字,最多两行,超出省略…… │
|
||||||
|
│ ● 语言 ★ 12 ⑂ 3 3 天前更新 │
|
||||||
|
└────────────────────────────────────┘
|
||||||
|
```
|
||||||
|
|
||||||
|
- 语言圆点:**只用品牌蓝色阶**(`#1D4ED8` / `#3B82F6` / `#60A5FA` / `#93C5FD` 按语言名哈希取色),不用 Gitea 原生语言色(含绿色)。
|
||||||
|
- hover:上浮 2px,描边变主色 `#3B82F6`(深色 `#38BDF8`)。
|
||||||
|
- 深色模式:卡片底 `#161B22`,沿用 `qq-dark` 变量。
|
||||||
|
- 圆角 8px,字体 JetBrains Mono(数字/仓库名)。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 4. 数据来源(关键技术点)
|
||||||
|
|
||||||
|
Gitea 1.21 的首页 handler **不给模板传仓库列表**,因此改为前端调用官方公开 API:
|
||||||
|
|
||||||
|
```
|
||||||
|
GET /api/v1/repos/search?sort=stars&order=desc&limit=10&mode=source
|
||||||
|
```
|
||||||
|
|
||||||
|
- 匿名调用只返回公开仓库,不会泄露私有仓库。
|
||||||
|
- 取多一些(10 个)在前端二次过滤:去掉 `fork === true`、`mirror === true`、`private === true`、`archived === true`(归档是否排除可再议),按 `stars_count` 降序、同星按 `updated_at` 降序,截取前 **3** 个。
|
||||||
|
- 使用字段:`full_name`、`html_url`、`description`、`language`、`stars_count`、`forks_count`、`updated_at`、`owner.avatar_url`。
|
||||||
|
- 状态处理:
|
||||||
|
- 加载中:3 张骨架卡占位(无闪烁时遵守 `prefers-reduced-motion`);
|
||||||
|
- 结果为 0:整块隐藏,只留首屏「浏览全部仓库 →」;
|
||||||
|
- 接口失败 / 超时(5s):静默隐藏,不报错。
|
||||||
|
- **前置条件**:需实测匿名能访问该接口(`REQUIRE_SIGNIN_VIEW=false` 且 API 未禁用)。若不可用,退路是只放「查看全部仓库」入口,不做卡片。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 5. 涉及文件
|
||||||
|
|
||||||
|
| 文件 | 改动 |
|
||||||
|
| --- | --- |
|
||||||
|
| `custom/templates/home.tmpl` | 重写 Hero 为左右分栏;新增仓库区空容器 `#qq-hot-repos` + 3 张骨架卡;`<script defer src="{{AssetUrlPrefix}}/js/qq-home.js?v=…">` 仅在首页引入 |
|
||||||
|
| `custom/public/assets/css/qq-pages.css` | 新增 `.qq-lp-split` / `.qq-lp-graph` / `.qq-lp-term` / `.qq-repo-card` / `.qq-skeleton` 等样式,沿用 `.qq-lp-*` 前缀 |
|
||||||
|
| `custom/public/assets/js/qq-home.js`(新增) | 拉 API → 过滤排序 → 渲染卡片;复制 clone 命令(`navigator.clipboard`,失败回退 `execCommand`);相对时间格式化 |
|
||||||
|
| `custom/public/assets/js/qq-fx.js` | 光斑 / 打字机挂载点随新 Hero 结构调整(选择器更新) |
|
||||||
|
| `custom/public/assets/css/qq-fx.css` | 如有 Hero 相关选择器同步调整 |
|
||||||
|
| `preview/index.html`(+ `preview/app.js`) | 落地页段换成新版式,仓库区用**本地假数据**,不打线上 |
|
||||||
|
| `docs/TODO.md` | 新增「阶段 8 · 首页 v1.4」条目与部署记录 |
|
||||||
|
|
||||||
|
不新增模板钩子以外的任何覆盖,不改 `app.ini`。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 6. 关于「数字条」(待确认)
|
||||||
|
|
||||||
|
数字条指当前首页最底部那一排四格:
|
||||||
|
|
||||||
|
| 1.21.11 | MIT | MySQL | 1 台 |
|
||||||
|
| --- | --- | --- | --- |
|
||||||
|
| Gitea 版本 | 开源协议 | 独立数据库存储 | 服务器即可跑 |
|
||||||
|
|
||||||
|
对访客价值不高,且新版已有仓库区和功能卡,页面会偏长。三个选项:
|
||||||
|
|
||||||
|
- **A. 删除(默认建议)**
|
||||||
|
- B. 缩成首屏标题下一行小字:`Gitea 1.21.11 · MIT · 自托管`
|
||||||
|
- C. 保持原样放在功能卡下面
|
||||||
|
|
||||||
|
未回复则按 **A** 执行。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 7. 响应式与无障碍
|
||||||
|
|
||||||
|
| 断点 | 行为 |
|
||||||
|
| --- | --- |
|
||||||
|
| > 1024px | Hero 左右分栏;仓库 3 列 |
|
||||||
|
| 641–1024px | Hero 上下堆叠(分支图卡片在文字下方);仓库 3 列压缩 → 不足时 2 列 + 第三张换行 |
|
||||||
|
| ≤ 640px | 仓库 1 列;终端小窗缩为单行可横向滚动;分支图隐藏 |
|
||||||
|
|
||||||
|
- `prefers-reduced-motion`:分支图静止、骨架不闪、关闭光斑。
|
||||||
|
- 仓库卡片整卡为 `<a>`,有可见焦点环;复制按钮有 `aria-label` 和「已复制」反馈。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 8. 执行步骤(待批准后进行)
|
||||||
|
|
||||||
|
1. **接口验证**:匿名 `curl https://git.qyhhh.top/api/v1/repos/search?sort=stars&order=desc&limit=10&mode=source`,确认可用并记录当前公开仓库数量。
|
||||||
|
2. **离线预览**:在 `preview/` 做出新版,截图 日间 / 夜间 / 375px 移动端 交 QQ 确认。
|
||||||
|
3. **接入模板**:改 `home.tmpl` / `qq-pages.css` / 新增 `qq-home.js`;跑 `scripts/audit_colors.py` 确认无绿色;提交并打 `v1.4-rc1`。
|
||||||
|
4. **部署**:`./scripts/deploy.sh` 预演 → QQ 批准 → `./scripts/deploy.sh --yes`(自动备份到 `/var/backups/`)→ 线上实拍复核 → 打 `v1.4-live`。
|
||||||
|
5. **回滚预案**:`./scripts/rollback.sh /var/backups/gitea-custom-<时间戳>.tar.gz`。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 9. 验收清单
|
||||||
|
|
||||||
|
- [ ] 未登录访问首页:首屏左右分栏,分支图 + 终端正常显示
|
||||||
|
- [ ] 复制按钮可复制 `git clone https://git.qyhhh.top/qq/repo.git`
|
||||||
|
- [ ] 热门仓库显示 ≤3 个,按星标降序,无 fork / 镜像 / 私有仓库
|
||||||
|
- [ ] 无公开仓库或接口失败时整块隐藏,页面无报错
|
||||||
|
- [ ] 日间 / 夜间 / 跟随系统 三主题无绿色、无白边
|
||||||
|
- [ ] 375px 移动端无横向溢出
|
||||||
|
- [ ] 登录后首页仍为控制台,不受影响
|
||||||
|
- [ ] 页脚 ICP 备案号与语言切换正常
|
||||||
13
docs/TODO.md
13
docs/TODO.md
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
> 仓库里唯一持久化的进度清单。`[x]` 完成 `[~]` 进行中 `[ ]` 未开始 `[!]` 等待批准
|
> 仓库里唯一持久化的进度清单。`[x]` 完成 `[~]` 进行中 `[ ]` 未开始 `[!]` 等待批准
|
||||||
|
|
||||||
## 当前状态(2026-11-03)
|
## 当前状态(2026-11-05)
|
||||||
|
|
||||||
| 项目 | 值 |
|
| 项目 | 值 |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||
| Gitea 版本 | 1.21.11(生产数据库:MySQL) |
|
| Gitea 版本 | 1.21.11(生产数据库:MySQL) |
|
||||||
| 生效主题 | `DEFAULT_THEME = qq-auto`(浅色 `qq-light` / 深色 `qq-dark` / 跟随系统 `qq-auto`) |
|
| 生效主题 | `DEFAULT_THEME = qq-auto`(浅色 `qq-light` / 深色 `qq-dark` / 跟随系统 `qq-auto`) |
|
||||||
| 当前标签 | `v1.3.13-live`(搜索框去内框 + 最近动态首项直角修复) |
|
| 当前标签 | `v1.3.13-live`(搜索框去内框 + 最近动态首项直角修复) |
|
||||||
|
| 进行中 | `v1.4` 未登录落地页(方案 A 首屏 + 方案 B 仓库卡,见 `docs/PLAN-landing-v1.4.md`) |
|
||||||
| 源码仓库 | <https://github.com/newbieQQ/QQGit>(private) |
|
| 源码仓库 | <https://github.com/newbieQQ/QQGit>(private) |
|
||||||
| 回滚方式 | `./scripts/rollback.sh /var/backups/gitea-custom-<时间戳>.tar.gz` |
|
| 回滚方式 | `./scripts/rollback.sh /var/backups/gitea-custom-<时间戳>.tar.gz` |
|
||||||
|
|
||||||
|
|
@ -75,6 +76,16 @@
|
||||||
- [x] 7.6 提交 `dd19bbb`(tag `v1.1-rc1`)→ 部署 → 实拍复核 → 修布局 `25d8895`(tag `v1.1-live`)
|
- [x] 7.6 提交 `dd19bbb`(tag `v1.1-rc1`)→ 部署 → 实拍复核 → 修布局 `25d8895`(tag `v1.1-live`)
|
||||||
- [x] 7.7 移动端 375px 适配:光斑横向溢出裁剪、光环与标题字号压缩
|
- [x] 7.7 移动端 375px 适配:光斑横向溢出裁剪、光环与标题字号压缩
|
||||||
|
|
||||||
|
## 阶段 8 · 落地页 v1.4(方案 A + B)— 进行中,等待 QQ 批准上线
|
||||||
|
|
||||||
|
- [x] 8.1 按 `docs/PLAN-landing-v1.4.md` 重写 `custom/templates/home.tmpl`:首屏左 7 / 右 5 分栏(标题 / 口号 / 搜索 / 双按钮 + 毛玻璃分支图 + terminal 复制窗)
|
||||||
|
- [x] 8.2 新增 `custom/public/assets/js/qq-home.js`:公开 API 取数(`sort=updated`,客户端按星标→更新时间排序,排除 fork/镜像/私有/归档),骨架屏 → 3 张卡片;失败或 0 条静默隐藏
|
||||||
|
- [x] 8.3 `qq-pages.css` 重写落地页段(1280px 限宽、蓝白色阶、语言圆点仅品牌蓝、hover / 焦点环、暗色变量、1024 / 640 断点、reduced-motion);Dashboard 段原样保留
|
||||||
|
- [x] 8.4 删除数字条(方案 A);三张功能卡降级为分隔线下方收尾
|
||||||
|
- [x] 8.5 离线预览更新:`preview/index.html` 首页段 + 假数据 6 条、`?only=home&bare=1` 截图模式、`preview/mobile-frame.html` 供 375px 复核(headless Chrome 窗口宽度下限 500px)
|
||||||
|
- [x] 8.6 截图 1440 / 834 / 375 的浅色与深色;`audit_colors.py`、`check_preview.py` 全绿
|
||||||
|
- [!] 8.7 待 QQ 看过截图后:提交并打标签 `v1.4-rc1` → `./scripts/deploy.sh` 预演 → 批准后 `--yes` → 实拍复核 → 打标签 `v1.4-live`
|
||||||
|
|
||||||
## 部署记录
|
## 部署记录
|
||||||
|
|
||||||
| 时间 | 动作 | 备份 |
|
| 时间 | 动作 | 备份 |
|
||||||
|
|
|
||||||
|
|
@ -31,16 +31,37 @@
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
|
||||||
/* ?only=login —— 只显示登录页演示区(方便单独截图/对比) */
|
/* ?only=login | ?only=home —— 只显示某一演示区(方便单独截图/对比) */
|
||||||
(function () {
|
(function () {
|
||||||
var only = new URLSearchParams(location.search).get('only');
|
var params = new URLSearchParams(location.search);
|
||||||
if (only !== 'login') return;
|
var only = params.get('only');
|
||||||
|
if (!only) return;
|
||||||
|
var id = { login: 'login-demo', home: 'landing-demo' }[only];
|
||||||
|
if (!id) return;
|
||||||
var page = document.querySelector('.page');
|
var page = document.querySelector('.page');
|
||||||
if (!page) return;
|
var keep = document.getElementById(id);
|
||||||
var keep = document.getElementById('login-demo');
|
if (!page || !keep) return;
|
||||||
var label = keep && keep.previousElementSibling;
|
var label = keep.previousElementSibling;
|
||||||
Array.prototype.forEach.call(page.children, function (el) {
|
Array.prototype.forEach.call(page.children, function (el) {
|
||||||
if (el === keep || el === label) return;
|
if (el === keep || el === label) return;
|
||||||
el.style.display = 'none';
|
el.style.display = 'none';
|
||||||
});
|
});
|
||||||
|
if (only === 'home') {
|
||||||
|
/* 让离线预览也按线上 1280px 的容器宽度呈现 */
|
||||||
|
page.style.maxWidth = '1320px';
|
||||||
|
page.style.paddingTop = '0';
|
||||||
|
keep.style.border = '0';
|
||||||
|
keep.style.background = 'transparent';
|
||||||
|
keep.style.borderRadius = '0';
|
||||||
|
if (label) label.style.display = 'none';
|
||||||
|
if (params.get('bare') === '1') {
|
||||||
|
/* 截图用:预览器自己的导航会撑宽小屏,隐藏它才能看到真实 375px 版式 */
|
||||||
|
page.style.padding = '0';
|
||||||
|
page.style.maxWidth = 'none';
|
||||||
|
['#navbar', '.switcher'].forEach(function (sel) {
|
||||||
|
var el = document.querySelector(sel);
|
||||||
|
if (el) el.style.display = 'none';
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
})();
|
})();
|
||||||
|
|
|
||||||
|
|
@ -40,10 +40,10 @@
|
||||||
|
|
||||||
<!-- ============ 1. 未登录首页 ============ -->
|
<!-- ============ 1. 未登录首页 ============ -->
|
||||||
<div class="section-label">首页(未登录 · custom/templates/home.tmpl)</div>
|
<div class="section-label">首页(未登录 · custom/templates/home.tmpl)</div>
|
||||||
<div class="segment" style="padding:0">
|
<div class="segment" id="landing-demo" style="padding:0">
|
||||||
<div class="page-content home qq-landing" style="padding-top:24px">
|
<div class="page-content home qq-landing">
|
||||||
<section class="qq-lp-hero">
|
<section class="qq-lp-hero">
|
||||||
<div class="qq-logo-halo qq-lp-logo"><img src="../custom/public/assets/img/logo.svg" alt="logo"></div>
|
<div class="qq-lp-hero-copy">
|
||||||
<p class="qq-lp-eyebrow">私有部署 · 轻量 · 全功能</p>
|
<p class="qq-lp-eyebrow">私有部署 · 轻量 · 全功能</p>
|
||||||
<h1 class="qq-lp-title">QQGit</h1>
|
<h1 class="qq-lp-title">QQGit</h1>
|
||||||
<p class="qq-lp-sub" data-qq-type="自己的代码,自己的地方。">自己的代码,自己的地方。</p>
|
<p class="qq-lp-sub" data-qq-type="自己的代码,自己的地方。">自己的代码,自己的地方。</p>
|
||||||
|
|
@ -56,6 +56,78 @@
|
||||||
<a class="ui basic button" href="#">登录</a>
|
<a class="ui basic button" href="#">登录</a>
|
||||||
<a class="qq-lp-link" href="#">浏览全部仓库 →</a>
|
<a class="qq-lp-link" href="#">浏览全部仓库 →</a>
|
||||||
</div>
|
</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>
|
||||||
|
|
||||||
<section class="qq-lp-grid">
|
<section class="qq-lp-grid">
|
||||||
|
|
@ -75,13 +147,6 @@
|
||||||
<p>跑在自己的服务器上,仓库、用户与备份都由自己掌握。</p>
|
<p>跑在自己的服务器上,仓库、用户与备份都由自己掌握。</p>
|
||||||
</article>
|
</article>
|
||||||
</section>
|
</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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -239,6 +304,22 @@ DARK_PRIMARY = <span style="color:var(--color-primary)">"#38BDF8"</span>
|
||||||
</div>
|
</div>
|
||||||
</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="../custom/public/assets/js/qq-fx.js" defer></script>
|
||||||
<script src="app.js"></script>
|
<script src="app.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh-CN">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>QQGit 预览 · 375px frame</title>
|
||||||
|
<style>
|
||||||
|
html, body { margin: 0; padding: 0; background: #fff; }
|
||||||
|
iframe { display: block; width: 375px; height: 2400px; border: 0; }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<iframe id="f" src="index.html?only=home&bare=1&theme=light"></iframe>
|
||||||
|
<script>
|
||||||
|
var t = new URLSearchParams(location.search).get('theme') || 'light';
|
||||||
|
document.getElementById('f').src = 'index.html?only=home&bare=1&theme=' + t;
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Loading…
Reference in New Issue