@turnipxenon/pineapple 2.10.0 → 3.0.0-alpha.1
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/assets/icons/icon-contrast.svg +1 -0
- package/dist/assets/icons/icon-dark-mode.svg +1 -0
- package/dist/assets/icons/icon-light-mode.svg +1 -0
- package/dist/assets/icons/icon-settings.svg +1 -0
- package/dist/components/Card.svelte +43 -41
- package/dist/components/Card.svelte.d.ts +11 -24
- package/dist/components/CarouselElement.svelte +15 -8
- package/dist/components/CarouselElement.svelte.d.ts +7 -18
- package/dist/components/ElementVisbilityDetector.svelte +23 -14
- package/dist/components/ElementVisbilityDetector.svelte.d.ts +6 -17
- package/dist/components/LazyAsset.svelte +93 -65
- package/dist/components/LazyAsset.svelte.d.ts +9 -19
- package/dist/components/PineappleSlideToggle.svelte +19 -7
- package/dist/components/PineappleSlideToggle.svelte.d.ts +8 -19
- package/dist/components/RandomizedBackground.svelte +46 -27
- package/dist/components/RandomizedBackground.svelte.d.ts +5 -15
- package/dist/components/RandomizedImage.svelte +15 -8
- package/dist/components/RandomizedImage.svelte.d.ts +6 -16
- package/dist/components/StickyElement.svelte +25 -16
- package/dist/components/StickyElement.svelte.d.ts +6 -17
- package/dist/components/ToggleableContent.svelte +88 -59
- package/dist/components/ToggleableContent.svelte.d.ts +6 -17
- package/dist/components/blog_template/BlogTemplate.svelte +45 -25
- package/dist/components/blog_template/BlogTemplate.svelte.d.ts +9 -20
- package/dist/components/blog_template/BlogTemplateInner.svelte +11 -3
- package/dist/components/blog_template/BlogTemplateInner.svelte.d.ts +6 -17
- package/dist/components/chip/Chip.svelte +33 -57
- package/dist/components/chip/Chip.svelte.d.ts +7 -18
- package/dist/components/combo_box/ComboBox.svelte +10 -4
- package/dist/components/combo_box/ComboBox.svelte.d.ts +6 -16
- package/dist/components/combo_box/ComboBoxWithButton.svelte +16 -9
- package/dist/components/combo_box/ComboBoxWithButton.svelte.d.ts +7 -17
- package/dist/components/combo_box/combo-box.postcss +2 -2
- package/dist/components/dialog_manager/DialogManager.d.ts +0 -1
- package/dist/components/dialog_manager/DialogManagerStore.d.ts +0 -1
- package/dist/components/dialog_manager/DialogManagerStore.js +1 -1
- package/dist/components/dialog_overlay/DialogOverlay.svelte +42 -34
- package/dist/components/dialog_overlay/DialogOverlay.svelte.d.ts +3 -14
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/layouts/SeaweedBaseLayout.svelte +80 -43
- package/dist/components/layouts/SeaweedBaseLayout.svelte.d.ts +8 -21
- package/dist/components/navigation_component/NavigationComponent.svelte +52 -141
- package/dist/components/navigation_component/NavigationComponent.svelte.d.ts +17 -26
- package/dist/components/navigation_component/NavigationControl.svelte +52 -103
- package/dist/components/navigation_component/NavigationControl.svelte.d.ts +7 -17
- package/dist/components/overrideable_meta/OverridableMeta.svelte +37 -22
- package/dist/components/overrideable_meta/OverridableMeta.svelte.d.ts +9 -19
- package/dist/components/pineapple/PineappleBaseLayout.svelte +132 -188
- package/dist/components/pineapple/PineappleBaseLayout.svelte.d.ts +6 -17
- package/dist/components/pineapple/toast/DefaultToastBody.svelte +14 -16
- package/dist/components/pineapple/toast/DefaultToastBody.svelte.d.ts +7 -17
- package/dist/components/pineapple/toast/Toast.d.ts +0 -1
- package/dist/components/pineapple/toast/Toast.svelte +92 -64
- package/dist/components/pineapple/toast/Toast.svelte.d.ts +3 -14
- package/dist/components/pineapple/toast/custom-toast/TestCustomToast.svelte.d.ts +22 -19
- package/dist/paraglide/messages/_index.d.ts +2 -0
- package/dist/paraglide/messages/_index.js +3 -0
- package/dist/paraglide/messages/example_message.d.ts +5 -0
- package/dist/paraglide/messages/example_message.js +39 -0
- package/dist/paraglide/messages/settings.d.ts +3 -0
- package/dist/paraglide/messages/settings.js +38 -0
- package/dist/paraglide/messages.d.ts +2 -0
- package/dist/paraglide/messages.js +4 -0
- package/dist/paraglide/registry.d.ts +21 -0
- package/dist/paraglide/registry.js +31 -0
- package/dist/paraglide/runtime.d.ts +400 -0
- package/dist/paraglide/runtime.js +1060 -0
- package/dist/paraglide/server.d.ts +64 -0
- package/dist/paraglide/server.js +161 -0
- package/dist/scripts/util/FileManagement.d.ts +1 -1
- package/dist/store.d.ts +0 -1
- package/dist/styles/app.css +53 -0
- package/dist/styles/turnip-theme.css +323 -0
- package/dist/template/seaweed/CreateUrlForm.svelte +50 -38
- package/dist/template/seaweed/CreateUrlForm.svelte.d.ts +5 -15
- package/dist/template/seaweed/SeaweedTemplate.svelte +244 -195
- package/dist/template/seaweed/SeaweedTemplate.svelte.d.ts +28 -25
- package/dist/template/seaweed/entries/ChefWings.svelte +37 -39
- package/dist/template/seaweed/entries/ChefWings.svelte.d.ts +5 -15
- package/dist/template/seaweed/entries/CustomizedYarnspinner.svelte +32 -24
- package/dist/template/seaweed/entries/CustomizedYarnspinner.svelte.d.ts +5 -15
- package/dist/template/seaweed/entries/Hepcat.svelte +58 -49
- package/dist/template/seaweed/entries/Hepcat.svelte.d.ts +5 -15
- package/dist/template/seaweed/entries/Pengi.svelte +51 -43
- package/dist/template/seaweed/entries/Pengi.svelte.d.ts +5 -15
- package/dist/template/seaweed/entries/Soulwork.svelte +44 -36
- package/dist/template/seaweed/entries/Soulwork.svelte.d.ts +5 -15
- package/dist/template/seaweed/entries/ThisWebpage.svelte +47 -38
- package/dist/template/seaweed/entries/ThisWebpage.svelte.d.ts +5 -15
- package/dist/template/seaweed/entries/WorkExperience.svelte +109 -92
- package/dist/template/seaweed/entries/WorkExperience.svelte.d.ts +6 -16
- package/dist/template/seaweed/entries/Workset.svelte +51 -42
- package/dist/template/seaweed/entries/Workset.svelte.d.ts +5 -15
- package/dist/template/seaweed/entry_order_config/EntryOrderConfig.svelte +136 -259
- package/dist/template/seaweed/entry_order_config/EntryOrderConfig.svelte.d.ts +10 -20
- package/dist/template/seaweed/seaweed.postcss +1 -9
- package/dist/{theme.postcss → theme.css} +1 -4
- package/dist/ui/components/FourPartCard.svelte +47 -0
- package/dist/ui/components/FourPartCard.svelte.d.ts +10 -0
- package/dist/ui/components/ModalBase.svelte +75 -0
- package/dist/ui/components/ModalBase.svelte.d.ts +8 -0
- package/dist/ui/components/SocialSection.svelte +87 -0
- package/dist/ui/components/SocialSection.svelte.d.ts +9 -0
- package/dist/ui/components/index.d.ts +3 -0
- package/dist/ui/components/index.js +3 -0
- package/dist/ui/components/randomized-background/RandomizedBackground.svelte +87 -0
- package/dist/ui/components/randomized-background/RandomizedBackground.svelte.d.ts +6 -0
- package/dist/ui/components/randomized-background/RandomizedImage.svelte +42 -0
- package/dist/ui/components/randomized-background/RandomizedImage.svelte.d.ts +7 -0
- package/dist/ui/elements/ColorScheme.d.ts +10 -0
- package/dist/ui/elements/ColorScheme.js +11 -0
- package/dist/ui/elements/GeneralUIProps.d.ts +12 -0
- package/dist/ui/elements/GeneralUIProps.js +1 -0
- package/dist/ui/elements/ImageIcon.svelte +54 -0
- package/dist/ui/elements/ImageIcon.svelte.d.ts +6 -0
- package/dist/ui/elements/OnBackground.d.ts +3 -0
- package/dist/ui/elements/OnBackground.js +4 -0
- package/dist/ui/elements/TextLink.svelte +17 -0
- package/dist/ui/elements/TextLink.svelte.d.ts +8 -0
- package/dist/ui/elements/WrapperProps.d.ts +4 -0
- package/dist/ui/elements/WrapperProps.js +1 -0
- package/dist/ui/elements/index.d.ts +8 -0
- package/dist/ui/elements/index.js +8 -0
- package/dist/ui/elements/pinya-button/component.svelte +47 -0
- package/dist/ui/elements/pinya-button/component.svelte.d.ts +4 -0
- package/dist/ui/elements/pinya-button/index.d.ts +2 -0
- package/dist/ui/elements/pinya-button/index.js +2 -0
- package/dist/ui/elements/pinya-button/props.d.ts +13 -0
- package/dist/ui/elements/pinya-button/props.js +6 -0
- package/dist/ui/elements/pinya-card/component.svelte +19 -0
- package/dist/ui/elements/pinya-card/component.svelte.d.ts +7 -0
- package/dist/ui/elements/pinya-card/index.d.ts +2 -0
- package/dist/ui/elements/pinya-card/index.js +2 -0
- package/dist/ui/elements/pinya-card/props.d.ts +7 -0
- package/dist/ui/elements/pinya-card/props.js +1 -0
- package/dist/ui/modules/index.d.ts +1 -0
- package/dist/ui/modules/index.js +1 -0
- package/dist/ui/modules/modals/general-settings/GeneralSettingsModal.svelte +110 -0
- package/dist/ui/modules/modals/general-settings/GeneralSettingsModal.svelte.d.ts +4 -0
- package/dist/ui/modules/modals/general-settings/LanguagePicker.svelte +48 -0
- package/dist/ui/modules/modals/general-settings/LanguagePicker.svelte.d.ts +3 -0
- package/dist/{template → ui/modules}/seaweed/ChumBucket.svelte +28 -28
- package/dist/ui/modules/seaweed/ChumBucket.svelte.d.ts +3 -0
- package/dist/ui/modules/seaweed/index.d.ts +3 -0
- package/dist/ui/modules/seaweed/index.js +4 -0
- package/dist/ui/templates/PinyaBase.svelte +45 -0
- package/dist/ui/templates/PinyaBase.svelte.d.ts +7 -0
- package/dist/ui/templates/confirmation-modal/component.svelte +47 -0
- package/dist/ui/templates/confirmation-modal/component.svelte.d.ts +4 -0
- package/dist/ui/templates/confirmation-modal/index.d.ts +2 -0
- package/dist/ui/templates/confirmation-modal/index.js +2 -0
- package/dist/ui/templates/confirmation-modal/props.d.ts +10 -0
- package/dist/ui/templates/confirmation-modal/props.js +1 -0
- package/dist/ui/templates/index.d.ts +3 -0
- package/dist/ui/templates/index.js +3 -0
- package/dist/ui/templates/pinya-page-layout/component.svelte +113 -0
- package/dist/ui/templates/pinya-page-layout/component.svelte.d.ts +8 -0
- package/dist/ui/templates/pinya-page-layout/index.d.ts +2 -0
- package/dist/ui/templates/pinya-page-layout/index.js +2 -0
- package/dist/ui/templates/pinya-page-layout/runes.svelte.d.ts +7 -0
- package/dist/ui/templates/pinya-page-layout/runes.svelte.js +3 -0
- package/package.json +36 -18
- package/src/lib/styles/app.css +53 -0
- package/src/lib/theme.css +114 -0
- package/dist/app.postcss +0 -212
- package/dist/components/SocialSection.svelte +0 -166
- package/dist/components/SocialSection.svelte.d.ts +0 -31
- package/dist/postcss.d.ts +0 -3
- package/dist/styles/DefaultGridContainer.css +0 -61
- package/dist/template/seaweed/ChumBucket.svelte.d.ts +0 -14
|
@@ -1,27 +1,52 @@
|
|
|
1
|
-
<script
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import NavigationControl from "./NavigationControl.svelte";
|
|
3
|
+
import { Card, createGoToFunction } from "../..";
|
|
4
|
+
import { parsePageMeta, type ParsePageMetaCompareFn } from "./PageMeta";
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
interface Props {
|
|
9
|
+
fileList: Record<string, unknown>;
|
|
10
|
+
jsonList: Record<string, unknown>;
|
|
11
|
+
title?: string | undefined;
|
|
12
|
+
imageMap?: any;
|
|
13
|
+
shouldAllowControl?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Should include a slash before and after the path
|
|
16
|
+
*/
|
|
17
|
+
parentSubpath: string;
|
|
18
|
+
allowUpperControl?: boolean;
|
|
19
|
+
compareFn?: undefined | ParsePageMetaCompareFn;
|
|
20
|
+
pageSize?: number;
|
|
21
|
+
currentIndex?: number;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
let {
|
|
25
|
+
fileList,
|
|
26
|
+
jsonList,
|
|
27
|
+
title = undefined,
|
|
28
|
+
imageMap = new Map<string, string>(),
|
|
29
|
+
shouldAllowControl = true,
|
|
30
|
+
parentSubpath,
|
|
31
|
+
allowUpperControl = true,
|
|
32
|
+
compareFn = undefined,
|
|
33
|
+
pageSize = $bindable(5),
|
|
34
|
+
currentIndex = $bindable(0)
|
|
35
|
+
}: Props = $props();
|
|
36
|
+
|
|
37
|
+
const pageFlatList = $state(parsePageMeta(fileList, jsonList, imageMap, compareFn));
|
|
38
|
+
|
|
39
|
+
let visiblePages = $derived(pageFlatList.slice(currentIndex * pageSize, (currentIndex * pageSize) + pageSize));
|
|
17
40
|
</script>
|
|
18
41
|
|
|
19
42
|
<div class="navigation-wrapper">
|
|
20
43
|
{#if (title)}
|
|
21
44
|
<Card>
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
45
|
+
{#snippet content()}
|
|
46
|
+
<h1 class="default-card navigation-title">
|
|
47
|
+
{title}
|
|
48
|
+
</h1>
|
|
49
|
+
{/snippet}
|
|
25
50
|
</Card>
|
|
26
51
|
{/if}
|
|
27
52
|
|
|
@@ -37,7 +62,7 @@ $:
|
|
|
37
62
|
{@const fullPath=`${parentSubpath}${pageMeta.relativeLink}`}
|
|
38
63
|
<button class="navigation-element"
|
|
39
64
|
title={fullPath}
|
|
40
|
-
|
|
65
|
+
onclick={createGoToFunction(fullPath)}>
|
|
41
66
|
{#if pageMeta.imageUrl}
|
|
42
67
|
<img src={pageMeta.imageUrl}
|
|
43
68
|
alt={pageMeta.imageAlt ?? "placeholder alt text please replace me or report me!"} />
|
|
@@ -60,7 +85,9 @@ $:
|
|
|
60
85
|
|
|
61
86
|
{#if visiblePages.length === 0}
|
|
62
87
|
<Card>
|
|
63
|
-
|
|
88
|
+
{#snippet content()}
|
|
89
|
+
<p class="default-card" >Sorry, no content was found</p>
|
|
90
|
+
{/snippet}
|
|
64
91
|
</Card>
|
|
65
92
|
{/if}
|
|
66
93
|
</div>
|
|
@@ -97,124 +124,9 @@ $:
|
|
|
97
124
|
}
|
|
98
125
|
}
|
|
99
126
|
|
|
100
|
-
.dark .navigation-element {
|
|
101
|
-
background-color: rgb(var(--color-surface-800));
|
|
102
|
-
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
|
103
|
-
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
|
|
104
|
-
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
|
|
105
|
-
--tw-ring-inset: inset;
|
|
106
|
-
--tw-ring-color: rgb(250 250 250 / 0.05);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.navigation-element:disabled {
|
|
110
|
-
cursor: not-allowed;
|
|
111
|
-
opacity: 0.5;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.navigation-element:disabled:hover {
|
|
115
|
-
--tw-brightness: brightness(1);
|
|
116
|
-
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.navigation-element:disabled:active {
|
|
120
|
-
--tw-scale-x: 1;
|
|
121
|
-
--tw-scale-y: 1;
|
|
122
|
-
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.navigation-element {
|
|
126
|
-
font-size: 1rem;
|
|
127
|
-
line-height: 1.5rem;
|
|
128
|
-
padding-left: 1.25rem;
|
|
129
|
-
padding-right: 1.25rem;
|
|
130
|
-
padding-top: 9px;
|
|
131
|
-
padding-bottom: 9px;
|
|
132
|
-
white-space: nowrap;
|
|
133
|
-
text-align: center;
|
|
134
|
-
display: inline-flex;
|
|
135
|
-
align-items: center;
|
|
136
|
-
justify-content: center;
|
|
137
|
-
transition-property: all;
|
|
138
|
-
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
139
|
-
transition-duration: 150ms;
|
|
140
|
-
border-radius: var(--theme-rounded-base);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
.navigation-element > :not([hidden]) ~ :not([hidden]) {
|
|
144
|
-
--tw-space-x-reverse: 0;
|
|
145
|
-
margin-right: calc(0.5rem * var(--tw-space-x-reverse));
|
|
146
|
-
margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.navigation-element:hover {
|
|
150
|
-
--tw-brightness: brightness(1.15);
|
|
151
|
-
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.navigation-element:active {
|
|
155
|
-
--tw-scale-x: 95%;
|
|
156
|
-
--tw-scale-y: 95%;
|
|
157
|
-
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
158
|
-
--tw-brightness: brightness(.9);
|
|
159
|
-
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
.navigation-element {
|
|
163
|
-
background-color: rgb(var(--color-surface-100));
|
|
164
|
-
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
|
165
|
-
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
|
|
166
|
-
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
|
|
167
|
-
--tw-ring-inset: inset;
|
|
168
|
-
--tw-ring-color: rgb(23 23 23 / 0.05);
|
|
169
|
-
border-radius: var(--theme-rounded-container);
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
.dark .navigation-element {
|
|
173
|
-
background-color: rgb(var(--color-surface-800));
|
|
174
|
-
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
|
175
|
-
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
|
|
176
|
-
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
|
|
177
|
-
--tw-ring-inset: inset;
|
|
178
|
-
--tw-ring-color: rgb(250 250 250 / 0.05);
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
a.navigation-element {
|
|
182
|
-
transition-property: all;
|
|
183
|
-
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
184
|
-
transition-duration: 150ms;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
a.navigation-element:hover {
|
|
188
|
-
--tw-brightness: brightness(1.05);
|
|
189
|
-
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
.navigation-element {
|
|
193
|
-
transition-property: all;
|
|
194
|
-
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
195
|
-
transition-duration: 150ms;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
.navigation-element:hover {
|
|
199
|
-
--tw-scale-x: 101%;
|
|
200
|
-
--tw-scale-y: 101%;
|
|
201
|
-
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
202
|
-
--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
|
|
203
|
-
--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);
|
|
204
|
-
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
.navigation-element {
|
|
208
|
-
--tw-bg-opacity: 1;
|
|
209
|
-
background-color: rgb(var(--color-surface-100) / var(--tw-bg-opacity));
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
:is(.dark .navigation-element) {
|
|
213
|
-
--tw-bg-opacity: 1;
|
|
214
|
-
background-color: rgb(var(--color-surface-900) / var(--tw-bg-opacity));
|
|
215
|
-
}
|
|
216
|
-
|
|
217
127
|
.navigation-element {
|
|
128
|
+
/* todo: migration */
|
|
129
|
+
/*@apply btn card card-hover bg-surface-100 dark:bg-surface-900;*/
|
|
218
130
|
container-type: inline-size;
|
|
219
131
|
display: flex;
|
|
220
132
|
text-align: start;
|
|
@@ -224,8 +136,7 @@ $:
|
|
|
224
136
|
|
|
225
137
|
img {
|
|
226
138
|
height: 20em;
|
|
227
|
-
|
|
228
|
-
object-fit: cover;
|
|
139
|
+
object-fit: cover;
|
|
229
140
|
padding: var(--theme-border-base);
|
|
230
141
|
border-radius: var(--theme-rounded-container) 0 0 var(--theme-rounded-container);
|
|
231
142
|
}
|
|
@@ -244,7 +155,7 @@ $:
|
|
|
244
155
|
|
|
245
156
|
.blurb-text {
|
|
246
157
|
padding: 2em;
|
|
247
|
-
|
|
158
|
+
grow: 1;
|
|
248
159
|
white-space: initial;
|
|
249
160
|
min-width: 0;
|
|
250
161
|
}
|
|
@@ -1,28 +1,19 @@
|
|
|
1
|
-
import { SvelteComponent } from "svelte";
|
|
2
1
|
import { type ParsePageMetaCompareFn } from "./PageMeta";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
};
|
|
18
|
-
events: {
|
|
19
|
-
[evt: string]: CustomEvent<any>;
|
|
20
|
-
};
|
|
21
|
-
slots: {};
|
|
22
|
-
};
|
|
23
|
-
export type NavigationComponentProps = typeof __propDef.props;
|
|
24
|
-
export type NavigationComponentEvents = typeof __propDef.events;
|
|
25
|
-
export type NavigationComponentSlots = typeof __propDef.slots;
|
|
26
|
-
export default class NavigationComponent extends SvelteComponent<NavigationComponentProps, NavigationComponentEvents, NavigationComponentSlots> {
|
|
2
|
+
interface Props {
|
|
3
|
+
fileList: Record<string, unknown>;
|
|
4
|
+
jsonList: Record<string, unknown>;
|
|
5
|
+
title?: string | undefined;
|
|
6
|
+
imageMap?: any;
|
|
7
|
+
shouldAllowControl?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Should include a slash before and after the path
|
|
10
|
+
*/
|
|
11
|
+
parentSubpath: string;
|
|
12
|
+
allowUpperControl?: boolean;
|
|
13
|
+
compareFn?: undefined | ParsePageMetaCompareFn;
|
|
14
|
+
pageSize?: number;
|
|
15
|
+
currentIndex?: number;
|
|
27
16
|
}
|
|
28
|
-
|
|
17
|
+
declare const NavigationComponent: import("svelte").Component<Props, {}, "currentIndex" | "pageSize">;
|
|
18
|
+
type NavigationComponent = ReturnType<typeof NavigationComponent>;
|
|
19
|
+
export default NavigationComponent;
|
|
@@ -1,44 +1,59 @@
|
|
|
1
|
-
<script
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { Card } from "../..";
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { onMount } from "svelte";
|
|
3
|
+
import { page } from "$app/state";
|
|
4
|
+
|
|
5
|
+
import { Card } from "../..";
|
|
6
|
+
import { goto } from "$app/navigation";
|
|
7
|
+
|
|
8
|
+
interface Props {
|
|
9
|
+
currentIndex?: number;
|
|
10
|
+
contentLength: number;
|
|
11
|
+
pageSize: number;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
let { currentIndex = $bindable(0), contentLength, pageSize = $bindable() }: Props = $props();
|
|
15
|
+
|
|
16
|
+
const queryIndex = page.url.searchParams.get("index");
|
|
17
|
+
if (queryIndex) {
|
|
18
|
+
currentIndex = parseInt(queryIndex) || 0;
|
|
19
|
+
}
|
|
20
|
+
const queryPageSize = page.url.searchParams.get("pageSize");
|
|
21
|
+
if (queryPageSize) {
|
|
22
|
+
pageSize = parseInt(queryPageSize) || 5;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const movePage = (isNext: boolean) => {
|
|
26
|
+
if (isNext) {
|
|
27
|
+
currentIndex = currentIndex + 1;
|
|
28
|
+
} else {
|
|
29
|
+
currentIndex = currentIndex - 1;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const query = new URLSearchParams(page.url.searchParams.toString());
|
|
33
|
+
query.set("index", currentIndex.toString());
|
|
34
|
+
goto(`?${query.toString()}`);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
onMount(() => {
|
|
38
|
+
const query = new URLSearchParams(page.url.searchParams.toString());
|
|
39
|
+
query.set("index", currentIndex.toString());
|
|
40
|
+
query.set("pageSize", pageSize.toString());
|
|
41
|
+
goto(`?${query.toString()}`);
|
|
42
|
+
});
|
|
32
43
|
</script>
|
|
33
44
|
|
|
34
45
|
<div class="navigation-control-container">
|
|
35
46
|
<button class="navigation-control-button"
|
|
36
47
|
disabled={currentIndex <= 0}
|
|
37
|
-
|
|
38
|
-
<Card marginBottom="0"
|
|
48
|
+
onclick={() => {movePage(false)}}>{"<"}</button>
|
|
49
|
+
<Card marginBottom="0">
|
|
50
|
+
{#snippet content()}
|
|
51
|
+
<p style="margin: 1em">Page {currentIndex + 1}</p>
|
|
52
|
+
{/snippet}
|
|
53
|
+
</Card>
|
|
39
54
|
<button class="navigation-control-button"
|
|
40
55
|
disabled={(currentIndex + 1) * pageSize >= contentLength}
|
|
41
|
-
|
|
56
|
+
onclick={() => {movePage(true)}}>{">"}</button>
|
|
42
57
|
</div>
|
|
43
58
|
|
|
44
59
|
<style>
|
|
@@ -48,74 +63,8 @@ onMount(() => {
|
|
|
48
63
|
margin: 1lh 0;
|
|
49
64
|
}
|
|
50
65
|
|
|
51
|
-
:is(.dark .navigation-control-button) {
|
|
52
|
-
--tw-bg-opacity: 1;
|
|
53
|
-
background-color: rgb(var(--color-secondary-500) / var(--tw-bg-opacity));
|
|
54
|
-
color: rgb(var(--on-secondary));
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.navigation-control-button:disabled {
|
|
58
|
-
cursor: not-allowed;
|
|
59
|
-
opacity: 0.5;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.navigation-control-button:disabled:hover {
|
|
63
|
-
--tw-brightness: brightness(1);
|
|
64
|
-
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.navigation-control-button:disabled:active {
|
|
68
|
-
--tw-scale-x: 1;
|
|
69
|
-
--tw-scale-y: 1;
|
|
70
|
-
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
71
|
-
}
|
|
72
|
-
|
|
73
66
|
.navigation-control-button {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
padding-right: 1.25rem;
|
|
78
|
-
padding-top: 9px;
|
|
79
|
-
padding-bottom: 9px;
|
|
80
|
-
white-space: nowrap;
|
|
81
|
-
text-align: center;
|
|
82
|
-
display: inline-flex;
|
|
83
|
-
align-items: center;
|
|
84
|
-
justify-content: center;
|
|
85
|
-
transition-property: all;
|
|
86
|
-
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
87
|
-
transition-duration: 150ms;
|
|
88
|
-
border-radius: var(--theme-rounded-base);
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.navigation-control-button > :not([hidden]) ~ :not([hidden]) {
|
|
92
|
-
--tw-space-x-reverse: 0;
|
|
93
|
-
margin-right: calc(0.5rem * var(--tw-space-x-reverse));
|
|
94
|
-
margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.navigation-control-button:hover {
|
|
98
|
-
--tw-brightness: brightness(1.15);
|
|
99
|
-
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.navigation-control-button:active {
|
|
103
|
-
--tw-scale-x: 95%;
|
|
104
|
-
--tw-scale-y: 95%;
|
|
105
|
-
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
106
|
-
--tw-brightness: brightness(.9);
|
|
107
|
-
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.navigation-control-button {
|
|
111
|
-
--tw-bg-opacity: 1;
|
|
112
|
-
background-color: rgb(var(--color-secondary-500) / var(--tw-bg-opacity));
|
|
113
|
-
color: rgb(var(--on-secondary));
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
:is(.dark .navigation-control-button) {
|
|
117
|
-
--tw-bg-opacity: 1;
|
|
118
|
-
background-color: rgb(var(--color-secondary-500) / var(--tw-bg-opacity));
|
|
119
|
-
color: rgb(var(--on-secondary));
|
|
120
|
-
}
|
|
67
|
+
/* todo: migration */
|
|
68
|
+
/*@apply btn preset-filled-secondary-500;*/
|
|
69
|
+
}
|
|
121
70
|
</style>
|
|
@@ -1,18 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
contentLength: number;
|
|
6
|
-
pageSize: number;
|
|
7
|
-
};
|
|
8
|
-
events: {
|
|
9
|
-
[evt: string]: CustomEvent<any>;
|
|
10
|
-
};
|
|
11
|
-
slots: {};
|
|
12
|
-
};
|
|
13
|
-
export type NavigationControlProps = typeof __propDef.props;
|
|
14
|
-
export type NavigationControlEvents = typeof __propDef.events;
|
|
15
|
-
export type NavigationControlSlots = typeof __propDef.slots;
|
|
16
|
-
export default class NavigationControl extends SvelteComponent<NavigationControlProps, NavigationControlEvents, NavigationControlSlots> {
|
|
1
|
+
interface Props {
|
|
2
|
+
currentIndex?: number;
|
|
3
|
+
contentLength: number;
|
|
4
|
+
pageSize: number;
|
|
17
5
|
}
|
|
18
|
-
|
|
6
|
+
declare const NavigationControl: import("svelte").Component<Props, {}, "currentIndex" | "pageSize">;
|
|
7
|
+
type NavigationControl = ReturnType<typeof NavigationControl>;
|
|
8
|
+
export default NavigationControl;
|
|
@@ -16,28 +16,43 @@ export const load = async (): Promise<OverridableMetaProps> => {
|
|
|
16
16
|
</code>
|
|
17
17
|
-->
|
|
18
18
|
|
|
19
|
-
<script
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
19
|
+
<script lang="ts">
|
|
20
|
+
import WebThumbnailImage from "../../assets/placeholder/placeholder_circle.png";
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
import { page } from "$app/stores";
|
|
24
|
+
import type { OverridableMetaProps } from "./OverridableMetaProps";
|
|
25
|
+
interface Props {
|
|
26
|
+
rootUrl?: string;
|
|
27
|
+
title?: string;
|
|
28
|
+
ogTitle?: string;
|
|
29
|
+
ogDescription?: string;
|
|
30
|
+
ogImage?: any;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
let {
|
|
34
|
+
rootUrl = "http://localhost:5173",
|
|
35
|
+
title = "Welcome to my portfolio",
|
|
36
|
+
ogTitle = "Turnip time!",
|
|
37
|
+
ogDescription = "Welcome to Turnip's test portfolio",
|
|
38
|
+
ogImage = WebThumbnailImage
|
|
39
|
+
}: Props = $props();
|
|
40
|
+
|
|
41
|
+
const data: OverridableMetaProps = $state({
|
|
42
|
+
title: "Welcome to my portfolio",
|
|
43
|
+
ogUrl: "https://www.crouton.net/",
|
|
44
|
+
ogTitle: "Turnip time!",
|
|
45
|
+
ogDescription: "Welcome to Turnip's test portfolio",
|
|
46
|
+
ogImage: WebThumbnailImage
|
|
47
|
+
});
|
|
48
|
+
page.subscribe(p => {
|
|
49
|
+
const pageData: OverridableMetaProps = p.data;
|
|
50
|
+
data.title = pageData.title ?? title;
|
|
51
|
+
data.ogUrl = `${rootUrl}${p.url.pathname}`;
|
|
52
|
+
data.ogTitle = pageData.ogTitle ?? ogTitle;
|
|
53
|
+
data.ogDescription = pageData.ogDescription ?? ogDescription;
|
|
54
|
+
data.ogImage = pageData.ogImage ?? ogImage;
|
|
55
|
+
});
|
|
41
56
|
</script>
|
|
42
57
|
|
|
43
58
|
<svelte:head>
|
|
@@ -1,20 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
ogDescription?: string | undefined;
|
|
8
|
-
ogImage?: any;
|
|
9
|
-
};
|
|
10
|
-
events: {
|
|
11
|
-
[evt: string]: CustomEvent<any>;
|
|
12
|
-
};
|
|
13
|
-
slots: {};
|
|
14
|
-
};
|
|
15
|
-
type OverridableMetaProps_ = typeof __propDef.props;
|
|
16
|
-
export { OverridableMetaProps_ as OverridableMetaProps };
|
|
17
|
-
export type OverridableMetaEvents = typeof __propDef.events;
|
|
18
|
-
export type OverridableMetaSlots = typeof __propDef.slots;
|
|
19
|
-
export default class OverridableMeta extends SvelteComponent<OverridableMetaProps_, OverridableMetaEvents, OverridableMetaSlots> {
|
|
1
|
+
interface Props {
|
|
2
|
+
rootUrl?: string;
|
|
3
|
+
title?: string;
|
|
4
|
+
ogTitle?: string;
|
|
5
|
+
ogDescription?: string;
|
|
6
|
+
ogImage?: any;
|
|
20
7
|
}
|
|
8
|
+
declare const OverridableMeta: import("svelte").Component<Props, {}, "">;
|
|
9
|
+
type OverridableMeta = ReturnType<typeof OverridableMeta>;
|
|
10
|
+
export default OverridableMeta;
|