mirror of
https://github.com/hyprwm/hyprland-website.git
synced 2026-05-05 07:38:00 +02:00
donators: add PR feedback
This commit is contained in:
parent
2949a3762f
commit
72b37199d9
5 changed files with 79 additions and 72 deletions
|
|
@ -1,22 +1,6 @@
|
|||
{
|
||||
"top": [
|
||||
{
|
||||
"name": "Herbert",
|
||||
"link": "https://github.com/herbert",
|
||||
"image": "https://i.imgur.com/Y7xhCk2.png"
|
||||
},
|
||||
{
|
||||
"name": "Peter Griffin",
|
||||
"link": "https://github.com/peter",
|
||||
"image": "https://i.imgur.com/4MyOkLZ.jpeg"
|
||||
},
|
||||
{
|
||||
"name": "Quagmire",
|
||||
"image": "https://media2.giphy.com/media/v1.Y2lkPTc5MGI3NjExMnYwNDJsdGFkeGlwbzIybXM2Zmpzb3phZ3duNHBub2lkcXJyZDhjaCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/o2La4Pvf9CdJC/giphy.gif"
|
||||
}
|
||||
],
|
||||
|
||||
"month": [
|
||||
"month": "May 2025",
|
||||
"monthTop": [
|
||||
{
|
||||
"name": "Herbert",
|
||||
"link": "https://github.com/herbert",
|
||||
|
|
@ -47,7 +31,22 @@
|
|||
}
|
||||
],
|
||||
|
||||
"gold": [{ "name": "Meg Griffin" }, { "name": "Chris Griffin" }, { "name": "Stewie Griffin" }],
|
||||
"gold": [
|
||||
{
|
||||
"name": "Herbert",
|
||||
"link": "https://github.com/herbert",
|
||||
"image": "https://i.imgur.com/Y7xhCk2.png"
|
||||
},
|
||||
{
|
||||
"name": "Peter Griffin",
|
||||
"link": "https://github.com/peter",
|
||||
"image": "https://i.imgur.com/4MyOkLZ.jpeg"
|
||||
},
|
||||
{
|
||||
"name": "Quagmire",
|
||||
"image": "https://media2.giphy.com/media/v1.Y2lkPTc5MGI3NjExMnYwNDJsdGFkeGlwbzIybXM2Zmpzb3phZ3duNHBub2lkcXJyZDhjaCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/o2La4Pvf9CdJC/giphy.gif"
|
||||
}
|
||||
],
|
||||
|
||||
"silver": [{ "name": "Brian Griffin" }, { "name": "Cleveland Brown" }, { "name": "Joe Swanson" }],
|
||||
"bronze": [
|
||||
|
|
@ -55,6 +54,7 @@
|
|||
{ "name": "Angela" },
|
||||
{ "name": "Barbara Pewterschmidt" },
|
||||
{ "name": "Consuela" },
|
||||
{ "name": "Stewie" },
|
||||
{ "name": "James Woods" }
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,25 +1,23 @@
|
|||
<script lang="ts">
|
||||
import { cn } from '$lib/Helper'
|
||||
import type { Donator } from '../../routes/api/community/+server'
|
||||
import Clickable from './Clickable.svelte'
|
||||
import { cn } from '$lib/Helper'
|
||||
|
||||
export let donator: Donator
|
||||
export let showImage = false
|
||||
</script>
|
||||
|
||||
<Clickable
|
||||
class={cn(
|
||||
'group relative flex w-28 flex-col gap-1.5 rounded-lg bg-slate-100/5 p-2 outline outline-1 outline-slate-100/20 ',
|
||||
donator.link && 'cursor-pointer transition-all hover:bg-slate-100/10 hover:outline-cyan-500/50'
|
||||
)}
|
||||
href={donator.link}
|
||||
>
|
||||
{#if donator.image}
|
||||
<img class="size-20 self-center justify-self-start rounded-md" src={donator.image} alt="" />
|
||||
<Clickable href={donator.link}>
|
||||
{#if showImage && donator.image}
|
||||
<img
|
||||
title={donator.name}
|
||||
class="h-24 max-w-32 self-center justify-self-start rounded-md object-contain"
|
||||
src={donator.image}
|
||||
alt=""
|
||||
/>
|
||||
{:else}
|
||||
<div class="size-20 self-center rounded-md bg-gradient-to-tr from-cyan-500/30 to-transparent" />
|
||||
<div class={cn('text-xs font-bold text-slate-200', donator.link && 'hover:text-cyan-100')}>
|
||||
{donator.name}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="text-xs font-bold text-slate-200">
|
||||
{donator.name}
|
||||
</div>
|
||||
</Clickable>
|
||||
|
|
|
|||
|
|
@ -6,52 +6,68 @@
|
|||
</script>
|
||||
|
||||
<div class="relative max-w-[1024px] select-none">
|
||||
<div class="flex min-h-max origin-bottom-right select-none flex-wrap gap-8">
|
||||
{#if donators.platinum.length > 0 || donators.gold.length > 0}
|
||||
<div class="flex flex-col gap-2 rounded-xl p-4 outline outline-1 outline-primary">
|
||||
<div class="flex min-h-max flex-wrap gap-8 text-sm">
|
||||
{#if donators.platinum.length > 0}
|
||||
<div class="flex flex-col gap-2 rounded-xl">
|
||||
<h2
|
||||
class="bg-gradient-to-r from-primary to-blue-500 bg-clip-text text-xl font-bold text-transparent"
|
||||
>
|
||||
Platinum + Gold sponsor
|
||||
Platinum
|
||||
</h2>
|
||||
<div class="flex flex-wrap gap-4">
|
||||
{#each donators.platinum as donator}
|
||||
<Donator {donator} />
|
||||
<Donator {donator} showImage />
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{#if donators.silver.length > 0 || donators.bronze.length > 0}
|
||||
<div class="flex flex-col gap-2">
|
||||
<h2 class="text-lg font-bold">Silver + Bronze sponsor</h2>
|
||||
|
||||
{#if donators.gold.length > 0}
|
||||
<div class="flex flex-col gap-2 rounded-xl">
|
||||
<h2
|
||||
class="bg-gradient-to-r from-yellow-200 to-yellow-400 bg-clip-text text-xl font-bold text-transparent"
|
||||
>
|
||||
Gold
|
||||
</h2>
|
||||
<div class="flex flex-wrap gap-4">
|
||||
{#each donators.silver as donator}
|
||||
<Donator {donator} />
|
||||
{/each}
|
||||
|
||||
{#each donators.bronze as donator}
|
||||
<Donator {donator} />
|
||||
{#each donators.gold as donator}
|
||||
<Donator {donator} showImage />
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="flex flex-col gap-2">
|
||||
<h2 class=" text-lg font-bold">Top donators</h2>
|
||||
<div class="flex flex-wrap gap-4">
|
||||
{#each donators.top as donator}
|
||||
<Donator {donator} />
|
||||
{/each}
|
||||
</div>
|
||||
<div class="flex gap-4">
|
||||
{#if donators.silver.length > 0}
|
||||
<div class="flex flex-col gap-2">
|
||||
<h2 class="font-bold text-slate-200">Silver</h2>
|
||||
|
||||
<div class="flex flex-wrap gap-x-4 gap-y-2 font-medium">
|
||||
{#each donators.silver as donator}
|
||||
<Donator {donator} />
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{#if donators.bronze.length > 0}
|
||||
<div class="flex flex-col gap-2">
|
||||
<h2 class="font-bold text-slate-200">Bronze</h2>
|
||||
|
||||
<div class="flex flex-wrap gap-x-4 gap-y-2 font-medium">
|
||||
{#each donators.bronze as donator}
|
||||
<Donator {donator} />
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<div class="flex flex-col gap-2">
|
||||
<h2 class=" text-lg font-bold">Monthly top donators</h2>
|
||||
<div class="flex flex-wrap gap-4">
|
||||
{#each donators.month as donator}
|
||||
<Donator {donator} />
|
||||
<h2 class="font-bold text-slate-300">Monthly top donators in {donators.month}</h2>
|
||||
<div class="flex flex-wrap gap-4 font-medium">
|
||||
{#each donators.monthTop as donator, index}
|
||||
<Donator donator={{ ...donator, name: `#${index + 1} ${donator.name}` }} />
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -7,8 +7,9 @@ export type Donator = {
|
|||
image?: string
|
||||
}
|
||||
export type DonatorsRanked = Readonly<{
|
||||
top: readonly Donator[]
|
||||
month: readonly Donator[]
|
||||
/** The month for the top donators in `monthTop` */
|
||||
month: String
|
||||
monthTop: readonly Donator[]
|
||||
platinum: readonly Donator[]
|
||||
gold: readonly Donator[]
|
||||
silver: readonly Donator[]
|
||||
|
|
@ -16,15 +17,7 @@ export type DonatorsRanked = Readonly<{
|
|||
}>
|
||||
|
||||
export async function GET() {
|
||||
return json(
|
||||
donators
|
||||
// await Promise.all(
|
||||
// donators.map(async (donator: Donator) => ({
|
||||
// ...donator,
|
||||
// image: donator.image ?? `/api/identicon/${encodeURI(donator.name)}`
|
||||
// }))
|
||||
// )
|
||||
)
|
||||
return json(donators)
|
||||
}
|
||||
|
||||
export const prerender = true
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
</script>
|
||||
|
||||
<section class="relative mb-12 flex max-w-5xl flex-col gap-8 px-8 md:mb-20">
|
||||
<Title>
|
||||
<Title align="left" class="px-0">
|
||||
<TitlePre slot="pre">And a huge thank you!</TitlePre>
|
||||
<h2 slot="title" class="text-2xl font-bold md:text-3xl">Our top supporters</h2>
|
||||
</Title>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue