tenseleyflow/shithub / a550cee

Browse files

S40: landing page (anon marketing + authed quicklinks) on /

Authored by espadonne
SHA
a550cee5df62600005b2a2c3b52b73b8eccd441e
Parents
a2e30d7
Tree
72b051b

2 changed files

StatusFile+-
M internal/web/static/css/shithub.css 72 0
M internal/web/templates/hello.html 59 11
internal/web/static/css/shithub.cssmodified
@@ -311,6 +311,78 @@ code {
311311
   font-size: 0.875rem;
312312
 }
313313
 
314
+/* ========== Landing (anonymous home) ========== */
315
+
316
+.shithub-landing-pitch {
317
+  max-width: 36rem;
318
+  margin: 0 auto 2rem;
319
+  font-size: 1.05rem;
320
+  line-height: 1.55;
321
+}
322
+
323
+.shithub-landing-features {
324
+  list-style: none;
325
+  margin: 0 auto 2rem;
326
+  padding: 0;
327
+  max-width: 60rem;
328
+  display: grid;
329
+  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
330
+  gap: 1rem;
331
+  text-align: left;
332
+}
333
+.shithub-landing-features li {
334
+  border: 1px solid var(--border-default);
335
+  border-radius: 6px;
336
+  padding: 0.85rem 1rem;
337
+  background: var(--canvas-subtle);
338
+}
339
+.shithub-landing-features li strong {
340
+  display: block;
341
+  margin-bottom: 0.25rem;
342
+  font-size: 0.95rem;
343
+}
344
+.shithub-landing-features li span {
345
+  color: var(--fg-muted);
346
+  font-size: 0.875rem;
347
+  line-height: 1.4;
348
+}
349
+
350
+.shithub-landing-cta {
351
+  display: flex;
352
+  justify-content: center;
353
+  flex-wrap: wrap;
354
+  gap: 0.75rem;
355
+  margin: 0 auto 1.5rem;
356
+}
357
+.shithub-landing-cta a {
358
+  display: inline-block;
359
+  padding: 0.5rem 1rem;
360
+  border-radius: 6px;
361
+  text-decoration: none;
362
+  font-weight: 500;
363
+  font-size: 0.95rem;
364
+}
365
+.shithub-landing-cta-primary {
366
+  background: var(--accent-fg, #1f6feb);
367
+  color: #ffffff;
368
+  border: 1px solid transparent;
369
+}
370
+.shithub-landing-cta-primary:hover { filter: brightness(1.1); }
371
+.shithub-landing-cta-secondary {
372
+  background: transparent;
373
+  color: var(--fg-default);
374
+  border: 1px solid var(--border-default);
375
+}
376
+.shithub-landing-cta-secondary:hover { background: var(--canvas-subtle); }
377
+
378
+.shithub-landing-honest {
379
+  max-width: 36rem;
380
+  margin: 0 auto 2rem;
381
+  color: var(--fg-muted);
382
+  font-size: 0.9rem;
383
+  line-height: 1.5;
384
+}
385
+
314386
 /* ========== Error pages ========== */
315387
 
316388
 .error-page {
internal/web/templates/hello.htmlmodified
@@ -7,14 +7,73 @@
77
   <p class="hello-tagline">GitHub. Open source. Without Copilot.</p>
88
 
99
   {{ if .Viewer.ID }}
10
+  {{/* Authed dashboard surface — concise, points at the things you
11
+       most likely want when you sign in. The full activity feed is a
12
+       post-MVP feature; until then the quicklinks ARE the dashboard. */}}
1013
   <div class="hello-greeting">
1114
     <p>Signed in as <strong>@{{ .Viewer.Username }}</strong>.</p>
1215
     <nav class="hello-quicklinks" aria-label="Account quick links">
1316
       <a href="/{{ .Viewer.Username }}">Your profile</a>
1417
       <a href="/new">New repository</a>
18
+      <a href="/notifications">Notifications</a>
19
+      <a href="/explore">Explore</a>
1520
       <a href="/settings/profile">Settings</a>
1621
     </nav>
1722
   </div>
23
+  {{ else }}
24
+  {{/* Anonymous landing — marketing copy for the v1 launch. Honest
25
+       and concise; the heavy "what works / what doesn't" lives in
26
+       the README and docs site, not on the homepage. */}}
27
+  <section class="shithub-landing-pitch">
28
+    <p>
29
+      A self-hostable git forge that aims to look and feel like GitHub.
30
+      AGPL-licensed, written in Go, no AI training on your code, no
31
+      Copilot. <a href="/signup">Sign up</a> to host code here, or
32
+      <a href="https://docs.shithub.example/self-host/deploy.html">run
33
+      your own instance</a> from the source.
34
+    </p>
35
+  </section>
36
+
37
+  <ul class="shithub-landing-features" aria-label="What works today">
38
+    <li>
39
+      <strong>Repos, issues, pull requests</strong>
40
+      <span>Branch protection, reviews, status checks, three merge methods.</span>
41
+    </li>
42
+    <li>
43
+      <strong>Code browsing</strong>
44
+      <span>Tree, blob with syntax highlighting, blame, commit history, diffs.</span>
45
+    </li>
46
+    <li>
47
+      <strong>Search</strong>
48
+      <span>Code, repos, users, issues — with the operators you'd expect.</span>
49
+    </li>
50
+    <li>
51
+      <strong>Webhooks &amp; notifications</strong>
52
+      <span>HMAC-signed deliveries with auto-retry, in-app inbox, email fan-out.</span>
53
+    </li>
54
+    <li>
55
+      <strong>Orgs, teams, scoped tokens</strong>
56
+      <span>Role-based access; PATs with revocable scopes.</span>
57
+    </li>
58
+    <li>
59
+      <strong>Self-host first</strong>
60
+      <span>One binary, Postgres, S3-compatible storage, Caddy at the edge.</span>
61
+    </li>
62
+  </ul>
63
+
64
+  <nav class="shithub-landing-cta" aria-label="Primary actions">
65
+    <a class="shithub-landing-cta-primary" href="/signup">Create an account</a>
66
+    <a class="shithub-landing-cta-secondary" href="/login">Sign in</a>
67
+    <a class="shithub-landing-cta-secondary" href="https://docs.shithub.example/">Read the docs</a>
68
+    <a class="shithub-landing-cta-secondary" href="/shithub/shithub">Read the source</a>
69
+  </nav>
70
+
71
+  <p class="shithub-landing-honest">
72
+    Newly launched. Some surfaces (SSH transport, Actions/CI, GraphQL,
73
+    packages, releases) are planned but not shipped yet. The
74
+    <a href="https://docs.shithub.example/">docs</a> are honest about
75
+    what works and what's still in flight.
76
+  </p>
1877
   {{ end }}
1978
 
2079
   <dl class="hello-meta">
@@ -22,16 +81,5 @@
2281
     <dt>Commit</dt><dd>{{ .Commit }}</dd>
2382
     <dt>Built</dt><dd>{{ .BuiltAt }}</dd>
2483
   </dl>
25
-
26
-  <p class="hello-status">
27
-    Pre-launch. Sprint 02 — the web shell — is shipping. The chi router,
28
-    middleware stack, error pages, and Primer-themed chrome are now in.
29
-  </p>
30
-
31
-  <nav class="hello-links" aria-label="Health endpoints">
32
-    <a href="/healthz">/healthz</a>
33
-    <a href="/readyz">/readyz</a>
34
-    <a href="/internal/panic">/internal/panic</a>
35
-  </nav>
3684
 </section>
3785
 {{- end }}