Skip to content

Commit d3d8370

Browse files
committed
feat(lxlweb): icons for uppsok categories
1 parent d9254c4 commit d3d8370

3 files changed

Lines changed: 13 additions & 3 deletions

File tree

‎lxl-web/src/lib/components/TypeIcon.svelte‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import BiGeoAlt from '~icons/bi/geo-alt';
2727
import BiClockHistory from '~icons/bi/clock-history';
2828
import BiBank from '~icons/bi/bank';
29+
import BiJournalText from '~icons/bi/journal-text';
2930
import type { SVGAttributes } from 'svelte/elements';
3031
import type { Component } from 'svelte';
3132
@@ -89,9 +90,12 @@
8990
9091
// New work types
9192
Collection: BiBoxes,
92-
Integrating: BiDatabase
93+
Integrating: BiDatabase,
9394
9495
//Serial: ???,
96+
97+
// Uppsök
98+
uppsok: BiJournalText
9599
};
96100
97101
const TypeIcon = $derived.by(() => {

‎lxl-web/src/lib/utils/bookAspectRatio.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@ const BOOKTYPE = [
1212
'Barn-%20och%20ungdomslitteratur',
1313
'Seriella%20publikationer',
1414
'Periodika',
15-
'NotatedMusic'
15+
'NotatedMusic',
16+
'uppsok'
1617
];

‎lxl-web/src/lib/utils/getTypeLike.server.ts‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,12 @@ export function getTypeForIcon(typeLike: TypeLike) {
235235
.concat(typeLike.select)
236236
.concat(typeLike.none)) {
237237
if (t) {
238-
const slugStr = slug(((t[JsonLd.ID] as string) || '').replace('/bibdb/', '/bibdb:'));
238+
const slugStr = slug(
239+
((t[JsonLd.ID] as string) || '')
240+
.replace('/bibdb/', '/bibdb:')
241+
.replace('/uppsok/', '/uppsok:')
242+
.replace(/uppsok:.*/, 'uppsok')
243+
);
239244
result.push(slugStr);
240245
}
241246
}

0 commit comments

Comments
 (0)