g1t/apps/docs/src/components/SocialIcons.astro
---
// The header's right side: where people go from the docs, then the source.
import { GitBranch } from '@lucide/astro';
// g1t.sh is invite-only for now. A build with PUBLIC_G1T_REGISTRATION=open
// (an installation that lets anyone register) says Sign up again.
const inviteOnly = (import.meta.env.PUBLIC_G1T_REGISTRATION ?? 'invite') !== 'open';
---
<nav class="g1t-nav" aria-label="g1t">
<a href="https://g1t.sh/">g1t.sh</a>
<a href="https://g1t.sh/register" class="g1t-nav-cta">{inviteOnly ? 'Request access' : 'Sign up'}</a>
<a href="https://g1t.sh/flagon-io/g1t" aria-label="Source on g1t" title="Source on g1t" class="g1t-nav-icon">
<GitBranch />
</a>
</nav>
<style>
.g1t-nav {
display: flex;
align-items: center;
gap: 0.25rem;
}
a {
border-radius: 0.4rem;
padding: 0.3rem 0.6rem;
font-size: 0.85rem;
color: var(--g1t-muted);
text-decoration: none;
transition: color 0.15s, background 0.15s;
}
a:hover {
background: var(--g1t-raised);
color: var(--g1t-fg);
}
.g1t-nav-cta {
margin-left: 0.25rem;
background: var(--g1t-fg);
color: var(--g1t-bg);
font-weight: 500;
}
.g1t-nav-cta:hover {
background: #fff;
color: var(--g1t-bg);
}
.g1t-nav-icon {
display: inline-flex;
padding: 0.4rem;
}
.g1t-nav-icon :global(svg) {
width: 1rem;
height: 1rem;
}
@media (max-width: 50rem) {
a:not(.g1t-nav-icon):not(.g1t-nav-cta) {
display: none;
}
}
</style>