summaryrefslogtreecommitdiff
path: root/website.templ
diff options
context:
space:
mode:
Diffstat (limited to 'website.templ')
-rw-r--r--website.templ32
1 files changed, 23 insertions, 9 deletions
diff --git a/website.templ b/website.templ
index 8b316b9..1371351 100644
--- a/website.templ
+++ b/website.templ
@@ -291,9 +291,10 @@ type FlagshipInfo struct {
}
type Download struct {
- Label string // "Linux", "Windows"
- URL string
- Size string // "42 MB"
+ Label string // "Linux", "Windows"
+ URL string
+ Size string // "42 MB"
+ Enabled bool
}
type Stat struct {
@@ -370,12 +371,25 @@ templ VersionTag(project Project) {
}
}
-templ DownloadButton(d Download) {
- <a href={ templ.SafeURL(d.URL) } class="no-underline inline-flex items-center gap-[1ch] px-[0.6rem] py-[0.1rem] rounded-[0.4rem] border-[0.1rem] border-solid border-(--secondary)/60 text-[85%] text-(--secondary) transition-colors hover:bg-(--secondary)/15">
- @IconArchive("text-(--secondary)")
- <span>{ d.Label }</span>
- if d.Size != "" {
- <span class="text-(--alt)">{ d.Size }</span>
+templ DownloadButton(download Download) {
+ <a
+ if download.Enabled {
+ href={ templ.SafeURL(download.URL) }
+ }
+ class={
+ "no-underline inline-flex items-center gap-[1ch] px-[0.6rem] py-[0.1rem] rounded-[0.4rem] border-[0.1rem] border-solid text-[85%] transition-colors",
+ templ.KV("border-(--secondary)/60 text-(--secondary) hover:bg-(--secondary)/15", download.Enabled),
+ templ.KV("border-(--alt)/30 text-(--alt)/80 bg-white/2", !download.Enabled),
+ }
+ >
+ if download.Enabled {
+ @IconArchive("text-(--secondary)")
+ } else {
+ @IconArchive("text-(--alt)")
+ }
+ <span>{ download.Label }</span>
+ if download.Size != "" {
+ <span class="text-(--alt)">{ download.Size }</span>
}
</a>
}