diff options
| author | Kyren223 <contact@kyren.codes> | 2026-10-09 18:27:14 +0300 |
|---|---|---|
| committer | Kyren223 <contact@kyren.codes> | 2026-10-09 18:27:14 +0300 |
| commit | 66a5c4ea1793886aad80a67ad0e40aca6066bcde (patch) | |
| tree | c148f96eb58bbd66b7530f9f5f1cb80f3fa8ad1e /website.templ | |
| parent | 65413df98c8ac0a1bc141f7aa7148eb52528024c (diff) | |
Added grayed out download icons for now
Diffstat (limited to 'website.templ')
| -rw-r--r-- | website.templ | 32 |
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> } |
