@turnipxenon/pineapple 2.4.76 → 2.4.78

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.
Files changed (40) hide show
  1. package/.idea/workspace.xml +38 -31
  2. package/.svelte-kit/__package__/components/BlogTemplate.svelte +41 -0
  3. package/.svelte-kit/__package__/components/BlogTemplate.svelte.d.ts +19 -0
  4. package/.svelte-kit/__package__/components/index.d.ts +1 -0
  5. package/.svelte-kit/__package__/components/index.js +1 -0
  6. package/.svelte-kit/__package__/components/navigation_component/PageMeta.d.ts +37 -0
  7. package/.svelte-kit/__package__/components/overrideable_meta/OverridableMetaProps.d.ts +2 -0
  8. package/.svelte-kit/__package__/template/seaweed/SeaweedTemplate.svelte +3 -0
  9. package/.svelte-kit/__package__/template/seaweed/SeaweedTemplate.svelte.d.ts +1 -0
  10. package/.svelte-kit/__package__/template/seaweed/entries/WorkExperience.svelte +105 -105
  11. package/.svelte-kit/__package__/template/seaweed/entry_order_config/EntryOrderConfig.svelte +4 -4
  12. package/.svelte-kit/__package__/template/seaweed/entry_order_config/EntryOrderConfig.svelte.d.ts +3 -1
  13. package/.svelte-kit/ambient.d.ts +4 -0
  14. package/.svelte-kit/generated/server/internal.js +1 -1
  15. package/dist/components/BlogTemplate.svelte +41 -0
  16. package/dist/components/BlogTemplate.svelte.d.ts +19 -0
  17. package/dist/components/index.d.ts +1 -0
  18. package/dist/components/index.js +1 -0
  19. package/dist/components/navigation_component/PageMeta.d.ts +37 -0
  20. package/dist/components/overrideable_meta/OverridableMetaProps.d.ts +2 -0
  21. package/dist/template/seaweed/SeaweedTemplate.svelte +3 -0
  22. package/dist/template/seaweed/SeaweedTemplate.svelte.d.ts +1 -0
  23. package/dist/template/seaweed/entries/WorkExperience.svelte +105 -105
  24. package/dist/template/seaweed/entry_order_config/EntryOrderConfig.svelte +4 -4
  25. package/dist/template/seaweed/entry_order_config/EntryOrderConfig.svelte.d.ts +3 -1
  26. package/package.json +1 -1
  27. package/src/lib/components/BlogTemplate.svelte +44 -0
  28. package/src/lib/components/index.ts +9 -8
  29. package/src/lib/components/navigation_component/PageMeta.ts +43 -0
  30. package/src/lib/components/overrideable_meta/OverridableMetaProps.ts +2 -0
  31. package/src/lib/template/seaweed/SeaweedTemplate.svelte +3 -0
  32. package/src/lib/template/seaweed/entries/WorkExperience.svelte +115 -115
  33. package/src/lib/template/seaweed/entry_order_config/EntryOrderConfig.svelte +5 -5
  34. package/src/lib/template/seaweed/index.ts +4 -4
  35. package/src/routes/(pineapple)/pineapple/(extra-pages)/page1/+page.svelte +6 -5
  36. package/src/routes/(pineapple)/pineapple/(extra-pages)/page2/+page.svelte +6 -5
  37. package/src/routes/(pineapple)/pineapple/(extra-pages)/page3/page5/+page.svelte +6 -5
  38. package/src/routes/(seaweed)/portfolio/+page.svelte +2 -0
  39. package/vite.config.ts +1 -1
  40. package/docs/Workflow.md +0 -5
@@ -40,6 +40,43 @@ export interface PageMeta {
40
40
  */
41
41
  title: string;
42
42
  }
