g1t/apps/docs/src/components/SocialIcons.astro
| 1 | --- |
| 2 | // The header's right side: where people go from the docs, then the source. |
| 3 | import { GitBranch } from '@lucide/astro'; |
| 4 | |
| 5 | // g1t.sh is invite-only for now. A build with PUBLIC_G1T_REGISTRATION=open |
| 6 | // (an installation that lets anyone register) says Sign up again. |
| 7 | const inviteOnly = (import.meta.env.PUBLIC_G1T_REGISTRATION ?? 'invite') !== 'open'; |
| 8 | --- |
| 9 | |
| 10 | <nav class="g1t-nav" aria-label="g1t"> |
| 11 | <a href="https://g1t.sh/">g1t.sh</a> |
| 12 | <a href="https://g1t.sh/register" class="g1t-nav-cta">{inviteOnly ? 'Request access' : 'Sign up'}</a> |
| 13 | <a href="https://g1t.sh/flagon-io/g1t" aria-label="Source on g1t" title="Source on g1t" class="g1t-nav-icon"> |
| 14 | <GitBranch /> |
| 15 | </a> |
| 16 | </nav> |
| 17 | |
| 18 | <style> |
| 19 | .g1t-nav { |
| 20 | display: flex; |
| 21 | align-items: center; |
| 22 | gap: 0.25rem; |
| 23 | } |
| 24 | a { |
| 25 | border-radius: 0.4rem; |
| 26 | padding: 0.3rem 0.6rem; |
| 27 | font-size: 0.85rem; |
| 28 | color: var(--g1t-muted); |
| 29 | text-decoration: none; |
| 30 | transition: color 0.15s, background 0.15s; |
| 31 | } |
| 32 | a:hover { |
| 33 | background: var(--g1t-raised); |
| 34 | color: var(--g1t-fg); |
| 35 | } |
| 36 | .g1t-nav-cta { |
| 37 | margin-left: 0.25rem; |
| 38 | background: var(--g1t-fg); |
| 39 | color: var(--g1t-bg); |
| 40 | font-weight: 500; |
| 41 | } |
| 42 | .g1t-nav-cta:hover { |
| 43 | background: #fff; |
| 44 | color: var(--g1t-bg); |
| 45 | } |
| 46 | .g1t-nav-icon { |
| 47 | display: inline-flex; |
| 48 | padding: 0.4rem; |
| 49 | } |
| 50 | .g1t-nav-icon :global(svg) { |
| 51 | width: 1rem; |
| 52 | height: 1rem; |
| 53 | } |
| 54 | @media (max-width: 50rem) { |
| 55 | a:not(.g1t-nav-icon):not(.g1t-nav-cta) { |
| 56 | display: none; |
| 57 | } |
| 58 | } |
| 59 | </style> |