@turnipxenon/pineapple 2.4.55 → 2.4.57
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/.idea/modules.xml +0 -1
- package/.idea/workspace.xml +81 -74
- package/.svelte-kit/__package__/app.postcss +4 -1
- package/.svelte-kit/__package__/assets/icons/arrow-upward.svg +1 -0
- package/.svelte-kit/__package__/components/Card.svelte +24 -3
- package/.svelte-kit/__package__/components/Card.svelte.d.ts +1 -0
- package/.svelte-kit/__package__/components/PineappleSlideToggle.svelte +10 -0
- package/.svelte-kit/__package__/components/PineappleSlideToggle.svelte.d.ts +19 -0
- package/.svelte-kit/__package__/components/combo_box/ComboBoxWithButton.svelte +7 -0
- package/.svelte-kit/__package__/components/pineapple/toast/Toast.svelte +4 -2
- package/.svelte-kit/__package__/template/seaweed/CreateUrlForm.svelte +15 -3
- package/.svelte-kit/__package__/template/seaweed/SeaweedTemplate.svelte +11 -7
- package/.svelte-kit/__package__/template/seaweed/SeaweedTemplateData.d.ts +7 -3
- package/.svelte-kit/__package__/template/seaweed/SeaweedTemplateData.js +16 -2
- package/.svelte-kit/__package__/template/seaweed/entries/ThisWebpage.svelte +2 -0
- package/.svelte-kit/__package__/template/seaweed/entry_order_config/EntryOrderConfig.svelte +224 -47
- package/.svelte-kit/__package__/template/seaweed/entry_order_config/EntryOrderConfig.svelte.d.ts +1 -0
- package/.svelte-kit/__package__/template/seaweed/entry_order_config/entry-order-config.postcss +35 -0
- package/.svelte-kit/generated/server/internal.js +1 -1
- package/dist/app.postcss +4 -1
- package/dist/assets/icons/arrow-upward.svg +1 -0
- package/dist/components/Card.svelte +24 -3
- package/dist/components/Card.svelte.d.ts +1 -0
- package/dist/components/PineappleSlideToggle.svelte +10 -0
- package/dist/components/PineappleSlideToggle.svelte.d.ts +19 -0
- package/dist/components/combo_box/ComboBoxWithButton.svelte +7 -0
- package/dist/components/pineapple/toast/Toast.svelte +4 -2
- package/dist/template/seaweed/CreateUrlForm.svelte +15 -3
- package/dist/template/seaweed/SeaweedTemplate.svelte +11 -7
- package/dist/template/seaweed/SeaweedTemplateData.d.ts +7 -3
- package/dist/template/seaweed/SeaweedTemplateData.js +16 -2
- package/dist/template/seaweed/entries/ThisWebpage.svelte +2 -0
- package/dist/template/seaweed/entry_order_config/EntryOrderConfig.svelte +224 -47
- package/dist/template/seaweed/entry_order_config/EntryOrderConfig.svelte.d.ts +1 -0
- package/dist/template/seaweed/entry_order_config/entry-order-config.postcss +35 -0
- package/package.json +2 -2
- package/src/lib/app.postcss +4 -1
- package/src/lib/assets/icons/arrow-upward.svg +1 -0
- package/src/lib/components/Card.svelte +17 -2
- package/src/lib/components/PineappleSlideToggle.svelte +12 -0
- package/src/lib/components/combo_box/ComboBoxWithButton.svelte +7 -0
- package/src/lib/components/pineapple/toast/Toast.svelte +4 -2
- package/src/lib/template/seaweed/CreateUrlForm.svelte +15 -3
- package/src/lib/template/seaweed/SeaweedTemplate.svelte +11 -7
- package/src/lib/template/seaweed/SeaweedTemplateData.ts +23 -4
- package/src/lib/template/seaweed/entries/ThisWebpage.svelte +2 -0
- package/src/lib/template/seaweed/entry_order_config/EntryOrderConfig.svelte +115 -28
- package/src/lib/template/seaweed/entry_order_config/entry-order-config.postcss +35 -0
- package/src/routes/(pineapple)/pineapple/(pineapple)/+page.svelte +4 -3
- package/src/routes/(seaweed)/portfolio/actual/+page.svelte +1 -2
- package/src/routes/(seaweed)/portfolio/actual/RandomComponent.svelte +0 -7
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
import type { EntryProps } from "$pkg/template/seaweed/entries/EntryProps";
|
|
21
21
|
import { parseQueryTerms } from "$pkg/template/seaweed/ParseQueryTerms";
|
|
22
22
|
import UrlShortenerForm from "$pkg/template/seaweed/CreateUrlForm.svelte";
|
|
23
|
+
import PineappleSlideToggle from "$pkg/components/PineappleSlideToggle.svelte";
|
|
23
24
|
|
|
24
25
|
export let letChaos = true;
|
|
25
26
|
export let name = "Turnip";
|
|
@@ -371,7 +372,7 @@
|
|
|
371
372
|
|
|
372
373
|
<section class={group.gridClass}>
|
|
373
374
|
{#each group.items as entry}
|
|
374
|
-
<svelte:component this={entry} props={entryProps}></svelte:component>
|
|
375
|
+
<svelte:component this={entry.component} props={entryProps}></svelte:component>
|
|
375
376
|
{/each}
|
|
376
377
|
</section>
|
|
377
378
|
{/if}
|
|
@@ -385,18 +386,21 @@
|
|
|
385
386
|
<h1>Advanced settings</h1>
|
|
386
387
|
<p>This one is for those curious how I customize this page.</p>
|
|
387
388
|
|
|
388
|
-
<
|
|
389
|
+
<PineappleSlideToggle name="advanced-setting-slider"
|
|
390
|
+
bind:checked={isAdvanceSettingOn}>
|
|
389
391
|
Advanced settings: {isAdvanceSettingOn ? "On" : "Off"}
|
|
390
|
-
</
|
|
392
|
+
</PineappleSlideToggle>
|
|
391
393
|
|
|
392
394
|
{#if (isAdvanceSettingOn)}
|
|
393
|
-
<
|
|
395
|
+
<PineappleSlideToggle name="game-section-slider"
|
|
396
|
+
bind:checked={seaweedTemplateData.gameSectionFirst}>
|
|
394
397
|
Should game section appear first over projects: {seaweedTemplateData.gameSectionFirst ? "On" : "Off"}
|
|
395
|
-
</
|
|
398
|
+
</PineappleSlideToggle>
|
|
396
399
|
<p>Note: the above configuration was made before the dynamic entry list and to support links sent with that params, we will act like it only swaps the two groups, and nothing more dynamic if order query param does not exist. The configuration only happens during page load with query param, and it does not apply when changed here.</p>
|
|
397
|
-
<
|
|
400
|
+
<PineappleSlideToggle name="fun-note-slider"
|
|
401
|
+
bind:checked={seaweedTemplateData.shouldAddFunNote}>
|
|
398
402
|
Should add fun note in description: {seaweedTemplateData.shouldAddFunNote ? "On" : "Off"}
|
|
399
|
-
</
|
|
403
|
+
</PineappleSlideToggle>
|
|
400
404
|
|
|
401
405
|
<h3>Query terms to bold</h3>
|
|
402
406
|
<div class="query-term-grid">
|
|
@@ -19,21 +19,40 @@ export enum GroupGridClass {
|
|
|
19
19
|
Projects = "projects-section"
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
export interface ComponentMeta {
|
|
23
|
+
name: string;
|
|
24
|
+
component: ComponentType;
|
|
25
|
+
}
|
|
26
|
+
|
|
22
27
|
export interface EntryGroup {
|
|
23
28
|
name: string;
|
|
24
|
-
items:
|
|
29
|
+
items: ComponentMeta[];
|
|
25
30
|
gridClass: string;
|
|
26
31
|
}
|
|
27
32
|
|
|
28
33
|
export const GameEntries: Readonly<EntryGroup> = {
|
|
29
34
|
name: DefaultHeader.Games.toString(),
|
|
30
|
-
items: [
|
|
35
|
+
items: [
|
|
36
|
+
{ name: "Pengi", component: Pengi },
|
|
37
|
+
{ name: "Hepcat", component: Hepcat },
|
|
38
|
+
{ name: "Chef Wings", component: ChefWings },
|
|
39
|
+
{ name: "Soulwork", component: Soulwork },
|
|
40
|
+
{ name: "Itch Promo", component: ItchPromo }
|
|
41
|
+
],
|
|
31
42
|
gridClass: GroupGridClass.Games.toString()
|
|
32
43
|
};
|
|
33
44
|
|
|
34
45
|
export const ProjectEntries: Readonly<EntryGroup> = {
|
|
35
46
|
name: DefaultHeader.Projects.toString(),
|
|
36
|
-
items: [
|
|
47
|
+
items: [
|
|
48
|
+
{ name: "Migrante Alberta", component: MigranteAlberta },
|
|
49
|
+
{ name: "Decentralized Social Media", component: DecentralizedSocialMedia },
|
|
50
|
+
{ name: "Customized YarnSpinner", component: CustomizedYarnspinner },
|
|
51
|
+
{ name: "Full Stack C", component: FullStackC },
|
|
52
|
+
{ name: "Workset", component: Workset },
|
|
53
|
+
{ name: "This Webpage", component: ThisWebpage },
|
|
54
|
+
{ name: "Mock Uber App", component: MockUberApp }
|
|
55
|
+
],
|
|
37
56
|
gridClass: GroupGridClass.Projects.toString()
|
|
38
57
|
};
|
|
39
58
|
|
|
@@ -55,7 +74,7 @@ export const AllGroupedEntriesProjectFirst: ReadonlyArray<EntryGroup> = [
|
|
|
55
74
|
GameEntries
|
|
56
75
|
];
|
|
57
76
|
|
|
58
|
-
const allFlatEntries
|
|
77
|
+
const allFlatEntries = new Map<string, ComponentMeta>();
|
|
59
78
|
|
|
60
79
|
export const lazyInitializeAllFlatEntries = () => {
|
|
61
80
|
if (allFlatEntries.size === 0) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import {
|
|
3
|
+
type ComponentMeta,
|
|
3
4
|
type EntryGroup,
|
|
4
5
|
GetAllEntryFromGlobal,
|
|
5
6
|
GetEntryFromGlobal,
|
|
@@ -9,6 +10,9 @@
|
|
|
9
10
|
import type { ComponentType } from "svelte";
|
|
10
11
|
import { removeProxyWrapperOnString } from "./EntryOrderConfig";
|
|
11
12
|
import ComboBoxWithButton from "$pkg/components/combo_box/ComboBoxWithButton.svelte";
|
|
13
|
+
import CloseIcon from "$pkg/assets/icons/close.svg";
|
|
14
|
+
import UpwardIcon from "$pkg/assets/icons/arrow-upward.svg";
|
|
15
|
+
import "./entry-order-config.postcss";
|
|
12
16
|
|
|
13
17
|
export let seaweedEntries: EntryGroup[];
|
|
14
18
|
export let orderUrl: string;
|
|
@@ -27,7 +31,6 @@
|
|
|
27
31
|
const addEntry = (group: EntryGroup): ((selected: string) => void) => {
|
|
28
32
|
return (selected: string) => {
|
|
29
33
|
const c = GetEntryFromGlobal(selected);
|
|
30
|
-
console.log(selected, c);
|
|
31
34
|
if (c) {
|
|
32
35
|
group.items.push(c);
|
|
33
36
|
seaweedEntries = seaweedEntries;
|
|
@@ -45,7 +48,6 @@
|
|
|
45
48
|
} else {
|
|
46
49
|
return;
|
|
47
50
|
}
|
|
48
|
-
console.log(index, newIndex);
|
|
49
51
|
|
|
50
52
|
const tempVar = group.items[newIndex];
|
|
51
53
|
group.items[newIndex] = group.items[index];
|
|
@@ -97,12 +99,10 @@
|
|
|
97
99
|
updateOrderQuery();
|
|
98
100
|
};
|
|
99
101
|
};
|
|
100
|
-
const removeEntry = (entry:
|
|
102
|
+
const removeEntry = (entry: ComponentMeta, group: EntryGroup): (() => void) => {
|
|
101
103
|
return () => {
|
|
102
|
-
console.log("Clicked!");
|
|
103
104
|
for (let i = group.items.length - 1; i >= 0; i--) {
|
|
104
105
|
if (group.items[i].name === entry.name) {
|
|
105
|
-
console.log("Reduce");
|
|
106
106
|
group.items.splice(i, 1);
|
|
107
107
|
seaweedEntries = seaweedEntries;
|
|
108
108
|
updateOrderQuery();
|
|
@@ -113,10 +113,10 @@
|
|
|
113
113
|
};
|
|
114
114
|
|
|
115
115
|
const allDefaultEntries = Array.from(GetAllEntryFromGlobal().keys());
|
|
116
|
-
console.log("Test", Array.from(GetAllEntryFromGlobal().keys()));
|
|
117
116
|
</script>
|
|
118
117
|
|
|
119
|
-
<
|
|
118
|
+
<br>
|
|
119
|
+
<h2>Site ordering</h2>
|
|
120
120
|
<blockquote>Sorry! This part of the website is still WIP, but here it is anyway. As long as it functions</blockquote>
|
|
121
121
|
|
|
122
122
|
<!-- formatting: group1:entry1|entry2,group2:entry3
|
|
@@ -125,30 +125,75 @@
|
|
|
125
125
|
, <= separates each group
|
|
126
126
|
-->
|
|
127
127
|
<div class="advanced-setting-list">
|
|
128
|
-
<!-- todo: we might have to extract this into it's own component -->
|
|
129
|
-
<!-- todo: NOW!!! -->
|
|
130
128
|
{#each seaweedEntries as group, groupIndex}
|
|
131
|
-
<div>
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
129
|
+
<div class="entry-group card">
|
|
130
|
+
|
|
131
|
+
<div class="btn-group-header">
|
|
132
|
+
<button title={`Remove ${group.name}`}
|
|
133
|
+
on:click={removeGroup(group)}>
|
|
134
|
+
<img class="img-icon" src={CloseIcon} alt={`Remove ${group.name}`}>
|
|
135
|
+
</button>
|
|
136
|
+
|
|
137
|
+
<button title={`Move group ${group.name} upwards`}
|
|
138
|
+
on:click={swapGroups(groupIndex, true)}
|
|
139
|
+
disabled="{groupIndex === 0}">
|
|
140
|
+
<img class="img-icon" src={UpwardIcon} alt={`Move group ${group.name} upwards`}>
|
|
141
|
+
</button>
|
|
142
|
+
|
|
143
|
+
<button title={`Move group ${group.name} downwards`}
|
|
144
|
+
disabled={groupIndex === seaweedEntries.length - 1}
|
|
145
|
+
on:click={swapGroups(groupIndex, false)}>
|
|
146
|
+
<img class="img-icon flipped-vertically" src={UpwardIcon} alt={`Move group ${group.name} downwards`}>
|
|
147
|
+
</button>
|
|
148
|
+
|
|
149
|
+
<h2>{group.name}</h2>
|
|
138
150
|
</div>
|
|
139
|
-
|
|
151
|
+
|
|
152
|
+
<table class="advanced-setting-list table">
|
|
153
|
+
<thead>
|
|
154
|
+
<tr>
|
|
155
|
+
<th>Entries</th>
|
|
156
|
+
</tr>
|
|
157
|
+
</thead>
|
|
158
|
+
<tbody>
|
|
140
159
|
{#each group.items as entry, entryIndex}
|
|
141
|
-
<
|
|
142
|
-
<
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
160
|
+
<tr class="entry-row">
|
|
161
|
+
<td class="btn-group-entry">
|
|
162
|
+
|
|
163
|
+
<button title={`Remove ${entry.name}`}
|
|
164
|
+
on:click={removeEntry(entry, group)}>
|
|
165
|
+
<img class="img-icon" src={CloseIcon} alt={`Remove ${entry.name}`}>
|
|
166
|
+
</button>
|
|
167
|
+
|
|
168
|
+
<button title={`Move ${entry.name} upwards`}
|
|
169
|
+
on:click={swapEntry(entryIndex, group, true)}
|
|
170
|
+
disabled="{entryIndex === 0}">
|
|
171
|
+
<img class="img-icon" src={UpwardIcon} alt={`Move ${entry.name} upwards`}>
|
|
172
|
+
</button>
|
|
173
|
+
|
|
174
|
+
<button title={`Move ${entry.name} downwards`}
|
|
175
|
+
disabled={entryIndex === group.items.length - 1}
|
|
176
|
+
on:click={swapEntry(entryIndex, group, false)}>
|
|
177
|
+
<img class="img-icon flipped-vertically" src={UpwardIcon} alt={`Move ${entry.name} downwards`}>
|
|
178
|
+
</button>
|
|
179
|
+
<div class="entry-name">
|
|
180
|
+
{entry.name}
|
|
181
|
+
</div>
|
|
182
|
+
</td>
|
|
183
|
+
</tr>
|
|
147
184
|
{/each}
|
|
148
|
-
|
|
185
|
+
</tbody>
|
|
186
|
+
|
|
187
|
+
<tfoot>
|
|
188
|
+
<tr>
|
|
189
|
+
<td>
|
|
190
|
+
<ComboBoxWithButton stringItems={allDefaultEntries}
|
|
191
|
+
onClick={addEntry(group)}></ComboBoxWithButton>
|
|
192
|
+
</td>
|
|
193
|
+
</tr>
|
|
194
|
+
</tfoot>
|
|
195
|
+
</table>
|
|
149
196
|
|
|
150
|
-
<ComboBoxWithButton stringItems={allDefaultEntries}
|
|
151
|
-
onClick={addEntry(group)}></ComboBoxWithButton>
|
|
152
197
|
|
|
153
198
|
</div>
|
|
154
199
|
{/each}
|
|
@@ -160,7 +205,49 @@
|
|
|
160
205
|
flex-direction: column;
|
|
161
206
|
}
|
|
162
207
|
|
|
163
|
-
.
|
|
164
|
-
@apply btn variant-filled-
|
|
208
|
+
.btn-group-header {
|
|
209
|
+
@apply btn-group variant-filled-tertiary;
|
|
210
|
+
display: flex;
|
|
211
|
+
align-items: center;
|
|
212
|
+
margin-bottom: 0.5lh;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.btn-group-entry {
|
|
216
|
+
@apply btn-group;
|
|
217
|
+
display: flex;
|
|
218
|
+
padding: 0;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.btn-group-entry > div {
|
|
222
|
+
padding: 1em;
|
|
165
223
|
}
|
|
224
|
+
|
|
225
|
+
.flipped-vertically {
|
|
226
|
+
transform: rotate(180deg);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.entry-group {
|
|
230
|
+
background-color: rgb(var(--color-surface-600));
|
|
231
|
+
margin-top: 1.5lh;
|
|
232
|
+
margin-bottom: 0.5lh;
|
|
233
|
+
padding: 0.5lh 0.5em;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.entry-row {
|
|
237
|
+
display: flex;
|
|
238
|
+
align-items: center;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.entry-name {
|
|
242
|
+
flex-grow: 1;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
tr, td, th {
|
|
246
|
+
width: 100%;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
tfoot > tr {
|
|
250
|
+
display: flex;
|
|
251
|
+
}
|
|
252
|
+
|
|
166
253
|
</style>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
.btn-group > button {
|
|
2
|
+
padding: 0.3em 0.75em;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.btn-group-header > h2 {
|
|
6
|
+
font-weight: bolder;
|
|
7
|
+
padding-top: 1lh;
|
|
8
|
+
padding-bottom: 1lh;
|
|
9
|
+
margin-bottom: 0;
|
|
10
|
+
padding-inline-start: 1em;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.dark .btn-group-header > h2 {
|
|
14
|
+
color: rgb(var(--theme-font-color-dark));
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.dark .entry-group {
|
|
18
|
+
background-color: rgb(var(--color-surface-800));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
tbody tr:nth-child(odd) {
|
|
22
|
+
background-color: rgb(var(--color-surface-500));
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.dark tbody tr:nth-child(odd) {
|
|
26
|
+
background-color: rgb(var(--color-surface-900));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
tbody tr:nth-child(even) {
|
|
30
|
+
background-color: rgb(var(--color-surface-200));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.dark tbody tr:nth-child(even) {
|
|
34
|
+
background-color: rgb(var(--color-surface-800));
|
|
35
|
+
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { Card, dialogManager, enableDialogueOverlay } from "$pkg";
|
|
6
6
|
import NavigationComponent from "$pkg/components/navigation_component/NavigationComponent.svelte";
|
|
7
7
|
import { ImageMap } from "./ImageMap";
|
|
8
|
-
import
|
|
8
|
+
import PineappleSlideToggle from "$pkg/components/PineappleSlideToggle.svelte";
|
|
9
9
|
|
|
10
10
|
enableDialogueOverlay.set(false);
|
|
11
11
|
|
|
@@ -55,9 +55,10 @@
|
|
|
55
55
|
class="btn variant-filled-secondary"
|
|
56
56
|
on:click={onTestDialogClick}><h3>Test dialog</h3></button>
|
|
57
57
|
<div>
|
|
58
|
-
<
|
|
58
|
+
<PineappleSlideToggle name="advanced-setting-slider"
|
|
59
|
+
bind:checked={allowPagination}>
|
|
59
60
|
Allow pagination: {allowPagination ? "On" : "Off"}
|
|
60
|
-
</
|
|
61
|
+
</PineappleSlideToggle>
|
|
61
62
|
</div>
|
|
62
63
|
</div>
|
|
63
64
|
</Card>
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import SeaweedTemplate from "$pkg/template/seaweed/SeaweedTemplate.svelte";
|
|
3
|
-
import RandomComponent from "./RandomComponent.svelte";
|
|
4
3
|
</script>
|
|
5
4
|
|
|
6
5
|
<SeaweedTemplate letChaos={false}
|
|
7
6
|
name="Allan Manuba"
|
|
8
7
|
email="allanmanuba@gmail.com"
|
|
9
8
|
linkedinSlug="allan-manuba"
|
|
10
|
-
serverSideQueryParams="order=Games:Hepcat|
|
|
9
|
+
serverSideQueryParams="order=Relevant projects::games-section,Games:Pengi|Chef Wings|Hepcat|Itch Promo|Soulwork|Full Stack C:games-section,Projects:Migrante Alberta|Customized YarnSpinner|Decentralized Social Media|Workset|This Webpage:projects-section"
|
|
11
10
|
>
|
|
12
11
|
|
|
13
12
|
</SeaweedTemplate>
|