Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
181 changes: 181 additions & 0 deletions src/lib/assets/logo-no-bg.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 8 additions & 6 deletions src/lib/components/Card.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@
</script>

{#snippet inner()}
<div class="w-full rounded-xl border-gray-200 bg-gray-100 p-4 shadow-xl duration-300 hover:scale-105 dark:bg-neutral-800">
<div class="flex w-full gap-4 rounded-xl border-gray-200 bg-gray-100 p-4 shadow-xl duration-300 hover:scale-105 dark:bg-neutral-800">
<div class="min-w-0 flex-1">
<h1 class="Sansemu truncate text-xl font-bold text-primary-500 sm:text-2xl lg:text-4xl">{title}</h1>
{#if children}
{@render children()}
{/if}
</div>
{#if image}
<img src={image} alt="" class="mb-4 h-40 w-full rounded-lg object-cover lg:mb-6 lg:h-80" />
{/if}
<h1 class="Sansemu truncate text-xl font-bold text-primary-500 sm:text-2xl lg:text-4xl">{title}</h1>
{#if children}
{@render children()}
<img src={image} alt="" class="h-16 w-16 shrink-0 rounded-lg object-contain lg:h-24 lg:w-24" />
{/if}
</div>
{/snippet}
Expand Down
5 changes: 5 additions & 0 deletions src/lib/components/Footer.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script lang="ts">
import LysatorLogo from '$lib/assets/logo-no-bg.svg';
let date = new Date();
</script>

Expand All @@ -7,6 +8,10 @@
<p class="text-sm text-gray-500 dark:text-gray-400">
&copy; {date.getFullYear()} Onlineföreningen SGC. All rights reserved.
</p>
<a href="https://www.lysator.liu.se" class="flex items-center gap-2 text-gray-500 hover:text-primary-500 dark:text-gray-400">
<span class="text-sm sm:text-base">Våra Minecraft servrar är inhysta hos</span>
<img src={LysatorLogo} alt="Lysator" class="h-7 sm:h-9" />
</a>
<div class="flex gap-4">
<a href="/information/om-oss" class="text-sm text-gray-500 hover:text-primary-500 dark:text-gray-400">Om Oss</a>
<a href="/kontakt" class="text-sm text-gray-500 hover:text-primary-500 dark:text-gray-400">Kontakt</a>
Expand Down
8 changes: 7 additions & 1 deletion src/routes/samarbeten/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import type { ListResult } from 'pocketbase';

export const load: PageServerLoad = async ({ locals }) => {
let collabs = await getList<CollaborationsRecord>(locals.pb, 'Collaborations');
const pbUrl = locals.pb.baseUrl;

return {
collabs: collabs.items.sort((a, b) => {
Expand All @@ -14,6 +15,11 @@ export const load: PageServerLoad = async ({ locals }) => {
if (az > bz) return -1;
if (az < bz) return 1;
return 0;
}),
}).map(collab => ({
...collab,
icon: collab.icon
? `${pbUrl}/api/files/Collaborations/${collab.id}/${collab.icon}`
: undefined
})),
};
};
2 changes: 1 addition & 1 deletion src/routes/samarbeten/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<div class="flex justify-center">
<div class="mt-8 flex max-w-[80vw] flex-col gap-8">
{#each collabs as collab (collab.id)}
<Card title={collab.name ?? ''} href={collab.link} id={collab.id}>
<Card title={collab.name ?? ''} href={collab.link} id={collab.id} image={collab.icon}>
<span class="markdown"> {@html collab.description}</span>
</Card>
{/each}
Expand Down
Loading