Skip to content
81 linesCodeBlameRaw
1---
2// The header's right side: where people go from the docs, then the source.
3// g1t's social accounts live in g1t.sh's footer, not here.
4import { GitBranch } from '@lucide/astro';
5---
6
7<nav class="g1t-nav" aria-label="g1t">
8 <a href="https://g1t.sh/">g1t.sh</a>
9 <a href="https://g1t.sh/register" class="g1t-nav-cta">Sign up</a>
10 <a href="https://g1t.sh/flagon-io/g1t" aria-label="Source on g1t" title="Source on g1t" class="g1t-nav-icon">
11 <GitBranch />
12 </a>
13</nav>
14
15<style>
16 .g1t-nav {
17 display: flex;
18 align-items: center;
19 gap: 0.25rem;
20 }
21 /* nav.g1t-nav: the menu's own link rule must not win where these sit
22 at the foot of the phone menu. */
23 nav.g1t-nav a {
24 display: inline-flex;
25 align-items: center;
26 height: 2rem;
27 border-radius: 0.4rem;
28 padding: 0 0.6rem;
29 font-size: 0.85rem;
30 white-space: nowrap;
31 color: var(--g1t-muted);
32 text-decoration: none;
33 transition: color 0.15s, background 0.15s;
34 }
35 nav.g1t-nav a:hover {
36 background: var(--g1t-raised);
37 color: var(--g1t-fg);
38 }
39 nav.g1t-nav .g1t-nav-cta {
40 margin-left: 0.25rem;
41 background: var(--g1t-fg);
42 color: var(--g1t-bg);
43 font-weight: 500;
44 }
45 nav.g1t-nav .g1t-nav-cta:hover {
46 background: var(--g1t-docs-fg-hover);
47 color: var(--g1t-bg);
48 }
49 nav.g1t-nav .g1t-nav-icon {
50 justify-content: center;
51 width: 2rem;
52 padding: 0;
53 }
54 .g1t-nav-icon :global(svg) {
55 width: 1rem;
56 height: 1rem;
57 }
58 /* Tablets and phones: in the header g1t.sh's link gives way (the menu
59 keeps it), and the icons grow to a size a finger can hit. */
60 @media (max-width: 49.99rem) {
61 :global(.g1t-header) nav.g1t-nav a:not(.g1t-nav-icon):not(.g1t-nav-cta) {
62 display: none;
63 }
64 nav.g1t-nav .g1t-nav-icon {
65 width: 2.5rem;
66 height: 2.5rem;
67 }
68 :global(.sidebar-content) nav.g1t-nav a {
69 height: 2.5rem;
70 }
71 }
72 /* Phones: Sign up leaves the header for the menu, where it has room. */
73 @media (max-width: 44.99rem) {
74 :global(.g1t-header) .g1t-nav {
75 gap: 0;
76 }
77 :global(.g1t-header) nav.g1t-nav .g1t-nav-cta {
78 display: none;
79 }
80 }
81</style>