43
+ export interface SimplePageMeta {
44
+ datePublished?: string;
45
+ description?: string;
46
+ imageAlt?: string;
47
+ /**
48
+ * imageID is an ID that NavigationComponent can use to identify imported images
49
+ *
50
+ * To use imageID:
51
+ * 1. Add the imageID entry to the meta.json for the page
52
+ * 2. Create a typescript file with the variable ImageMap: Map<string, string>
53
+ * 3. Add a new entry with your imageID as key, and the image url as the value. Since this is
54
+ * Typescript, you can use import ImageUrl from "./path.png" as you would normally do.N
55
+ * 4. Add ImageMap as an argument to your NavigationComponent.
56
+ * Overall, this involves four files
57
+ * - Your navigation page: ./+page.svelte
58
+ * - Your image map typescript: ImageMap.ts
59
+ * - The page you want with an image represented in the navigation: ./topic1/+page.svelte
60
+ * - The meta for that page: ./topic1/meta.json
61
+ *
62
+ * imageID takes precedence over imageURL
63
+ */
64
+ imageID?: string;
65
+ /**
66
+ * imageURL is only limited to absolute paths (includes files in static folder)
67
+ *
68
+ * if imageID is defined, this will be ignored
69
+ */
70
+ imageUrl?: string;
71
+ lastUpdated?: string;
72
+ shouldGroup?: boolean;
73
+ shouldHide?: boolean;
74
+ tags: string[];
75
+ /**
76
+ * title defaults to the directory name if it's an empty string.
77
+ */
78
+ title: string;
79
+ }
43
80
  /**
44
81
  * todo: doc
45
82
  * @param parentList
@@ -4,4 +4,6 @@ export interface OverridableMetaProps {
4
4
  ogTitle?: string;
5
5
  ogDescription?: string;
6
6
  ogImage?: string;
7
+ datePublished?: string;
8
+ lastUpdated?: string;
7
9
  }
@@ -17,6 +17,7 @@ import { Chip } from "../../index";
17
17
  import ChumBucket from "./ChumBucket.svelte";
18
18
  export let seaweedTemplateData;
19
19
  export let projectFirstGroupedEntries;
20
+ export let getAllEntryFromGlobal;
20
21
  export let getEntryFromGlobal;
21
22
  export let letChaos = true;
22
23
  export let name = "Turnip";
@@ -244,6 +245,8 @@ $:
244
245
  <EntryOrderConfig bind:seaweedEntries={seaweedTemplateData.groupedEntries}
245
246
  seaweedTemplateData={seaweedTemplateData}
246
247
  bind:orderUrl={orderUrl}
248
+ getAllEntryFromGlobal={getAllEntryFromGlobal}
249
+ getEntryFromGlobal={getEntryFromGlobal}
247
250
  updateUrl={updateUrl}></EntryOrderConfig>
248
251
 
249
252
  <br>
@@ -6,6 +6,7 @@ declare const __propDef: {
6
6
  props: {
7
7
  seaweedTemplateData: SeaweedTemplateData;
8
8
  projectFirstGroupedEntries: ReadonlyArray<EntryGroup>;
9
+ getAllEntryFromGlobal: () => Map<string, ComponentMeta>;
9
10
  getEntryFromGlobal: (name: string) => undefined | ComponentMeta;
10
11
  letChaos?: boolean | undefined;
11
12
  name?: string | undefined;
@@ -5,109 +5,109 @@ import ElementVisibilityDetector from "../../../components/ElementVisbilityDetec
5
5
  export let entryProps;
6
6
  export let isVisible;
7
7
  let { email, letChaos, linkedinSlug, name } = entryProps;
8
- </script>
9
-
10
- <div class="experience-and-about-div">
11
-
12
- <div class="greater-about-div">
13
-
14
- <Card includeDataNoSnippet={false}>
15
- <section class="section-card" slot="content">
16
-
17
- <h1>About</h1>
18
-
19
- <p>
20
- Hi! My name is {name}! I work as a software developer. Outside of that, I like making games, and
21
- trying to do everything in between required to make one. I have some showcased below, our visit
22
- my itch.io page for more of them.
23
- </p>
24
- <!-- todo: link the degree details idk -->
25
- <p>
26
- I also graduated with BS Computing Science, Specializing in Software Practice, and a
27
- certificate in Computer Game Development at University of Alberta.
28
- </p>
29
- {#if entryProps.seaweedTemplateData.shouldAddFunNote}
30
- <p>
31
- I'm inspired by games like Harvest Moon: Friends of Mineral Town, Rune Factory 4, Theatrhythm,
32
- Bravely Default: Flying Fairy, Boku no Natsuyasumi 2, and A Short Hike.
33
- </p>
34
- {/if}
35
-
36
- <!-- todo: maybe put cute stuff here -->
37
- <!-- </ToggleableContent>-->
38
- </section>
39
- </Card>
40
-
41
- <Card>
42
- <section class="section-card" slot="content">
43
- <SocialSection email={email} linkedinSlug={linkedinSlug}></SocialSection>
44
- <ElementVisibilityDetector bind:isVisible={isVisible}>
45
- </ElementVisibilityDetector>
46
- </section>
47
- </Card>
48
-
49
- </div>
50
-
51
- <Card>
52
- <section class="section-card" slot="content">
53
- <h1>Experience</h1>
54
-
55
- <h2>Highlight</h2>
56
- <p>I like French Fries</p>
57
-
58
- <h2>Software Engineer</h2>
59
- <div class="two-column-separated">
60
- <div>July 2023 – January 2024</div>
61
- <div style="text-align: end">Control, Remote</div>
62
- </div>
63
- <ul>
64
- <li>
65
- Developed things
66
- </li>
67
- <li>
68
- Woah
69
- </li>
70
- </ul>
71
- <br>
72
-
73
- <h2>Software Engineer Intern</h2>
74
- <div class="two-column-separated">
75
- <div>May 2022 – Aug 2022</div>
76
- <div style="text-align: end">Pou Company</div>
77
- </div>
78
- <ul>
79
- <li>
80
- Stuff
81
- </li>
82
- <li>
83
- Golang
84
- </li>
85
- </ul>
86
- <br>
87
- <!-- todo: turn off flashing when accordion is expanded -->
88
- <Accordion>
89
- <AccordionItem>
90
- <div slot="summary">
91
- <h2 class="accordion-header">More experience</h2>
92
- </div>
93
- <svelte:fragment slot="content">
94
- <section class="more-section">
95
- <h2>Software Engineer Intern</h2>
96
- <div class="two-column-separated">
97
- <div>May 2021 – Dec 2021</div>
98
- <div style="text-align: end">Testing</div>
99
- </div>
100
- <ul>
101
- <li>
102
- Amazing
103
- </li>
104
- </ul>
105
- <br>
106
- </section>
107
- </svelte:fragment>
108
- </AccordionItem>
109
- </Accordion>
110
- </section>
111
- </Card>
112
-
8
+ </script>
9
+
10
+ <div class="experience-and-about-div">
11
+
12
+ <div class="greater-about-div">
13
+
14
+ <Card includeDataNoSnippet={false}>
15
+ <section class="section-card" slot="content">
16
+
17
+ <h1>About</h1>
18
+
19
+ <p>
20
+ Hi! My name is {name}! I work as a software developer. Outside of that, I like making games, and
21
+ trying to do everything in between required to make one. I have some showcased below, our visit
22
+ my itch.io page for more of them.
23
+ </p>
24
+ <!-- todo: link the degree details idk -->
25
+ <p>
26
+ I also graduated with BS Computing Science, Specializing in Software Practice, and a
27
+ certificate in Computer Game Development at University of Alberta.
28
+ </p>
29
+ {#if entryProps.seaweedTemplateData.shouldAddFunNote}
30
+ <p>
31
+ I'm inspired by games like Harvest Moon: Friends of Mineral Town, Rune Factory 4, Theatrhythm,
32
+ Bravely Default: Flying Fairy, Boku no Natsuyasumi 2, and A Short Hike.
33
+ </p>
34
+ {/if}
35
+
36
+ <!-- todo: maybe put cute stuff here -->
37
+ <!-- </ToggleableContent>-->
38
+ </section>
39
+ </Card>
40
+
41
+ <Card>
42
+ <section class="section-card" slot="content">
43
+ <SocialSection email={email} linkedinSlug={linkedinSlug}></SocialSection>
44
+ <ElementVisibilityDetector bind:isVisible={isVisible}>
45
+ </ElementVisibilityDetector>
46
+ </section>
47
+ </Card>
48
+
49
+ </div>
50
+
51
+ <Card>
52
+ <section class="section-card" slot="content">
53
+ <h1>Experience</h1>
54
+
55
+ <h2>Highlight</h2>
56
+ <p>I like French Fries</p>
57
+
58
+ <h2>Software Engineer</h2>
59
+ <div class="two-column-separated">
60
+ <div>July 2023 – January 2024</div>
61
+ <div style="text-align: end">Control, Remote</div>
62
+ </div>
63
+ <ul>
64
+ <li>
65
+ Developed things
66
+ </li>
67
+ <li>
68
+ Woah
69
+ </li>
70
+ </ul>
71
+ <br>
72
+
73
+ <h2>Software Engineer Intern</h2>
74
+ <div class="two-column-separated">
75
+ <div>May 2022 – Aug 2022</div>
76
+ <div style="text-align: end">Pou Company</div>
77
+ </div>
78
+ <ul>
79
+ <li>
80
+ Stuff
81
+ </li>
82
+ <li>
83
+ Golang
84
+ </li>
85
+ </ul>
86
+ <br>
87
+ <!-- todo: turn off flashing when accordion is expanded -->
88
+ <Accordion>
89
+ <AccordionItem>
90
+ <div slot="summary">
91
+ <h2 class="accordion-header">More experience</h2>
92
+ </div>
93
+ <svelte:fragment slot="content">
94
+ <section class="more-section">
95
+ <h2>Software Engineer Intern</h2>
96
+ <div class="two-column-separated">
97
+ <div>May 2021 – Dec 2021</div>
98
+ <div style="text-align: end">Testing</div>
99
+ </div>
100
+ <ul>
101
+ <li>
102
+ Amazing
103
+ </li>
104
+ </ul>
105
+ <br>
106
+ </section>
107
+ </svelte:fragment>
108
+ </AccordionItem>
109
+ </Accordion>
110
+ </section>
111
+ </Card>
112
+
113
113
  </div>
@@ -1,6 +1,4 @@
1
1
  <script>import {
2
- GetAllEntryFromGlobal,
3
- GetEntryFromGlobal
4
2
  } from "../SeaweedTemplateData";
5
3
  import { removeProxyWrapperOnString } from "./EntryOrderConfig";
6
4
  import ComboBoxWithButton from "../../../components/combo_box/ComboBoxWithButton.svelte";
@@ -11,6 +9,8 @@ export let seaweedTemplateData;
11
9
  export let seaweedEntries;
12
10
  export let orderUrl;
13
11
  export let updateUrl;
12
+ export let getAllEntryFromGlobal;
13
+ export let getEntryFromGlobal;
14
14
  const updateOrderQuery = () => {
15
15
  orderUrl = "order=" + seaweedEntries.map((g) => {
16
16
  const groupUrl = g.items.map(
@@ -22,7 +22,7 @@ const updateOrderQuery = () => {
22
22
  };
23
23
  const addEntry = (group) => {
24
24
  return (selected) => {
25
- const c = GetEntryFromGlobal(selected);
25
+ const c = getEntryFromGlobal(selected);
26
26
  if (c) {
27
27
  group.items.push(c);
28
28
  seaweedEntries = seaweedEntries;
@@ -87,7 +87,7 @@ const removeEntry = (entry, group) => {
87
87
  }
88
88
  };
89
89
  };
90
- const allDefaultEntries = Array.from(GetAllEntryFromGlobal().keys());
90
+ const allDefaultEntries = Array.from(getAllEntryFromGlobal().keys());
91
91
  </script>
92
92
 
93
93
  <br>
@@ -1,5 +1,5 @@
1
1
  import { SvelteComponent } from "svelte";
2
- import { type EntryGroup, type SeaweedTemplateData } from "../SeaweedTemplateData";
2
+ import { type ComponentMeta, type EntryGroup, type SeaweedTemplateData } from "../SeaweedTemplateData";
3
3
  import "./entry-order-config.postcss";
4
4
  declare const __propDef: {
5
5
  props: {
@@ -7,6 +7,8 @@ declare const __propDef: {
7
7
  seaweedEntries: EntryGroup[];
8
8
  orderUrl: string;
9
9
  updateUrl: (data: SeaweedTemplateData) => void;
10
+ getAllEntryFromGlobal: () => Map<string, ComponentMeta>;
11
+ getEntryFromGlobal: (s: string) => ComponentMeta | undefined;
10
12
  };
11
13
  events: {
12
14
  [evt: string]: CustomEvent<any>;
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": "2.4.76",
4
+ "version": "2.4.78",
5
5
  "scripts": {
6
6
  "dev": "vite dev",
7
7
  "build": "vite build && yarn package",
@@ -0,0 +1,44 @@
1
+ <script lang="ts" xmlns="http://www.w3.org/1999/html">
2
+ import { Card, type SimplePageMeta } from "$pkg";
3
+
4
+ // grab page meta from the adjacent meta.json
5
+ export let pageMeta: SimplePageMeta;
6
+ </script>
7
+
8
+ <Card>
9
+ <div slot="content" class="default-card">
10
+ <article>
11
+ <hgroup>
12
+ {#if pageMeta.title}
13
+ <h1>{pageMeta.title}</h1>
14
+ {/if}
15
+ {#if pageMeta.datePublished}
16
+ <p>Published: {pageMeta.datePublished}</p>
17
+ {/if}
18
+ {#if pageMeta.lastUpdated}
19
+ <p>Last updated: {pageMeta.lastUpdated}</p>
20
+ {/if}
21
+ {#if pageMeta.tags.length > 0}
22
+ <section id="article-tags">
23
+ Tags:
24
+ {#each pageMeta.tags as tag}
25
+ <span class="badge variant-filled">{tag}</span>
26
+ {/each}
27
+ </section>
28
+ {/if}
29
+ </hgroup>
30
+
31
+ <slot />
32
+ </article>
33
+ </div>
34
+ </Card>
35
+
36
+ <style>
37
+ hgroup {
38
+ margin-bottom: 1lh;
39
+ }
40
+
41
+ .badge {
42
+ margin-inline-end: 0.5em;
43
+ }
44
+ </style>
@@ -1,8 +1,9 @@
1
- // noinspection JSUnusedGlobalSymbols
2
-
3
- export { default as LazyAsset } from "./LazyAsset.svelte";
4
- export { default as Card } from "./Card.svelte";
5
- export { default as Chip } from "./chip/Chip.svelte";
6
- export { default as PineappleSlideToggle } from "./PineappleSlideToggle.svelte";
7
- export { default as SocialSection } from "./SocialSection.svelte";
8
- export { default as ElementVisbilityDetector } from "./ElementVisbilityDetector.svelte";
1
+ // noinspection JSUnusedGlobalSymbols
2
+
3
+ export { default as LazyAsset } from "./LazyAsset.svelte";
4
+ export { default as Card } from "./Card.svelte";
5
+ export { default as Chip } from "./chip/Chip.svelte";
6
+ export { default as PineappleSlideToggle } from "./PineappleSlideToggle.svelte";
7
+ export { default as SocialSection } from "./SocialSection.svelte";
8
+ export { default as ElementVisbilityDetector } from "./ElementVisbilityDetector.svelte";
9
+ export { default as BlogTemplate } from "./BlogTemplate.svelte";
@@ -48,6 +48,49 @@ export interface PageMeta {
48
48
  title: string;
49
49
  }
50
50
 
51
+ export interface SimplePageMeta {
52
+ datePublished?: string;
53
+ description?: string;
54
+
55
+ imageAlt?: string; // defaults to directory name
56
+ /**
57
+ * imageID is an ID that NavigationComponent can use to identify imported images
58
+ *
59
+ * To use imageID:
60
+ * 1. Add the imageID entry to the meta.json for the page
61
+ * 2. Create a typescript file with the variable ImageMap: Map<string, string>
62
+ * 3. Add a new entry with your imageID as key, and the image url as the value. Since this is
63
+ * Typescript, you can use import ImageUrl from "./path.png" as you would normally do.N
64
+ * 4. Add ImageMap as an argument to your NavigationComponent.
65
+ * Overall, this involves four files
66
+ * - Your navigation page: ./+page.svelte
67
+ * - Your image map typescript: ImageMap.ts
68
+ * - The page you want with an image represented in the navigation: ./topic1/+page.svelte
69
+ * - The meta for that page: ./topic1/meta.json
70
+ *
71
+ * imageID takes precedence over imageURL
72
+ */
73
+ imageID?: string;
74
+
75
+ /**
76
+ * imageURL is only limited to absolute paths (includes files in static folder)
77
+ *
78
+ * if imageID is defined, this will be ignored
79
+ */
80
+ imageUrl?: string;
81
+
82
+ lastUpdated?: string;
83
+
84
+ shouldGroup?: boolean;
85
+ shouldHide?: boolean;
86
+ tags: string[];
87
+
88
+ /**
89
+ * title defaults to the directory name if it's an empty string.
90
+ */
91
+ title: string;
92
+ }
93
+
51
94
  /**
52
95
  * todo: doc
53
96
  * @param parentList
@@ -4,4 +4,6 @@ export interface OverridableMetaProps {
4
4
  ogTitle?: string;
5
5
  ogDescription?: string;
6
6
  ogImage?: string;
7
+ datePublished?: string;
8
+ lastUpdated?: string;
7
9
  }
@@ -23,6 +23,7 @@
23
23
 
24
24
  export let seaweedTemplateData: SeaweedTemplateData;
25
25
  export let projectFirstGroupedEntries: ReadonlyArray<EntryGroup>;
26
+ export let getAllEntryFromGlobal: () => Map<string, ComponentMeta>;
26
27
  export let getEntryFromGlobal: (name: string) => undefined | ComponentMeta;
27
28
  export let letChaos = true;
28
29
  export let name = "Turnip";
@@ -306,6 +307,8 @@
306
307
  <EntryOrderConfig bind:seaweedEntries={seaweedTemplateData.groupedEntries}
307
308
  seaweedTemplateData={seaweedTemplateData}
308
309
  bind:orderUrl={orderUrl}
310
+ getAllEntryFromGlobal={getAllEntryFromGlobal}
311
+ getEntryFromGlobal={getEntryFromGlobal}
309
312
  updateUrl={updateUrl}></EntryOrderConfig>
310
313
 
311
314
  <br>