Skip to content

Commit

Permalink
add a nonPublic option to buttons and mark foundation project and tea…
Browse files Browse the repository at this point in the history
…m page accordingly

closes #1650
  • Loading branch information
thilobillerbeck committed Feb 24, 2025
1 parent 077e3dc commit 3bb035f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
5 changes: 5 additions & 0 deletions src/components/ui/Button.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { cva, type VariantProps } from 'class-variance-authority';
import SHA from '@/components/ui/SHA.astro';
import Link from '@/components/util/Link.astro';
import { Icon } from 'astro-icon/components';
export const buttonVariants = cva(
'font-bold text-white drop-shadow transition-colors text-center',
Expand Down Expand Up @@ -32,6 +33,7 @@ interface Props extends VariantProps<typeof buttonVariants> {
shaClassList?: string[];
shaText?: string;
label?: string;
nonPublic?: boolean;
}
const {
Expand All @@ -44,6 +46,7 @@ const {
shaClassList = [],
shaText = '',
label,
nonPublic = false,
} = Astro.props;
---

Expand All @@ -55,9 +58,11 @@ const {
class:list={[
'text-white! no-underline!',
buttonVariants({ color, size }),
nonPublic && 'inline-flex items-center gap-2',
classList,
]}
>
{nonPublic && <Icon name="mdi:lock" />}
{label || <slot />}
</Link>
{shaHref && (
Expand Down
22 changes: 10 additions & 12 deletions src/content/teams/01_foundation-board.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -61,28 +61,26 @@ import Button from '../../components/ui/Button.astro';
color="semidarkblue"
size="sm"
href="https://discourse.nixos.org/c/dev/nixos-foundation/47"
>
Discourse
</Button>
label="Discourse"
/>
<Button
color="semidarkblue"
size="sm"
href="https://matrix.to/#/#foundation:nixos.org"
>
Matrix
</Button>
label="Matrix"
/>
<Button
color="semidarkblue"
size="sm"
href="https://github.com/orgs/NixOS/projects/28"
>
GitHub Project board
</Button>
nonPublic
label="GitHub Project board"
/>
<Button
color="semidarkblue"
size="sm"
href="https://github.com/orgs/NixOS/teams/foundation"
>
GitHub Team page
</Button>
nonPublic
label="GitHub Team page"
/>
</div>

0 comments on commit 3bb035f

Please sign in to comment.