Skip to content

Commit

Permalink
add SRD button on home page
Browse files Browse the repository at this point in the history
  • Loading branch information
anahitachavan committed Jan 19, 2025
1 parent af8dbbd commit 867dbc6
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/lib/components/home/CafeOpenTimes.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</script>

<a
class="pop-out flex gap-6 rounded-2xl bg-base-300 p-6"
class="pop-out flex gap-6 rounded-2xl bg-base-300 p-3"
href="/committees/cafe"
>
<span
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/home/Events.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<div class="pop-out mt-0.5 bg-base-200">
<a
href={eventLink(event)}
class="flex h-full flex-col justify-start gap-x-4 p-4"
class="flex h-full flex-col justify-start gap-x-5 p-4"
>
<div class="flex flex-row">
<div
Expand Down
21 changes: 21 additions & 0 deletions src/lib/components/home/SRDCTA.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<script lang="ts">
import * as m from "$paraglide/messages";
</script>

<a
class="pop-out flex gap-6 rounded-2xl bg-base-300 p-3"
href="https://link.dsek.se/srd"
target="_blank"
rel="noreferrer noopener"
>
<span
class="i-mdi-pencil self-center text-2xl text-secondary lg:text-primary"
/>

<article>
<p>{m.home_feedbackSRD()}</p>
<h2 class="text-xl font-bold text-secondary lg:text-primary">
{m.home_contactSRD()}
</h2>
</article>
</a>
2 changes: 1 addition & 1 deletion src/lib/components/home/WellbeingCTA.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
</script>

<a
class="pop-out flex gap-6 rounded-2xl bg-base-300 p-6"
class="pop-out flex gap-6 rounded-2xl bg-base-300 p-3"
href="https://bit.ly/kontaktatrivsel"
target="_blank"
rel="noreferrer noopener"
Expand Down
4 changes: 4 additions & 0 deletions src/routes/(app)/app/home/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import SetPageTitle from "$lib/components/nav/SetPageTitle.svelte";
import Events from "$lib/components/home/Events.svelte";
import WellbeingCta from "$lib/components/home/WellbeingCTA.svelte";
import SRDCta from "$lib/components/home/SRDCTA.svelte";
import CafeOpenTimes from "$lib/components/home/CafeOpenTimes.svelte";
import Documents from "$lib/components/home/Documents.svelte";
import CodeWithDwww from "$lib/components/home/CodeWithDWWW.svelte";
Expand Down Expand Up @@ -33,6 +34,9 @@
<section>
<WellbeingCta />
</section>
<section>
<SRDCta />
</section>

<section>
<Documents files={data.files} />
Expand Down
12 changes: 7 additions & 5 deletions src/routes/(app)/home/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,23 @@
import Articles from "$lib/components/home/Articles.svelte";
import Events from "$lib/components/home/Events.svelte";
import WellbeingCTA from "$lib/components/home/WellbeingCTA.svelte";
import SRDCta from "$lib/components/home/SRDCTA.svelte";
import CafeOpenTimes from "$lib/components/home/CafeOpenTimes.svelte";
import CodeWithDWWW from "$lib/components/home/CodeWithDWWW.svelte";
import Documents from "$lib/components/home/Documents.svelte";
import type { PageData } from "./$types";
import DsekLogo from "$lib/components/DsekLogo.svelte";
import { page } from "$app/stores";
import { getFullName } from "$lib/utils/client/member";
import SetPageTitle from "$lib/components/nav/SetPageTitle.svelte";
import * as m from "$paraglide/messages";
import Srdcta from "$lib/components/home/SRDCTA.svelte";

Check failure on line 15 in src/routes/(app)/home/+page.svelte

View workflow job for this annotation

GitHub Actions / build

'Srdcta' is defined but never used
export let data: PageData;
</script>

<SetPageTitle />

<div class="grid grid-cols-1 gap-x-5 gap-y-10 md:grid-cols-3 xl:grid-cols-5">
<div class="grid grid-cols-1 gap-x-5 gap-y-10 md:grid-cols-3 xl:grid-cols-6">
<section class="col-span-1 hidden flex-col place-items-center xl:flex">
<DsekLogo class="size-48 pl-4 text-primary" />
{#if $page.data.member}
Expand All @@ -35,24 +36,25 @@
{/if}
</section>
<section
class="flex flex-col md:-order-2 md:col-span-3 lg:order-none lg:col-span-3 xl:col-span-4"
class="flex flex-col md:-order-2 md:col-span-3 lg:order-none lg:col-span-3 xl:col-span-5"
>
<Articles news={data.news} />
</section>

<section class="md:col-span-3 lg:col-span-2 xl:col-span-3">
<section class="md:col-span-3 lg:col-span-2 xl:col-span-4">
<Events events={data.events} />
</section>

<section
class="flex flex-col justify-evenly gap-4 sm:flex-row md:col-span-3 lg:col-span-1 lg:flex-col xl:col-span-2"
>
<WellbeingCTA />
<SRDCta />
<CafeOpenTimes cafeOpen={data.cafeOpen} />
</section>

<section
class="order-last md:col-span-3 lg:col-span-3 xl:order-none xl:col-span-2"
class="order-last md:col-span-3 lg:col-span-3 xl:order-none xl:col-span-3"
>
<CodeWithDWWW
commitCount={data.commitCount}
Expand Down
4 changes: 3 additions & 1 deletion src/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@
"home_meetingNext": "Next meeting",
"home_meetingPrev": "Previous meeting",
"home_feedback": "Thoughts or opinions?",
"home_feedbackSRD": "Opinions on your education?",
"home_contactWellbeing": "Contact the Wellbeing Committee",
"home_contactSRD": "Contact the Student Council",
"home_codeWithDWWW": "Code with DWWW!",
"home_DWWWMessage": "Have you found a bug, do you have a great idea for a new feature or do you want to learn web development? Then you have found the right place!",
"home_reportBug": "Report a bug",
Expand Down Expand Up @@ -815,4 +817,4 @@
"admin_info_createNewInfoPage": "Create new information page",
"admin_info_infoPageCreated": "Information page created",
"info": "Info"
}
}
4 changes: 3 additions & 1 deletion src/translations/sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@
"home_meetingNext": "Nästa möte",
"home_meetingPrev": "Senaste möte",
"home_feedback": "Tankar eller åsikter?",
"home_feedbackSRD": "Åsikter om utbildningen?",
"home_contactWellbeing": "Kontakta Trivselrådet",
"home_contactSRD": "Kontakta Studierådet",
"home_codeWithDWWW": "Koda med DWWW!",
"home_DWWWMessage": "Har du hittat en bug, har en bra idé på en ny feature eller vill lära dig\n webbutveckling? Då har du hittat rätt ställe!",
"home_reportBug": "Rapportera en bug",
Expand Down Expand Up @@ -811,4 +813,4 @@
"admin_info_createNewInfoPage": "Skapa en ny informationssida",
"admin_info_infoPageCreated": "Informationssida skapad",
"info": "Info"
}
}

0 comments on commit 867dbc6

Please sign in to comment.