Skip to content

Commit 12f2699

Browse files
authored
General fixes (#1249)
* make documents rosa * change dark border color * do not put committee links on new line * fix position links on board page * make punctuation uniform in navbar * fix nicknames in search result * fix news search z-index * optimize images * fix privacy policy page * add board documents
1 parent 52f22a1 commit 12f2699

12 files changed

Lines changed: 54 additions & 28 deletions

File tree

src/app.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
--muted: oklch(28% 0.004 0);
4646
--muted-background: oklch(20.5% 0.006 285.885);
4747
--muted-foreground: oklch(72% 0.006 0);
48-
--border: oklch(42% 0.005 0);
48+
--border: oklch(33% 0.005 0);
4949
--secondary-foreground: oklch(90% 0.002 0);
5050
--secondary-hover: oklch(28% 0.004 0);
5151
--accent: oklch(30% 0.006 0);

src/lib/components/search/ArticleSearchResult.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
const { data }: { data: ArticleSearchReturnAttributes } = $props();
77
import dayjs from "dayjs";
88
import MemberAvatar from "$lib/components/member/MemberAvatar.svelte";
9+
import { getFullName } from "$lib/utils/client/member";
910
</script>
1011

1112
<Command.LinkItem
@@ -27,7 +28,7 @@
2728
<MemberAvatar member={data.author} class="size-4" />
2829

2930
<span class="text-muted-foreground line-clamp-1"
30-
>{`${data.author.firstName} "${data.author.nickname}" ${data.author.lastName}`}</span
31+
>{getFullName(data.author)}</span
3132
>
3233
</div>
3334
</div>

src/routes/(app)/about/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
>
9292
<div
9393
class="before:to-[rgba(0, 0, 0, 1)] before:from-accent bg-rosa-300 relative hidden w-1/2 rounded-r-md bg-cover bg-center before:absolute before:left-0 before:mr-0 before:h-full before:w-60 before:bg-linear-to-r sm:block"
94-
style="background-image: url('https://files.dsek.se/files/public/photos/dchip.jpg')"
94+
style="background-image: url('https://files.dsek.se/files/public/photos/dchip.webp')"
9595
>
9696
<img
9797
src="https://www.dchip.se/images/rosa_panter.png"

src/routes/(app)/board/+page.svelte

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import ArrowRight from "@lucide/svelte/icons/arrow-right";
1010
import * as Avatar from "$lib/components/ui/avatar";
1111
import { getFileUrl } from "$lib/files/client";
12+
import { getPositionLink } from "$lib/utils/positions";
1213
1314
let { data }: { data: PageData } = $props();
1415
</script>
@@ -32,10 +33,17 @@
3233
<p>{m.board_prose()}</p>
3334

3435
<div class="mt-4 flex flex-col gap-2 md:flex-row">
35-
<Button disabled size="sm" variant="rosa"
36-
><Pen /> Läs verksamhetsplanen <ArrowRight /></Button
36+
<Button
37+
href="https://files.dsek.se/documents/public/2025/HTM2/Verksamhetsplan_2026.pdf"
38+
target="_blank"
39+
size="sm"
40+
variant="rosa"><Pen /> Läs verksamhetsplanen <ArrowRight /></Button
3741
>
38-
<Button disabled size="sm" variant="lila"
42+
<Button
43+
href="https://files.dsek.se/documents/public/2026/S11/Likabehandlingsplan_styrelsen.pdf"
44+
target="_blank"
45+
size="sm"
46+
variant="lila"
3947
><Pen /> Styrelsens likabehandlingsplan <ArrowRight /></Button
4048
>
4149
</div>
@@ -59,7 +67,7 @@
5967
</a>
6068
<a
6169
class="mt-1 hover:underline"
62-
href="/positions/{boardMember.position.id}"
70+
href={getPositionLink(boardMember.position.id)}
6371
><h6>
6472
{boardMember.position.name}
6573
</h6></a
@@ -84,7 +92,7 @@
8492
</div>
8593
<a
8694
class="mt-1 hover:underline"
87-
href="/positions/{boardMember.position.id}"
95+
href={getPositionLink(boardMember.position.id)}
8896
><h6>
8997
{boardMember.position.name}
9098
</h6></a

src/routes/(app)/committees/+layout.svelte

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
1515
import * as m from "$paraglide/messages";
1616
import LinksDialog from "./LinksDialog.svelte";
17-
import { marked } from "marked";
17+
import { Marked } from "marked";
1818
import { isAuthorized } from "$lib/utils/authorization";
1919
import apiNames from "$lib/utils/apiNames";
2020
import { page } from "$app/state";
@@ -25,6 +25,18 @@
2525
let canEdit = $state(isAuthorized(apiNames.COMMITTEE.UPDATE, page.data.user));
2626
2727
let committee = $derived(data.committee);
28+
29+
const renderer = {
30+
// needed to preserve line breaks
31+
br(): string {
32+
return `
33+
<span><br /></span>`;
34+
},
35+
};
36+
37+
const breakMarked = new Marked();
38+
39+
breakMarked.use({ renderer });
2840
</script>
2941

3042
<div class="sm:layout-container sm:py-0">
@@ -90,7 +102,7 @@
90102
href="/about#committees"><ArrowLeft class="size-4" />{m.back()}</a
91103
>
92104
<div
93-
class="[&_a]:text-muted-foreground [&_a]:hover:text-foreground flex flex-col gap-1 [&_a]:transition-all [&_strong]:font-medium"
105+
class="[&_a]:text-muted-foreground [&_a]:hover:text-foreground flex flex-col gap-1 leading-normal [&_a]:transition-all [&_strong]:font-medium"
94106
>
95107
<span class="font-medium">{committee.name}</span>
96108
<a href="/committees/{committee.shortName}">{m.committees_about()}</a>
@@ -100,9 +112,8 @@
100112
<a href="/committees/{committee.shortName}/news"
101113
>{m.committees_news()}</a
102114
>
103-
<span>&nbsp;</span>
104115
<!-- eslint-disable-next-line svelte/no-at-html-tags Already sanitized -->
105-
{@html marked.parseInline(data.links?.markdown ?? "")}
116+
{@html breakMarked.parseInline(data.links?.markdown ?? "")}
106117
</div>
107118
{#if canEdit}
108119
<LinksDialog {data} />

src/routes/(app)/documents/Meeting.svelte

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,23 +59,26 @@
5959
disabled={!notice}
6060
variant="outline"
6161
class="cursor-pointer rounded-sm"
62-
><FileText /> {m.documents_notice()}</Button
62+
><FileText class="text-rosa-background" />
63+
{m.documents_notice()}</Button
6364
></a
6465
>
6566
<a href={agenda && agenda.thumbnailUrl!}
6667
><Button
6768
variant="outline"
6869
disabled={!agenda}
6970
class="cursor-pointer rounded-sm"
70-
><FileText /> {m.documents_agenda()}</Button
71+
><FileText class="text-rosa-background" />
72+
{m.documents_agenda()}</Button
7173
></a
7274
>
7375
<a href={minutes && minutes.thumbnailUrl!}
7476
><Button
7577
variant="outline"
7678
disabled={!minutes}
7779
class="cursor-pointer rounded-sm"
78-
><FileText /> {m.documents_minutes()}</Button
80+
><FileText class="text-rosa-background" />
81+
{m.documents_minutes()}</Button
7982
></a
8083
>
8184
</div>

src/routes/(app)/news/ArticleSearchResult.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import MemberAvatar from "$lib/components/member/MemberAvatar.svelte";
33
44
import type { ArticleSearchReturnAttributes } from "$lib/search/searchTypes";
5+
import { getFullName } from "$lib/utils/client/member";
56
import { getLocale } from "$paraglide/runtime";
67
const { data }: { data: ArticleSearchReturnAttributes } = $props();
78
import dayjs from "dayjs";
@@ -26,7 +27,7 @@
2627
<MemberAvatar member={data.author} class="size-4" />
2728

2829
<span class="text-muted-foreground line-clamp-1"
29-
>{`${data.author.firstName} "${data.author.nickname}" ${data.author.lastName}`}</span
30+
>{getFullName(data.author)}</span
3031
>
3132
</div>
3233
</div>

src/routes/(app)/news/NewsSearch.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090

9191
{#if groupedResults.articles.length > 0}
9292
<ScrollArea
93-
class="bg-background absolute! mr-4 max-h-48 max-w-108 overflow-scroll rounded-md border-[1px] sm:mr-0 sm:max-w-128 sm:min-w-128"
93+
class="bg-background absolute! z-50 mr-4 max-h-48 max-w-108 overflow-scroll rounded-md border-[1px] sm:mr-0 sm:max-w-128 sm:min-w-128"
9494
>
9595
{#each groupedResults.articles as result, i (`article-${i}`)}
9696
<ArticleSearchResult data={result.data} />

src/routes/(app)/onboarding/+page.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
<SetPageTitle title={m.onboarding()} />
5252
<div
5353
class="hero-image min-h-screen bg-cover bg-center"
54-
style:--url="url({getFileUrl('minio/files/public/photos/stock2.jpg')})"
54+
style:--url="url({getFileUrl('minio/files/public/photos/stock2.webp')})"
5555
>
5656
<div class="min-h-screen bg-cover py-16 md:bg-transparent">
5757
<div

src/routes/(app)/privacy-policy/+page.svelte

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,4 +281,6 @@ Integritetsskyddsmyndigheten kontaktas på följande e-postadress:
281281
`;
282282
</script>
283283

284-
<MarkdownBody class="max-w-full" body={policy} />
284+
<div class="layout-container">
285+
<MarkdownBody class="max-w-full" body={policy} />
286+
</div>

0 commit comments

Comments
 (0)