Changes to some colour contrast, reworded, and refactor some duplicated code

This commit is contained in:
2026-01-22 01:22:23 -05:00
parent 4f8e731fe8
commit 3f8d9de2bf
3 changed files with 34 additions and 74 deletions

View File

@@ -1,28 +1,13 @@
<script lang="ts"> <script lang="ts">
type ButtonSize = 'sm' | 'md' | 'lg'; let { children, onclick = null, disabled = false, class: className = '' } = $props();
let {
children,
onclick = null,
disabled = false,
size = 'md' as ButtonSize,
class: className = ''
} = $props();
const sizeClasses: Record<ButtonSize, string> = {
sm: 'px-3 py-1.5',
md: 'px-4 py-2',
lg: 'px-2 py-2'
};
</script> </script>
<button <button
{disabled} {disabled}
{onclick} {onclick}
class="border-ecsess-200 bg-ecsess-500 rounded-md border class="bg-ecsess-600 text-ecsess-50
{sizeClasses[size]} hover:bg-ecsess-700 w-fit rounded-md
text-ecsess-50 hover:bg-ecsess-600/50 hover:border-ecsess-300 text-sm px-6 py-3 text-sm font-semibold transition-colors hover:cursor-pointer {className}"
font-semibold transition-colors {className}"
> >
{@render children()} {@render children()}
</button> </button>

View File

@@ -3,39 +3,33 @@
import Button from 'components/Button.svelte'; import Button from 'components/Button.svelte';
</script> </script>
<div class="mt-3 grid grid-cols-1 items-stretch gap-3 sm:grid-cols-2 lg:mt-0"> <div>
<Link href="/events"> <p
<Button class="text-ecsess-50 decoration-ecsess-200 mt-2 mb-6 text-base font-bold tracking-wide underline decoration-2 underline-offset-8"
class="ql-btn flex h-full min-h-[48px] w-full cursor-pointer items-center justify-center sm:min-h-[56px]" >
> Popular resources
ECSESS Events </p>
</Button>
</Link>
<Link href="/r/trot5th" external> <div class="mt-3 grid grid-cols-1 items-stretch gap-3 sm:grid-cols-2 lg:mt-0">
<Button <Link href="/events">
class="ql-btn flex h-full min-h-[48px] w-full cursor-pointer items-center justify-center sm:min-h-[56px]" <Button class="flex h-full w-full items-center justify-center">ECSESS Events</Button>
> </Link>
Trottier 5th booking
</Button>
</Link>
<Link href="/r/ctrlz" external> <Link href="/r/trot5th" external>
<Button <Button class="flex h-full w-full items-center justify-center">
size="lg" Trottier 5th Room Booking
class="ql-btn flex h-full min-h-[48px] w-full cursor-pointer items-center justify-center sm:min-h-[56px]" </Button>
> </Link>
Ctrl+Z (feedback) form
</Button>
</Link>
<!-- Sponsorship disabled --> <Link href="/r/ctrlz" external>
<Link href="#"> <Button class="flex h-full w-full items-center justify-center">Ctrl+Z feedback form</Button>
<Button </Link>
disabled
class="ql-btn flex h-full min-h-[48px] w-full cursor-not-allowed items-center justify-center sm:min-h-[56px]" <!-- Sponsorship disabled -->
> <Link href="/sponsorship">
Sponsorship <Button disabled class="flex h-full w-full items-center justify-center">
</Button> Sponsor ECSESS
</Link> </Button>
</Link>
</div>
</div> </div>

View File

@@ -40,7 +40,7 @@
<div <div
class="order-2 mb-2 flex items-center justify-center p-4 lg:col-start-1 lg:row-start-2 lg:mb-6 lg:place-self-center" class="order-2 mb-2 flex items-center justify-center p-4 lg:col-start-1 lg:row-start-2 lg:mb-6 lg:place-self-center"
> >
<div class="max-w-[36rem] text-center lg:text-center"> <div class="max-w-xl text-center lg:text-center">
<RichText value={data.description} /> <RichText value={data.description} />
</div> </div>
</div> </div>
@@ -56,28 +56,9 @@
</div> </div>
</div> </div>
<!-- Quick Links (Desktop) --> <!-- Quick Links -->
<div class="hidden p-4 lg:col-start-1 lg:row-start-3 lg:flex lg:place-self-center"> <div class="order-4 p-3 lg:col-start-1 lg:row-start-3 lg:flex lg:place-self-center lg:p-4">
<div> <QuickLinks />
<p
class="text-ecsess-50 decoration-ecsess-200 mt-2 mb-4 text-base font-bold tracking-wide underline decoration-2 underline-offset-8"
>
Commonly searched for
</p>
<QuickLinks />
</div>
</div>
<!-- Quick Links (mobile) -->
<div class="order-4 p-3 lg:hidden">
<div>
<p
class="text-ecsess-50 decoration-ecsess-200 mt-4 mb-4 text-center text-base font-bold tracking-wide underline decoration-2 underline-offset-8"
>
Commonly searched for
</p>
<QuickLinks />
</div>
</div> </div>
</div> </div>
</Section> </Section>