mirror of
https://github.com/zen-browser/www.git
synced 2025-07-08 09:20:00 +02:00
refactor: fix buttons
This commit is contained in:
parent
5125bf91f2
commit
942a73d53c
2 changed files with 222 additions and 220 deletions
|
@ -12,11 +12,7 @@ import MoonIcon from '../icons/MoonIcon.astro'
|
|||
<button
|
||||
id="theme-toggle"
|
||||
type="button"
|
||||
class:list={[
|
||||
'rounded-lg p-2.5 outline-none',
|
||||
'bg-muted/50 shadow-sm',
|
||||
className,
|
||||
]}
|
||||
class:list={['rounded-lg p-2.5 outline-none', className]}
|
||||
aria-label={label}
|
||||
{...rest}
|
||||
>
|
||||
|
|
|
@ -261,6 +261,7 @@ const appleIcon = icon({ prefix: 'fab', iconName: 'apple' })
|
|||
</main>
|
||||
</Layout>
|
||||
<script>
|
||||
document.addEventListener('astro:page-load', () => {
|
||||
const releases = {
|
||||
macos: {
|
||||
intel: 'zen.macos-x86_64.dmg',
|
||||
|
@ -353,7 +354,9 @@ const appleIcon = icon({ prefix: 'fab', iconName: 'apple' })
|
|||
"input[type='radio']:checked",
|
||||
) as HTMLInputElement
|
||||
selectedArch = selectedRadio.value
|
||||
document.getElementById('linux-target-download')?.classList.add('hidden')
|
||||
document
|
||||
.getElementById('linux-target-download')
|
||||
?.classList.add('hidden')
|
||||
|
||||
const linuxDownload = document.getElementById(
|
||||
'form-linux-download',
|
||||
|
@ -388,7 +391,9 @@ const appleIcon = icon({ prefix: 'fab', iconName: 'apple' })
|
|||
if (selectedArch) {
|
||||
// Go back to architecture selection
|
||||
if (selectedOS === 'linux') {
|
||||
document.getElementById('form-linux-download')?.classList.add('hidden')
|
||||
document
|
||||
.getElementById('form-linux-download')
|
||||
?.classList.add('hidden')
|
||||
document
|
||||
.getElementById('linux-target-download')
|
||||
?.classList.remove('hidden')
|
||||
|
@ -404,7 +409,9 @@ const appleIcon = icon({ prefix: 'fab', iconName: 'apple' })
|
|||
} else if (selectedOS) {
|
||||
// Go back to OS selection
|
||||
if (selectedOS === 'macos') {
|
||||
document.getElementById('form-macos-download')?.classList.add('hidden')
|
||||
document
|
||||
.getElementById('form-macos-download')
|
||||
?.classList.add('hidden')
|
||||
} else if (selectedOS === 'linux') {
|
||||
document
|
||||
.getElementById('linux-target-download')
|
||||
|
@ -511,7 +518,6 @@ const appleIcon = icon({ prefix: 'fab', iconName: 'apple' })
|
|||
//downloadRelease("windows", selectedArch as string, "zip");
|
||||
})
|
||||
|
||||
document.addEventListener('astro:page-load', () => {
|
||||
filloutDefaultOS()
|
||||
})
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue