Skip to content

Commit

Permalink
hotfixc: buttons and community
Browse files Browse the repository at this point in the history
- buttons now have a label field to avoid markdown formatters from inserting paragraphs into them
- reinsert missing closing Container tag
  • Loading branch information
thilobillerbeck committed Jul 3, 2024
1 parent e67b1b3 commit 37c1938
Show file tree
Hide file tree
Showing 4 changed files with 340 additions and 352 deletions.
4 changes: 3 additions & 1 deletion src/components/ui/Button.astro
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ interface Props {
shaHref?: string | null;
shaClassList?: string[];
shaText?: string;
label?: string;
}
const colorMap = {
Expand All @@ -35,6 +36,7 @@ const {
shaHref = null,
shaClassList = [],
shaText = "",
label,
} = Astro.props;
const localClassList = `${colorMap[color]} font-bold ${sizeMap[size]} text-white drop-shadow`;
Expand All @@ -47,7 +49,7 @@ const localClassList = `${colorMap[color]} font-bold ${sizeMap[size]} text-white
href={href}
class:list={["!text-white !no-underline", localClassList, classList]}
>
<slot />
{label || <slot />}
</a>
{shaHref && (
<SHA href={shaHref} classList={shaClassList}>
Expand Down
22 changes: 12 additions & 10 deletions src/content/download/50-nixos-isoimage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ The graphical installation ISO image **contains the graphical NixOS installer**
shaText="(SHA-256)"
size="sm-mobfull"
classList = {["w-full", "md:w-auto", "block", "md:inline", "text-center", "md:text-left"]}
>Download (GNOME, 64-bit Intel/AMD)</Button>
label="Download (GNOME, 64-bit Intel/AMD)"
/>
<Tag color="darkgreen" classList={["hidden", "md:inline"]}>Recommended</Tag>
</span>

Expand All @@ -44,9 +45,8 @@ The graphical installation ISO image **contains the graphical NixOS installer**
"text-center",
"md:text-left",
]}
>
Download (GNOME, 64-bit ARM)
</Button>
label="Download (GNOME, 64-bit ARM)"
/>
</span>

{" "}
Expand All @@ -66,9 +66,8 @@ The graphical installation ISO image **contains the graphical NixOS installer**
"text-center",
"md:text-left",
]}
>
Download (Plasma Desktop, 64-bit Intel/AMD)
</Button>
label="Download (Plasma Desktop, 64-bit Intel/AMD)"
/>
</span>

<span>
Expand All @@ -79,7 +78,8 @@ The graphical installation ISO image **contains the graphical NixOS installer**
shaText="(SHA-256)"
size="sm-mobfull"
classList = {["w-full", "md:w-auto", "block", "md:inline", "text-center", "md:text-left"]}
>Download (Plasma Desktop, 64-bit ARM)</Button>
label="Download (Plasma Desktop, 64-bit ARM)"
/>
</span>
</div>

Expand All @@ -98,7 +98,8 @@ The minimal installation ISO image **does not contain the graphical user interfa
shaText="(SHA-256)"
size="sm-mobfull"
classList = {["w-full", "md:w-auto", "block", "md:inline", "text-center", "md:text-left"]}
>Download (64-bit Intel/AMD)</Button>
label="Download (64-bit Intel/AMD)"
/>
</span>

<span>
Expand All @@ -116,6 +117,7 @@ The minimal installation ISO image **does not contain the graphical user interfa
"text-center",
"md:text-left",
]}
>Download (64-bit ARM)</Button>
label="Download (64-bit ARM)"
/>
</span>
</div>
5 changes: 2 additions & 3 deletions src/content/download/51-nixos-virtualbox.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@ VirtualBox image includes the **Plasma Desktop** (was KDE) as well as **the Virt
"text-center",
"md:text-left",
]}
>
Download (64-bit)
</Button>
label="Download (64-bit)"
/>
</div>

### To use it
Expand Down
Loading

0 comments on commit 37c1938

Please sign in to comment.