gitdxd-theme/templates/home.tmpl

385 lines
17 KiB
Go Template

{{template "base/head" .}}
{{if .IsSigned}}
{{template "user/dashboard/dashboard" .}}
{{else}}
<style>
.dxd-landing {
--dxd-surface: var(--color-box-body, #2d2b29);
--dxd-bg: var(--color-body, #282828);
--dxd-text: var(--color-text, #ebdbb2);
--dxd-muted: var(--color-text-light-2, #bdae93);
--dxd-dim: var(--color-text-light-3, #a89984);
--dxd-accent: var(--color-primary, #8ec07c);
--dxd-link: var(--color-blue, #83a598);
--dxd-border: var(--nm-divider, rgba(255, 255, 255, 0.07));
color: var(--dxd-text);
max-width: 1120px;
margin: 0 auto;
padding: 2.5rem 1.5rem 1rem;
}
/* ── Hero ──────────────────────────────────────────────────────── */
.dxd-hero {
display: grid;
grid-template-columns: 1.05fr 1fr;
align-items: center;
gap: 3rem;
padding: 1.5rem 0 3.5rem;
}
@media (max-width: 940px) {
.dxd-hero { grid-template-columns: 1fr; gap: 2rem; }
}
.dxd-eyebrow {
display: inline-block;
font-size: 0.72rem;
font-weight: 600;
letter-spacing: 0.14em;
text-transform: uppercase;
color: var(--dxd-accent);
background: var(--color-primary-alpha-10, rgba(142, 192, 124, 0.1));
border-radius: 999px;
padding: 0.35rem 0.8rem;
box-shadow: var(--nm-inset-sm);
margin-bottom: 1.1rem;
}
.dxd-hero h1 {
font-size: clamp(2rem, 4.4vw, 3.35rem);
line-height: 1.08;
font-weight: 800;
letter-spacing: -0.025em;
margin: 0 0 1rem;
color: var(--color-text-focus, var(--dxd-text));
}
.dxd-hero h1 em {
font-style: normal;
color: var(--dxd-accent);
}
.dxd-lede {
font-size: 1.05rem;
line-height: 1.65;
color: var(--dxd-muted);
max-width: 34rem;
margin: 0 0 1.6rem;
}
.dxd-cta { display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center; }
.dxd-cta .dxd-btn { font-size: 0.98rem; padding: 0.8rem 1.4rem; }
.dxd-note { margin: 1.1rem 0 0; font-size: 0.9rem; color: var(--dxd-dim); }
.dxd-note a { color: var(--dxd-link); font-weight: 600; }
/* ── Faux repository window (the pretty bit) ───────────────────── */
.dxd-mock {
background: var(--dxd-surface);
border-radius: 18px;
box-shadow: var(--nm-raised);
overflow: hidden;
font-size: 0.82rem;
}
.dxd-mock-bar {
display: flex;
align-items: center;
gap: 0.45rem;
padding: 0.7rem 0.9rem;
background: var(--color-header-wrapper, var(--dxd-bg));
box-shadow: inset 0 -1px 0 var(--dxd-border);
}
.dxd-mock-bar .dot { width: 11px; height: 11px; border-radius: 50%; box-shadow: var(--nm-inset-sm); }
.dxd-mock-bar .dot.r { background: #fb4934; }
.dxd-mock-bar .dot.y { background: #fabd2f; }
.dxd-mock-bar .dot.g { background: #8ec07c; }
.dxd-mock-url {
flex: 1;
margin-left: 0.5rem;
text-align: center;
font-family: var(--fonts-monospace);
font-size: 0.74rem;
color: var(--dxd-dim);
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.dxd-mock-repo { padding: 1rem 1.1rem 1.2rem; }
.dxd-mock-repotop { display: flex; align-items: flex-start; gap: 0.7rem; }
.dxd-mock-avatar {
width: 38px; height: 38px; flex-shrink: 0;
border-radius: 10px;
display: grid; place-items: center;
font-weight: 800; color: var(--color-primary-contrast, #101010);
background: linear-gradient(145deg, var(--color-primary-light-1, var(--dxd-accent)), var(--dxd-accent));
box-shadow: var(--nm-raised-sm);
}
.dxd-mock-reponame { font-size: 0.98rem; color: var(--dxd-dim); }
.dxd-mock-reponame strong { color: var(--dxd-link); font-weight: 700; }
.dxd-mock-desc { font-size: 0.76rem; color: var(--dxd-dim); margin-top: 0.15rem; }
.dxd-mock-actions { margin-left: auto; display: flex; gap: 0.35rem; }
.dxd-pill {
font-size: 0.68rem; font-weight: 600;
padding: 0.28rem 0.6rem;
border-radius: 999px;
color: var(--dxd-muted);
background: var(--dxd-bg);
box-shadow: var(--nm-raised-sm);
white-space: nowrap;
}
.dxd-pill.accent { color: var(--dxd-accent); }
.dxd-mock-tabs {
display: flex; gap: 0.25rem; flex-wrap: wrap;
margin: 0.9rem 0 0.75rem;
box-shadow: inset 0 -1px 0 var(--dxd-border);
}
.dxd-mock-tabs span {
padding: 0.4rem 0.65rem;
font-size: 0.76rem;
color: var(--dxd-dim);
border-bottom: 2px solid transparent;
}
.dxd-mock-tabs span.active { color: var(--dxd-text); border-bottom-color: var(--dxd-accent); }
.dxd-mock-tabs b { color: var(--dxd-muted); font-weight: 600; }
.dxd-mock-branch {
display: flex; align-items: center; gap: 0.6rem;
padding: 0.5rem 0.6rem;
margin-bottom: 0.5rem;
border-radius: 10px;
background: var(--dxd-bg);
box-shadow: var(--nm-inset-sm);
font-size: 0.75rem; color: var(--dxd-muted);
}
.dxd-mock-branch .code-btn {
margin-left: auto;
color: var(--dxd-accent);
background: var(--color-primary-alpha-10, rgba(142, 192, 124, 0.1));
border-radius: 8px;
padding: 0.22rem 0.55rem;
font-weight: 600;
}
.dxd-file {
display: grid;
grid-template-columns: 20px 1.4fr 1.6fr auto;
align-items: center;
gap: 0.6rem;
padding: 0.42rem 0.4rem;
border-radius: 8px;
color: var(--dxd-muted);
box-shadow: inset 0 -1px 0 var(--dxd-border);
}
.dxd-file:hover { background: var(--color-primary-alpha-10, rgba(142, 192, 124, 0.08)); }
.dxd-file svg { width: 16px; height: 16px; color: var(--dxd-dim); }
.dxd-file .name { color: var(--dxd-link); font-family: var(--fonts-monospace); font-size: 0.76rem; }
.dxd-file .msg { font-size: 0.74rem; color: var(--dxd-dim); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.dxd-file .when { font-size: 0.72rem; color: var(--dxd-dim); white-space: nowrap; }
@media (max-width: 560px) {
.dxd-file { grid-template-columns: 20px 1fr auto; }
.dxd-file .msg { display: none; }
}
/* ── Section shells ────────────────────────────────────────────── */
.dxd-section { padding: 2.75rem 0 0.5rem; }
.dxd-section-head { margin-bottom: 1.5rem; }
.dxd-section-head h2 {
font-size: clamp(1.4rem, 2.6vw, 1.95rem);
font-weight: 700;
letter-spacing: -0.015em;
margin: 0 0 0.4rem;
color: var(--color-text-focus, var(--dxd-text));
}
.dxd-section-head p { margin: 0; color: var(--dxd-muted); }
/* ── Feature grid ──────────────────────────────────────────────── */
.dxd-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
gap: 1.1rem;
}
.dxd-feature {
background: var(--dxd-surface);
border-radius: 16px;
box-shadow: var(--nm-raised);
padding: 1.35rem 1.4rem;
transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.dxd-feature:hover {
box-shadow: var(--nm-raised), 0 0 0 1px var(--color-primary-alpha-20, transparent);
transform: translateY(-2px);
}
.dxd-feature .icon {
width: 42px; height: 42px;
display: grid; place-items: center;
border-radius: 12px;
margin-bottom: 0.9rem;
color: var(--dxd-accent);
background: var(--dxd-bg);
box-shadow: var(--nm-inset-sm);
}
.dxd-feature .icon svg { width: 22px; height: 22px; }
.dxd-feature h3 { margin: 0 0 0.4rem; font-size: 1.02rem; font-weight: 700; color: var(--dxd-text); }
.dxd-feature p { margin: 0; font-size: 0.88rem; line-height: 1.6; color: var(--dxd-muted); }
/* ── CTA band ──────────────────────────────────────────────────── */
.dxd-cta-band {
margin: 3.25rem 0 1rem;
padding: 2.25rem 1.75rem;
border-radius: 20px;
text-align: center;
background: var(--dxd-surface);
box-shadow: var(--nm-raised);
}
.dxd-cta-band h2 { margin: 0 0 0.5rem; font-size: clamp(1.4rem, 2.6vw, 1.9rem); color: var(--color-text-focus, var(--dxd-text)); }
.dxd-cta-band p { margin: 0 auto 1.4rem; color: var(--dxd-muted); max-width: 34rem; }
.dxd-cta-band .dxd-cta { justify-content: center; }
</style>
<div role="main" aria-label="{{ctx.Locale.Tr "home"}}" class="page-content home">
<div class="dxd-landing">
<!-- ── Hero ─────────────────────────────────────────────────── -->
<section class="dxd-hero">
<div class="dxd-hero-copy">
<span class="dxd-eyebrow">Self-hosted · Open source</span>
<h1>Git hosting that<br>answers to <em>you</em>.</h1>
<p class="dxd-lede">
{{AppDisplayName}} is a self-hosted Forgejo instance for repositories, issues,
pull requests, code review and CI — fast, private, and free of
corporate strings.
</p>
<div class="dxd-cta">
<a class="ui primary button dxd-btn" href="/user/sign_up">Get started</a>
<a class="ui basic button dxd-btn" href="/explore/repos">Explore repositories</a>
</div>
<p class="dxd-note">Already have an account? <a href="/user/login">Sign in</a></p>
</div>
<div class="dxd-hero-mock" aria-hidden="true">
<div class="dxd-mock">
<div class="dxd-mock-bar">
<span class="dot r"></span><span class="dot y"></span><span class="dot g"></span>
<span class="dxd-mock-url">git.dvorakmortonxd.dev/dvorakmortonxd/forgejo</span>
</div>
<div class="dxd-mock-repo">
<div class="dxd-mock-repotop">
<div class="dxd-mock-avatar">D</div>
<div>
<div class="dxd-mock-reponame">dvorakmortonxd / <strong>forgejo</strong></div>
<div class="dxd-mock-desc">Beyond coding. We forge.</div>
</div>
<div class="dxd-mock-actions">
<span class="dxd-pill">Public</span>
<span class="dxd-pill accent">★ Star</span>
<span class="dxd-pill">⑂ Fork</span>
</div>
</div>
<div class="dxd-mock-tabs">
<span class="active">Code</span>
<span>Issues <b>12</b></span>
<span>Pull requests <b>4</b></span>
<span>Actions</span>
<span>Packages</span>
</div>
<div class="dxd-mock-branch">
<span>main ▾</span>
<span>128 commits</span>
<span class="code-btn">&lt;&gt; Code ▾</span>
</div>
<div class="dxd-mock-files">
<div class="dxd-file">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/></svg>
<span class="name">.github</span>
<span class="msg">Add CI workflow</span>
<span class="when">2 days ago</span>
</div>
<div class="dxd-file">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/></svg>
<span class="name">cmd</span>
<span class="msg">Support custom config paths</span>
<span class="when">5 hours ago</span>
</div>
<div class="dxd-file">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/></svg>
<span class="name">models</span>
<span class="msg">Index pull request reviews</span>
<span class="when">yesterday</span>
</div>
<div class="dxd-file">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M6 3h8l4 4v14H6z"/><path d="M14 3v4h4"/></svg>
<span class="name">README.md</span>
<span class="msg">Rewrite install instructions</span>
<span class="when">3 hours ago</span>
</div>
<div class="dxd-file">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M6 3h8l4 4v14H6z"/><path d="M14 3v4h4"/></svg>
<span class="name">go.mod</span>
<span class="msg">Bump dependencies</span>
<span class="when">last week</span>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- ── Everything you need ──────────────────────────────────── -->
<section class="dxd-section">
<div class="dxd-section-head">
<h2>Everything you need to ship</h2>
<p>The full toolkit of a modern git host — on hardware you control.</p>
</div>
<div class="dxd-grid">
<div class="dxd-feature">
<div class="icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M4 5.5A2.5 2.5 0 0 1 6.5 3H19a1 1 0 0 1 1 1v14"/><path d="M4 5.5A2.5 2.5 0 0 0 6.5 8H20"/><path d="M4 5.5V18a3 3 0 0 0 3 3h13"/></svg></div>
<h3>Repositories</h3>
<p>Unlimited public and private repos with wikis, webhooks, releases and fine-grained access control.</p>
</div>
<div class="dxd-feature">
<div class="icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="6" cy="6" r="2.4"/><circle cx="6" cy="18" r="2.4"/><circle cx="18" cy="6" r="2.4"/><path d="M6 8.4v7.2"/><path d="M15.6 6h-3.2a4 4 0 0 0-4 4v0"/><path d="M18 8.4v3.1a4 4 0 0 1-4 4h-3"/></svg></div>
<h3>Pull requests</h3>
<p>Review line-by-line diffs, leave comments, request changes, and merge once checks pass.</p>
</div>
<div class="dxd-feature">
<div class="icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="8.5"/><circle cx="12" cy="12" r="2.6" fill="currentColor" stroke="none"/></svg></div>
<h3>Issues &amp; projects</h3>
<p>Track bugs and plan work with labels, milestones, assignees and kanban project boards.</p>
</div>
<div class="dxd-feature">
<div class="icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M13.5 3 5 13.5h5.5L10 21l8.5-10.5H13z"/></svg></div>
<h3>Actions &amp; CI</h3>
<p>Automate builds, tests and releases with Forgejo Actions runners, right next to your code.</p>
</div>
<div class="dxd-feature">
<div class="icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3 20 7.5v9L12 21 4 16.5v-9z"/><path d="M4 7.5 12 12l8-4.5"/><path d="M12 12v9"/></svg></div>
<h3>Packages</h3>
<p>Publish container images and language packages alongside the source that produced them.</p>
</div>
<div class="dxd-feature">
<div class="icon"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3 5 6v5c0 4.4 3 8.4 7 10 4-1.6 7-5.6 7-10V6z"/><path d="M9.5 12l1.8 1.8L15 10"/></svg></div>
<h3>Private by default</h3>
<p>Your data stays on this box. No tracking, no telemetry, and definitely no training on your code.</p>
</div>
</div>
</section>
<!-- ── Why not GitHub ───────────────────────────────────────── -->
{{template "home_forgejo" .}}
<!-- ── CTA band ─────────────────────────────────────────────── -->
<section class="dxd-cta-band">
<h2>Ready to forge something?</h2>
<p>Create an account and push your first repository in under a minute.</p>
<div class="dxd-cta">
<a class="ui primary button dxd-btn" href="/user/sign_up">Create your account</a>
<a class="ui basic button dxd-btn" href="/user/login">Sign in</a>
</div>
</section>
</div>
</div>
{{end}}
{{template "base/footer" .}}