@turnipxenon/pineapple 3.0.0-alpha.7 → 3.0.0-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/blog_template/BlogTemplate.svelte +3 -1
- package/dist/components/blog_template/BlogTemplate.svelte.d.ts +1 -1
- package/dist/components/blog_template/BlogTemplateInner.svelte +1 -1
- package/dist/components/blog_template/BlogTemplateInner.svelte.d.ts +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/layouts/SeaweedBaseLayout.svelte +0 -2
- package/dist/components/navigation_component/NavigationComponent.svelte +2 -1
- package/dist/components/navigation_component/NavigationControl.svelte +1 -1
- package/dist/styles/turnip-theme.css +64 -64
- package/dist/template/seaweed/entries/ThisWebpage.svelte +1 -1
- package/dist/template/seaweed/entries/WorkExperience.svelte +1 -1
- package/dist/ui/components/accordion/PinyaAccordion.svelte +21 -0
- package/dist/ui/components/accordion/PinyaAccordion.svelte.d.ts +8 -0
- package/dist/ui/components/accordion/PinyaAccordionItem.svelte +29 -0
- package/dist/ui/components/accordion/PinyaAccordionItem.svelte.d.ts +9 -0
- package/dist/ui/components/accordion/index.d.ts +2 -0
- package/dist/ui/components/accordion/index.js +2 -0
- package/dist/ui/components/index.d.ts +1 -0
- package/dist/ui/components/index.js +1 -0
- package/dist/{components/ElementVisbilityDetector.svelte → ui/elements/ElementVisibilityDetector.svelte} +6 -3
- package/dist/ui/elements/ElementVisibilityDetector.svelte.d.ts +8 -0
- package/dist/ui/elements/Placeholder.svelte +17 -0
- package/dist/ui/elements/Placeholder.svelte.d.ts +7 -0
- package/dist/ui/elements/index.d.ts +1 -0
- package/dist/ui/elements/index.js +1 -0
- package/dist/ui/modules/seaweed/ChumBucket.svelte +5 -4
- package/dist/ui/templates/seaweed-layout/EntryGroup.svelte +5 -5
- package/dist/ui/templates/seaweed-layout/SeaweedLayout.svelte +90 -9
- package/dist/ui/templates/seaweed-layout/SeaweedLayout.svelte.d.ts +1 -1
- package/dist/ui/templates/seaweed-layout/props.d.ts +2 -0
- package/package.json +3 -2
- package/dist/components/ElementVisbilityDetector.svelte.d.ts +0 -7
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { Card, enableDialogueOverlay, type SimplePageMeta } from "../..";
|
|
3
2
|
import "./blog-template.css";
|
|
4
3
|
import { enableBackground } from "../../store";
|
|
5
4
|
import { onDestroy, onMount } from "svelte";
|
|
6
5
|
import BlogTemplateInner from "./BlogTemplateInner.svelte";
|
|
6
|
+
import type { SimplePageMeta } from "../navigation_component/index";
|
|
7
|
+
import { enableDialogueOverlay } from "../dialog_manager/DialogManagerStore";
|
|
8
|
+
import { Card } from "../index";
|
|
7
9
|
|
|
8
10
|
// grab page meta from the adjacent meta.json
|
|
9
11
|
interface Props {
|
|
@@ -3,6 +3,6 @@ export { default as Card } from "./Card.svelte";
|
|
|
3
3
|
export { default as Chip } from "./chip/Chip.svelte";
|
|
4
4
|
export { default as PineappleSlideToggle } from "./PineappleSlideToggle.svelte";
|
|
5
5
|
export { default as SocialSection } from "../ui/components/SocialSection.svelte";
|
|
6
|
-
export { default as
|
|
6
|
+
export { default as ElementVisibilityDetector } from "../ui/elements/ElementVisibilityDetector.svelte";
|
|
7
7
|
export { default as BlogTemplate } from "./blog_template/BlogTemplate.svelte";
|
|
8
8
|
export { default as DialogOverlay } from "./dialog_overlay/DialogOverlay.svelte";
|
package/dist/components/index.js
CHANGED
|
@@ -4,6 +4,6 @@ export { default as Card } from "./Card.svelte";
|
|
|
4
4
|
export { default as Chip } from "./chip/Chip.svelte";
|
|
5
5
|
export { default as PineappleSlideToggle } from "./PineappleSlideToggle.svelte";
|
|
6
6
|
export { default as SocialSection } from "../ui/components/SocialSection.svelte";
|
|
7
|
-
export { default as
|
|
7
|
+
export { default as ElementVisibilityDetector } from "../ui/elements/ElementVisibilityDetector.svelte";
|
|
8
8
|
export { default as BlogTemplate } from "./blog_template/BlogTemplate.svelte";
|
|
9
9
|
export { default as DialogOverlay } from "./dialog_overlay/DialogOverlay.svelte";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import NavigationControl from "./NavigationControl.svelte";
|
|
3
|
-
import { Card, createGoToFunction } from "../..";
|
|
4
3
|
import { parsePageMeta, type ParsePageMetaCompareFn } from "./PageMeta";
|
|
4
|
+
import { Card } from "../index";
|
|
5
|
+
import { createGoToFunction } from "../../util/util";
|
|
5
6
|
|
|
6
7
|
|
|
7
8
|
|
|
@@ -237,89 +237,89 @@ html.dark {
|
|
|
237
237
|
@variant dark {
|
|
238
238
|
color: var(--color-surface-950);
|
|
239
239
|
}
|
|
240
|
+
/* endregion components */
|
|
241
|
+
}
|
|
242
|
+
}
|
|
240
243
|
|
|
241
|
-
blockquote {
|
|
242
|
-
@apply mb-4;
|
|
243
|
-
font-style: italic;
|
|
244
|
-
border: 0;
|
|
245
|
-
text-align: center;
|
|
246
|
-
filter: brightness(140%);
|
|
247
|
-
}
|
|
248
244
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
245
|
+
blockquote {
|
|
246
|
+
@apply mb-4;
|
|
247
|
+
font-style: italic;
|
|
248
|
+
border: 0;
|
|
249
|
+
text-align: center;
|
|
250
|
+
filter: brightness(140%);
|
|
251
|
+
}
|
|
254
252
|
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
253
|
+
h1, h2, h3, h4, h5, h6, .fake-h2, .fake-h3, .fake-h4 {
|
|
254
|
+
text-align: center;
|
|
255
|
+
margin-top: 0;
|
|
256
|
+
font-weight: bolder;
|
|
257
|
+
color: var(--color-primary-900);
|
|
259
258
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
259
|
+
@variant dark {
|
|
260
|
+
color: var(--color-primary-100);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
263
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
264
|
+
h1 + p, h2 + p, h3 + p, h4 + p, h5 + p, h6 + p, .fake-h2 + p, .fake-h3 + p, .fake-h4 + p {
|
|
265
|
+
margin-top: 0.5lh;
|
|
266
|
+
}
|
|
267
267
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
268
|
+
h1 {
|
|
269
|
+
@apply text-4xl;
|
|
270
|
+
}
|
|
271
271
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
272
|
+
h2, .fake-h2 {
|
|
273
|
+
@apply text-3xl;
|
|
274
|
+
}
|
|
275
275
|
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
276
|
+
h3, .fake-h3 {
|
|
277
|
+
@apply text-2xl;
|
|
278
|
+
}
|
|
279
279
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
280
|
+
h4, .fake-h4 {
|
|
281
|
+
@apply text-xl;
|
|
282
|
+
}
|
|
283
283
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
284
|
+
h5 {
|
|
285
|
+
@apply text-lg;
|
|
286
|
+
}
|
|
287
287
|
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
288
|
+
h6 {
|
|
289
|
+
text-decoration: underline;
|
|
290
|
+
}
|
|
291
291
|
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
}
|
|
292
|
+
a {
|
|
293
|
+
text-decoration: underline;
|
|
294
|
+
color: var(--color-secondary-500);
|
|
296
295
|
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
296
|
+
@variant dark {
|
|
297
|
+
color: var(--color-secondary-300);
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
300
|
|
|
301
|
-
|
|
302
|
-
|
|
301
|
+
a:hover, a:focus {
|
|
302
|
+
filter: brightness(150%);
|
|
303
|
+
}
|
|
303
304
|
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
}
|
|
307
|
-
}
|
|
305
|
+
a:visited {
|
|
306
|
+
color: var(--color-secondary-950);
|
|
308
307
|
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
308
|
+
@variant dark {
|
|
309
|
+
color: var(--color-secondary-200);
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
312
|
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
313
|
+
ul {
|
|
314
|
+
list-style: inside;
|
|
315
|
+
}
|
|
316
316
|
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
317
|
+
ol {
|
|
318
|
+
list-style: decimal inside;
|
|
319
|
+
}
|
|
320
320
|
|
|
321
|
-
|
|
322
|
-
|
|
321
|
+
p{
|
|
322
|
+
@apply mb-3;
|
|
323
323
|
}
|
|
324
324
|
|
|
325
325
|
@theme {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import Card from "../../../components/Card.svelte";
|
|
4
4
|
import GithubIcon from "../../../assets/icons/github-mark.svg";
|
|
5
5
|
import ThisWebsiteFootage from "../../../assets/others/seaweed-showcase.mp4";
|
|
6
|
-
import { Chip } from "
|
|
6
|
+
import { Chip } from "../../../components/index";
|
|
7
7
|
|
|
8
8
|
// noinspection JSUnusedGlobalSymbols
|
|
9
9
|
interface Props {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import SocialSection from "../../../ui/components/SocialSection.svelte";
|
|
3
3
|
import Card from "../../../components/Card.svelte";
|
|
4
|
-
import ElementVisibilityDetector from "../../../
|
|
4
|
+
import ElementVisibilityDetector from "../../../ui/elements/ElementVisibilityDetector.svelte";
|
|
5
5
|
import type { EntryProps } from "./EntryProps";
|
|
6
6
|
|
|
7
7
|
interface Props {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Accordion } from "@skeletonlabs/skeleton-svelte";
|
|
3
|
+
import type { Snippet } from "svelte";
|
|
4
|
+
|
|
5
|
+
let {
|
|
6
|
+
value = $bindable(),
|
|
7
|
+
children,
|
|
8
|
+
}: {
|
|
9
|
+
value: string[],
|
|
10
|
+
children: Snippet,
|
|
11
|
+
} = $props();
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<Accordion
|
|
15
|
+
classes="bg-primary-100 dark:bg-tertiary-900 dark:saturate-75"
|
|
16
|
+
{value}
|
|
17
|
+
onValueChange={(e) => (value = e.value)}
|
|
18
|
+
collapsible
|
|
19
|
+
>
|
|
20
|
+
{@render children()}
|
|
21
|
+
</Accordion>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
value: string[];
|
|
4
|
+
children: Snippet;
|
|
5
|
+
};
|
|
6
|
+
declare const PinyaAccordion: import("svelte").Component<$$ComponentProps, {}, "value">;
|
|
7
|
+
type PinyaAccordion = ReturnType<typeof PinyaAccordion>;
|
|
8
|
+
export default PinyaAccordion;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// noinspection ES6UnusedImports
|
|
3
|
+
import { Accordion } from "@skeletonlabs/skeleton-svelte";
|
|
4
|
+
import type { Snippet } from "svelte";
|
|
5
|
+
|
|
6
|
+
let {
|
|
7
|
+
value,
|
|
8
|
+
control: controlSnippet,
|
|
9
|
+
panel: panelSnippet,
|
|
10
|
+
}: {
|
|
11
|
+
value: string,
|
|
12
|
+
control: Snippet;
|
|
13
|
+
panel: Snippet;
|
|
14
|
+
} = $props();
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<Accordion.Item
|
|
18
|
+
{value}
|
|
19
|
+
controlHover="hover:bg-primary-500 dark:hover:bg-secondary-600"
|
|
20
|
+
>
|
|
21
|
+
<!-- Control -->
|
|
22
|
+
{#snippet control()}
|
|
23
|
+
{@render controlSnippet()}
|
|
24
|
+
{/snippet}
|
|
25
|
+
<!-- Panel -->
|
|
26
|
+
{#snippet panel()}
|
|
27
|
+
{@render panelSnippet()}
|
|
28
|
+
{/snippet}
|
|
29
|
+
</Accordion.Item>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
value: string;
|
|
4
|
+
control: Snippet;
|
|
5
|
+
panel: Snippet;
|
|
6
|
+
};
|
|
7
|
+
declare const PinyaAccordionItem: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
8
|
+
type PinyaAccordionItem = ReturnType<typeof PinyaAccordionItem>;
|
|
9
|
+
export default PinyaAccordionItem;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
|
|
2
|
+
import { onMount, type Snippet } from "svelte";
|
|
3
3
|
|
|
4
4
|
interface Props {
|
|
5
5
|
isVisible?: boolean;
|
|
6
|
-
children?:
|
|
6
|
+
children?: Snippet;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
let {
|
|
9
|
+
let {
|
|
10
|
+
isVisible = $bindable(true),
|
|
11
|
+
children
|
|
12
|
+
}: Props = $props();
|
|
10
13
|
|
|
11
14
|
let stickyElem: HTMLElement = $state();
|
|
12
15
|
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type Snippet } from "svelte";
|
|
2
|
+
interface Props {
|
|
3
|
+
isVisible?: boolean;
|
|
4
|
+
children?: Snippet;
|
|
5
|
+
}
|
|
6
|
+
declare const ElementVisibilityDetector: import("svelte").Component<Props, {}, "isVisible">;
|
|
7
|
+
type ElementVisibilityDetector = ReturnType<typeof ElementVisibilityDetector>;
|
|
8
|
+
export default ElementVisibilityDetector;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
let {
|
|
3
|
+
isCircle = false,
|
|
4
|
+
classes = '',
|
|
5
|
+
}: {
|
|
6
|
+
isCircle?: boolean;
|
|
7
|
+
classes?: string;
|
|
8
|
+
} = $props();
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<div
|
|
12
|
+
class="
|
|
13
|
+
{isCircle ?'placeholder-circle' : 'placeholder'}
|
|
14
|
+
animate-pulse bg-surface-600 dark:bg-surface-800
|
|
15
|
+
{classes}
|
|
16
|
+
"
|
|
17
|
+
></div>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { default as ImageIcon } from "./ImageIcon.svelte";
|
|
2
2
|
export { default as TextLink } from "./TextLink.svelte";
|
|
3
|
+
export { default as ElementVisibilityDetector } from "./ElementVisibilityDetector.svelte";
|
|
3
4
|
export * from "./ColorScheme";
|
|
4
5
|
export * from "./GeneralUIProps";
|
|
5
6
|
export * from "./OnBackground";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { default as ImageIcon } from "./ImageIcon.svelte";
|
|
2
2
|
export { default as TextLink } from "./TextLink.svelte";
|
|
3
|
+
export { default as ElementVisibilityDetector } from "./ElementVisibilityDetector.svelte";
|
|
3
4
|
export * from "./ColorScheme";
|
|
4
5
|
export * from "./GeneralUIProps";
|
|
5
6
|
export * from "./OnBackground";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { type PageMeta } from "
|
|
2
|
+
import { type PageMeta } from "../../../components/navigation_component/index";
|
|
3
3
|
import { onMount } from "svelte";
|
|
4
|
+
import Placeholder from "../../elements/Placeholder.svelte";
|
|
4
5
|
|
|
5
6
|
let hasTriedGettingChumBucket = $state(false);
|
|
6
7
|
let pageMetaList: PageMeta[] = $state([]);
|
|
@@ -27,7 +28,7 @@
|
|
|
27
28
|
|
|
28
29
|
<div class="chum-bucket-grid">
|
|
29
30
|
{#if hasTriedGettingChumBucket}
|
|
30
|
-
{#each pageMetaList as pageMeta}
|
|
31
|
+
{#each pageMetaList as pageMeta (pageMeta.title)}
|
|
31
32
|
<div class="chum-bucket-item">
|
|
32
33
|
{#if pageMeta.imageUrl}
|
|
33
34
|
<img src={`https://turnipxenon.com${pageMeta.imageUrl}`}
|
|
@@ -48,8 +49,8 @@
|
|
|
48
49
|
</div>
|
|
49
50
|
{/each}
|
|
50
51
|
{:else}
|
|
51
|
-
{#each { length: 10 } as _}
|
|
52
|
-
<
|
|
52
|
+
{#each { length: 10 } as _, idx (idx)}
|
|
53
|
+
<Placeholder classes="mb-2" />
|
|
53
54
|
{/each}
|
|
54
55
|
{/if}
|
|
55
56
|
</div>
|
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
entryList
|
|
8
8
|
}: ProjectGroup = $props();
|
|
9
9
|
|
|
10
|
-
const isSpecial = entryList.length % 3 === 1;
|
|
10
|
+
const isSpecial = $derived(entryList.length % 3 === 1);
|
|
11
11
|
|
|
12
|
-
let normalUiList: SnippetMeta[] = isSpecial
|
|
12
|
+
let normalUiList: SnippetMeta[] = $derived(isSpecial
|
|
13
13
|
? [...entryList.slice(0, -4)]
|
|
14
|
-
: [...entryList];
|
|
15
|
-
let overflowUiList: SnippetMeta[] = isSpecial
|
|
14
|
+
: [...entryList]);
|
|
15
|
+
let overflowUiList: SnippetMeta[] = $derived(isSpecial
|
|
16
16
|
? [...entryList.slice(-4)]
|
|
17
|
-
: [];
|
|
17
|
+
: []);
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
// <!--todo: implement in seaweedlayout #migration-->
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import
|
|
2
|
+
import { fly } from "svelte/transition";
|
|
3
|
+
import type { ProjectGroup, SeaweedLayoutProps } from "./props";
|
|
3
4
|
import ChumBucket from "../../modules/seaweed/ChumBucket.svelte";
|
|
4
5
|
import { PinyaPageLayout } from "../index";
|
|
5
6
|
import { SocialSection } from "../../components/index";
|
|
@@ -9,17 +10,22 @@
|
|
|
9
10
|
import { SvelteMap } from "svelte/reactivity";
|
|
10
11
|
import EntryOrderConfig2 from "./EntryOrderConfig2.svelte";
|
|
11
12
|
import CreateUrlForm from "../../../template/seaweed/CreateUrlForm.svelte";
|
|
13
|
+
import { onMount } from "svelte";
|
|
14
|
+
import { page } from "$app/state";
|
|
12
15
|
|
|
13
16
|
let {
|
|
14
17
|
children,
|
|
15
18
|
sideSection,
|
|
16
19
|
entryList, // todo
|
|
17
|
-
layout
|
|
20
|
+
layout, // todo
|
|
18
21
|
domain = "http://localhost:5173/seaweed2",
|
|
19
|
-
queryTerms
|
|
22
|
+
queryTerms,
|
|
23
|
+
showMiniSocial = false,
|
|
24
|
+
serverParams = ""
|
|
20
25
|
}: SeaweedLayoutProps = $props();
|
|
21
26
|
|
|
22
|
-
let
|
|
27
|
+
let actualLayout = $state(layout);
|
|
28
|
+
let isAdvanceSettingOn = $state(false);
|
|
23
29
|
let orderUrl = $state("");
|
|
24
30
|
|
|
25
31
|
let queryStates = new SvelteMap<string, boolean>(queryTerms.map(term => [term, true]));
|
|
@@ -47,8 +53,8 @@
|
|
|
47
53
|
const chipList: string[] = [];
|
|
48
54
|
const termList: string[] = [];
|
|
49
55
|
queryStates.entries()
|
|
50
|
-
.filter(([
|
|
51
|
-
.forEach(([term
|
|
56
|
+
.filter(([, state]) => state)
|
|
57
|
+
.forEach(([term]) => {
|
|
52
58
|
const qtTerm = `.qt-${term}`;
|
|
53
59
|
termList.push(qtTerm);
|
|
54
60
|
chipList.push(`.text-chip${qtTerm}`);
|
|
@@ -78,6 +84,74 @@
|
|
|
78
84
|
});
|
|
79
85
|
|
|
80
86
|
let advancedUrl = $derived.by(() => `${domain}/?${advancedQuery}`);
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
/** qt values and what they mean:
|
|
90
|
+
* undefined: set all qt terms to font-weight: bold
|
|
91
|
+
* todo: implement clear
|
|
92
|
+
* clear: unset all terms to font-weight: normal
|
|
93
|
+
* <term>: only set qt-<term> to bold
|
|
94
|
+
* <term1>,<term2>: only set qt-<term1> and qt-<term2> to bold,
|
|
95
|
+
*
|
|
96
|
+
* ONLY CALL INSIDE onMount()
|
|
97
|
+
**/
|
|
98
|
+
const filterSearchParams = (searchParams: URLSearchParams) => {
|
|
99
|
+
// region Order
|
|
100
|
+
const orderParam = searchParams.get("order")?.trim();
|
|
101
|
+
console.log(searchParams);
|
|
102
|
+
console.log(orderParam);
|
|
103
|
+
if (orderParam) {
|
|
104
|
+
actualLayout = [];
|
|
105
|
+
|
|
106
|
+
orderParam.split(",").forEach((groupDefinition, idx) => {
|
|
107
|
+
const pair = groupDefinition.split(":");
|
|
108
|
+
if (pair.length >= 2) {
|
|
109
|
+
const group: ProjectGroup = {
|
|
110
|
+
title: pair[0],
|
|
111
|
+
entryList: [],
|
|
112
|
+
key: `${pair[0]}-${idx}`
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
pair[1].split("|").forEach(key => {
|
|
116
|
+
const component = entryList.find(e => e.key === key);
|
|
117
|
+
if (component) {
|
|
118
|
+
group.entryList.push(component);
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
actualLayout.push(group);
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
actualLayout = [...actualLayout];
|
|
127
|
+
console.log(actualLayout);
|
|
128
|
+
}
|
|
129
|
+
// endregion
|
|
130
|
+
|
|
131
|
+
// region Bold terms
|
|
132
|
+
const qtValue = searchParams.get("qt")?.trim();
|
|
133
|
+
if (qtValue !== undefined) {
|
|
134
|
+
queryStates.keys()
|
|
135
|
+
.forEach(key => queryStates.set(key, false));
|
|
136
|
+
|
|
137
|
+
if (qtValue !== "clear") {
|
|
138
|
+
qtValue.split(",").forEach((term) => {
|
|
139
|
+
if (queryStates.has(term)) {
|
|
140
|
+
queryStates.set(term, true);
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
// endregion Bold terms
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
onMount(() => {
|
|
149
|
+
if (serverParams) {
|
|
150
|
+
filterSearchParams(new URLSearchParams(serverParams));
|
|
151
|
+
} else if (page.url.searchParams.size) {
|
|
152
|
+
filterSearchParams(page.url.searchParams);
|
|
153
|
+
}
|
|
154
|
+
});
|
|
81
155
|
</script>
|
|
82
156
|
|
|
83
157
|
<svelte:head>
|
|
@@ -90,7 +164,14 @@
|
|
|
90
164
|
{/snippet}
|
|
91
165
|
<PinyaPageLayout>
|
|
92
166
|
{#snippet appBarLead()}
|
|
93
|
-
|
|
167
|
+
{#if showMiniSocial}
|
|
168
|
+
<div
|
|
169
|
+
class="flex flex-row"
|
|
170
|
+
transition:fly={{x:-10}}
|
|
171
|
+
>
|
|
172
|
+
<SocialSection isSmallVersion={true} />
|
|
173
|
+
</div>
|
|
174
|
+
{/if}
|
|
94
175
|
{/snippet}
|
|
95
176
|
|
|
96
177
|
<div id="upper-section">
|
|
@@ -105,7 +186,7 @@
|
|
|
105
186
|
</div>
|
|
106
187
|
|
|
107
188
|
<!--todo: render list #migration-->
|
|
108
|
-
{#each
|
|
189
|
+
{#each actualLayout as group (group.title)}
|
|
109
190
|
<EntryGroup {...group}></EntryGroup>
|
|
110
191
|
{/each}
|
|
111
192
|
|
|
@@ -143,7 +224,7 @@
|
|
|
143
224
|
</div>
|
|
144
225
|
|
|
145
226
|
<EntryOrderConfig2
|
|
146
|
-
{
|
|
227
|
+
bind:layout={actualLayout}
|
|
147
228
|
bind:orderUrl={orderUrl}
|
|
148
229
|
allEntries={entryList}
|
|
149
230
|
></EntryOrderConfig2>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { SeaweedLayoutProps } from "./props";
|
|
2
|
-
declare const SeaweedLayout: import("svelte").Component<SeaweedLayoutProps, {}, "
|
|
2
|
+
declare const SeaweedLayout: import("svelte").Component<SeaweedLayoutProps, {}, "">;
|
|
3
3
|
type SeaweedLayout = ReturnType<typeof SeaweedLayout>;
|
|
4
4
|
export default SeaweedLayout;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@turnipxenon/pineapple",
|
|
3
3
|
"description": "personal package for base styling for other personal projects",
|
|
4
|
-
"version": "3.0.0-alpha.
|
|
4
|
+
"version": "3.0.0-alpha.9",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "vite dev",
|
|
7
7
|
"build": "vite build && yarn package",
|
|
@@ -20,9 +20,10 @@
|
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@eslint/compat": "^1.2.5",
|
|
22
22
|
"@eslint/js": "^9.18.0",
|
|
23
|
-
"@sveltejs/adapter-auto": "^
|
|
23
|
+
"@sveltejs/adapter-auto": "^4.0.0",
|
|
24
24
|
"@sveltejs/kit": "^2.5.27",
|
|
25
25
|
"@sveltejs/package": "^2.3.7",
|
|
26
|
+
"@sveltejs/vite-plugin-svelte": "^4.0.0",
|
|
26
27
|
"eslint": "^9.18.0",
|
|
27
28
|
"eslint-config-prettier": "^10.0.1",
|
|
28
29
|
"eslint-plugin-svelte": "^3.0.0",
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
interface Props {
|
|
2
|
-
isVisible?: boolean;
|
|
3
|
-
children?: import('svelte').Snippet;
|
|
4
|
-
}
|
|
5
|
-
declare const ElementVisbilityDetector: import("svelte").Component<Props, {}, "isVisible">;
|
|
6
|
-
type ElementVisbilityDetector = ReturnType<typeof ElementVisbilityDetector>;
|
|
7
|
-
export default ElementVisbilityDetector;
|