Skip to content
83 linesCodeBlameRaw
1---
2// The header's right side: where people go from the docs, then g1t on X and the source.
3import { GitBranch } from '@lucide/astro';
4---
5
6<nav class="g1t-nav" aria-label="g1t">
7 <a href="https://g1t.sh/">g1t.sh</a>
8 <a href="https://g1t.sh/register" class="g1t-nav-cta">Sign up</a>
9 <a href="https://x.com/g1t_sh" aria-label="g1t on X" title="g1t on X" class="g1t-nav-icon">
10 <svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M14.234 10.162 22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299-.929-1.329L3.076 1.56h3.182l5.965 8.532.929 1.329 7.754 11.09h-3.182z" /></svg>
11 </a>
12 <a href="https://g1t.sh/flagon-io/g1t" aria-label="Source on g1t" title="Source on g1t" class="g1t-nav-icon">
13 <GitBranch />
14 </a>
15</nav>
16
17<style>
18 .g1t-nav {
19 display: flex;
20 align-items: center;
21 gap: 0.25rem;
22 }
23 /* nav.g1t-nav: the menu's own link rule must not win where these sit
24 at the foot of the phone menu. */
25 nav.g1t-nav a {
26 display: inline-flex;
27 align-items: center;
28 height: 2rem;
29 border-radius: 0.4rem;
30 padding: 0 0.6rem;
31 font-size: 0.85rem;
32 white-space: nowrap;
33 color: var(--g1t-muted);
34 text-decoration: none;
35 transition: color 0.15s, background 0.15s;
36 }
37 nav.g1t-nav a:hover {
38 background: var(--g1t-raised);
39 color: var(--g1t-fg);
40 }
41 nav.g1t-nav .g1t-nav-cta {
42 margin-left: 0.25rem;
43 background: var(--g1t-fg);
44 color: var(--g1t-bg);
45 font-weight: 500;
46 }
47 nav.g1t-nav .g1t-nav-cta:hover {
48 background: #fff;
49 color: var(--g1t-bg);
50 }
51 nav.g1t-nav .g1t-nav-icon {
52 justify-content: center;
53 width: 2rem;
54 padding: 0;
55 }
56 .g1t-nav-icon :global(svg) {
57 width: 1rem;
58 height: 1rem;
59 }
60 /* Tablets and phones: in the header g1t.sh's link gives way (the menu
61 keeps it), and the icons grow to a size a finger can hit. */
62 @media (max-width: 49.99rem) {
63 :global(.g1t-header) nav.g1t-nav a:not(.g1t-nav-icon):not(.g1t-nav-cta) {
64 display: none;
65 }
66 nav.g1t-nav .g1t-nav-icon {
67 width: 2.5rem;
68 height: 2.5rem;
69 }
70 :global(.sidebar-content) nav.g1t-nav a {
71 height: 2.5rem;
72 }
73 }
74 /* Phones: Sign up leaves the header for the menu, where it has room. */
75 @media (max-width: 44.99rem) {
76 :global(.g1t-header) .g1t-nav {
77 gap: 0;
78 }
79 :global(.g1t-header) nav.g1t-nav .g1t-nav-cta {
80 display: none;
81 }
82 }
83</style>