@turnipxenon/pineapple 2.4.77 → 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.
@@ -4,10 +4,16 @@
4
4
  <option name="autoReloadType" value="SELECTIVE" />
5
5
  </component>
6
6
  <component name="ChangeListManager">
7
- <list default="true" id="accb6ba2-c343-4f84-ad30-6e2d71eceee5" name="Changes" comment="Remove unused components">
8
- <change beforePath="$PROJECT_DIR$/src/lib/template/seaweed/SeaweedTemplate.svelte" beforeDir="false" afterPath="$PROJECT_DIR$/src/lib/template/seaweed/SeaweedTemplate.svelte" afterDir="false" />
9
- <change beforePath="$PROJECT_DIR$/src/lib/template/seaweed/entry_order_config/EntryOrderConfig.svelte" beforeDir="false" afterPath="$PROJECT_DIR$/src/lib/template/seaweed/entry_order_config/EntryOrderConfig.svelte" afterDir="false" />
10
- <change beforePath="$PROJECT_DIR$/src/routes/(seaweed)/portfolio/+page.svelte" beforeDir="false" afterPath="$PROJECT_DIR$/src/routes/(seaweed)/portfolio/+page.svelte" afterDir="false" />
7
+ <list default="true" id="accb6ba2-c343-4f84-ad30-6e2d71eceee5" name="Changes" comment="Extract GetEntryGlobal functions">
8
+ <change afterPath="$PROJECT_DIR$/src/lib/components/BlogTemplate.svelte" afterDir="false" />
9
+ <change beforePath="$PROJECT_DIR$/docs/Workflow.md" beforeDir="false" />
10
+ <change beforePath="$PROJECT_DIR$/src/lib/components/index.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/lib/components/index.ts" afterDir="false" />
11
+ <change beforePath="$PROJECT_DIR$/src/lib/components/navigation_component/PageMeta.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/lib/components/navigation_component/PageMeta.ts" afterDir="false" />
12
+ <change beforePath="$PROJECT_DIR$/src/lib/components/overrideable_meta/OverridableMetaProps.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/lib/components/overrideable_meta/OverridableMetaProps.ts" afterDir="false" />
13
+ <change beforePath="$PROJECT_DIR$/src/routes/(pineapple)/pineapple/(extra-pages)/page1/+page.svelte" beforeDir="false" afterPath="$PROJECT_DIR$/src/routes/(pineapple)/pineapple/(extra-pages)/page1/+page.svelte" afterDir="false" />
14
+ <change beforePath="$PROJECT_DIR$/src/routes/(pineapple)/pineapple/(extra-pages)/page2/+page.svelte" beforeDir="false" afterPath="$PROJECT_DIR$/src/routes/(pineapple)/pineapple/(extra-pages)/page2/+page.svelte" afterDir="false" />
15
+ <change beforePath="$PROJECT_DIR$/src/routes/(pineapple)/pineapple/(extra-pages)/page3/page5/+page.svelte" beforeDir="false" afterPath="$PROJECT_DIR$/src/routes/(pineapple)/pineapple/(extra-pages)/page3/page5/+page.svelte" afterDir="false" />
16
+ <change beforePath="$PROJECT_DIR$/vite.config.ts" beforeDir="false" afterPath="$PROJECT_DIR$/vite.config.ts" afterDir="false" />
11
17
  </list>
12
18
  <option name="SHOW_DIALOG" value="false" />
13
19
  <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -60,6 +66,7 @@
60
66
  <option value="ChumBucket" />
61
67
  <option value="WorkExperience" />
62
68
  <option value="TypeScript File" />
69
+ <option value="BlogTemplate" />
63
70
  </list>
64
71
  </option>
65
72
  </component>
@@ -114,34 +121,34 @@
114
121
  <option name="hideEmptyMiddlePackages" value="true" />
115
122
  <option name="showLibraryContents" value="true" />
116
123
  </component>
117
- <component name="PropertiesComponent"><![CDATA[{
118
- "keyToString": {
119
- "DefaultHtmlFileTemplate": "HTML File",
120
- "RunOnceActivity.OpenProjectViewOnStart": "true",
121
- "RunOnceActivity.ShowReadmeOnStart": "true",
122
- "WebServerToolWindowFactoryState": "false",
123
- "git-widget-placeholder": "turnip/dev",
124
- "ignore.virus.scanning.warn.message": "true",
125
- "last_opened_file_path": "C:/Users/Pumpkin/Projects/Web/pineapple/src/lib",
126
- "list.type.of.created.stylesheet": "CSS",
127
- "node.js.detected.package.eslint": "true",
128
- "node.js.detected.package.tslint": "true",
129
- "node.js.selected.package.eslint": "(autodetect)",
130
- "node.js.selected.package.tslint": "(autodetect)",
131
- "nodejs_interpreter_path": "node",
132
- "nodejs_package_manager_path": "yarn",
133
- "npm.build.executor": "Run",
134
- "npm.dev (1).executor": "Run",
135
- "npm.dev --open.executor": "Run",
136
- "npm.dev offline.executor": "Run",
137
- "npm.dev-offline.executor": "Run",
138
- "npm.dev.executor": "Run",
139
- "npm.to-dev.executor": "Run",
140
- "settings.editor.selected.configurable": "settings.sync",
141
- "ts.external.directory.path": "C:\\Users\\Pumpkin\\Projects\\Web\\pineapple\\node_modules\\typescript\\lib",
142
- "vue.rearranger.settings.migration": "true"
124
+ <component name="PropertiesComponent">{
125
+ &quot;keyToString&quot;: {
126
+ &quot;DefaultHtmlFileTemplate&quot;: &quot;HTML File&quot;,
127
+ &quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;,
128
+ &quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
129
+ &quot;WebServerToolWindowFactoryState&quot;: &quot;false&quot;,
130
+ &quot;git-widget-placeholder&quot;: &quot;turnip/dev&quot;,
131
+ &quot;ignore.virus.scanning.warn.message&quot;: &quot;true&quot;,
132
+ &quot;last_opened_file_path&quot;: &quot;C:/Users/Pumpkin/Projects/Web/pineapple/src/lib&quot;,
133
+ &quot;list.type.of.created.stylesheet&quot;: &quot;CSS&quot;,
134
+ &quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
135
+ &quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
136
+ &quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
137
+ &quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
138
+ &quot;nodejs_interpreter_path&quot;: &quot;node&quot;,
139
+ &quot;nodejs_package_manager_path&quot;: &quot;yarn&quot;,
140
+ &quot;npm.build.executor&quot;: &quot;Run&quot;,
141
+ &quot;npm.dev (1).executor&quot;: &quot;Run&quot;,
142
+ &quot;npm.dev --open.executor&quot;: &quot;Run&quot;,
143
+ &quot;npm.dev offline.executor&quot;: &quot;Run&quot;,
144
+ &quot;npm.dev-offline.executor&quot;: &quot;Run&quot;,
145
+ &quot;npm.dev.executor&quot;: &quot;Run&quot;,
146
+ &quot;npm.to-dev.executor&quot;: &quot;Run&quot;,
147
+ &quot;settings.editor.selected.configurable&quot;: &quot;settings.sync&quot;,
148
+ &quot;ts.external.directory.path&quot;: &quot;C:\\Users\\Pumpkin\\Projects\\Web\\pineapple\\node_modules\\typescript\\lib&quot;,
149
+ &quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
143
150
  }
144
- }]]></component>
151
+ }</component>
145
152
  <component name="RecentsManager">
146
153
  <key name="CopyFile.RECENT_KEYS">
147
154
  <recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\lib" />
@@ -214,7 +221,7 @@
214
221
  <component name="SharedIndexes">
215
222
  <attachedChunks>
216
223
  <set>
217
- <option value="bundled-js-predefined-1d06a55b98c1-74d2a5396914-JavaScript-WS-241.14494.235" />
224
+ <option value="bundled-js-predefined-1d06a55b98c1-2e7d6887c066-JavaScript-WS-241.15989.47" />
218
225
  </set>
219
226
  </attachedChunks>
220
227
  </component>
@@ -383,15 +390,11 @@
383
390
  <workItem from="1713055651151" duration="721000" />
384
391
  <workItem from="1713056429943" duration="1789000" />
385
392
  <workItem from="1713062148811" duration="58000" />
386
- <workItem from="1713062548290" duration="4255000" />
387
- </task>
388
- <task id="LOCAL-00152" summary="Extract all dependencies for updateUrl">
389
- <option name="closed" value="true" />
390
- <created>1712422241298</created>
391
- <option name="number" value="00152" />
392
- <option name="presentableId" value="LOCAL-00152" />
393
- <option name="project" value="LOCAL" />
394
- <updated>1712422241298</updated>
393
+ <workItem from="1713062548290" duration="4767000" />
394
+ <workItem from="1713067631329" duration="264000" />
395
+ <workItem from="1714244359244" duration="372000" />
396
+ <workItem from="1714252762932" duration="11000" />
397
+ <workItem from="1714365775212" duration="2167000" />
395
398
  </task>
396
399
  <task id="LOCAL-00153" summary="Extract EntryOrderConfig">
397
400
  <option name="closed" value="true" />
@@ -777,7 +780,15 @@
777
780
  <option name="project" value="LOCAL" />
778
781
  <updated>1713065902296</updated>
779
782
  </task>
780
- <option name="localTasksCounter" value="201" />
783
+ <task id="LOCAL-00201" summary="Extract GetEntryGlobal functions">
784
+ <option name="closed" value="true" />
785
+ <created>1713066999084</created>
786
+ <option name="number" value="00201" />
787
+ <option name="presentableId" value="LOCAL-00201" />
788
+ <option name="project" value="LOCAL" />
789
+ <updated>1713066999084</updated>
790
+ </task>
791
+ <option name="localTasksCounter" value="202" />
781
792
  <servers />
782
793
  </component>
783
794
  <component name="TypeScriptGeneratedFilesManager">
@@ -835,7 +846,6 @@
835
846
  </option>
836
847
  </component>
837
848
  <component name="VcsManagerConfiguration">
838
- <MESSAGE value="Fix pkg import for Chip" />
839
849
  <MESSAGE value="Extract tailwind css utility class to local-chip" />
840
850
  <MESSAGE value="Fix chip issue in Advanced Settings" />
841
851
  <MESSAGE value="Remove tailwind reliance on Chip" />
@@ -860,6 +870,7 @@
860
870
  <MESSAGE value="Fix exports" />
861
871
  <MESSAGE value="Fix shouldAddFunNote reactivity" />
862
872
  <MESSAGE value="Remove unused components" />
863
- <option name="LAST_COMMIT_MESSAGE" value="Remove unused components" />
873
+ <MESSAGE value="Extract GetEntryGlobal functions" />
874
+ <option name="LAST_COMMIT_MESSAGE" value="Extract GetEntryGlobal functions" />
864
875
  </component>
865
876
  </project>
@@ -0,0 +1,41 @@
1
+ <script xmlns="http://www.w3.org/1999/html">import { Card } from "..";
2
+ export let pageMeta;
3
+ </script>
4
+
5
+ <Card>
6
+ <div slot="content" class="default-card">
7
+ <article>
8
+ <hgroup>
9
+ {#if pageMeta.title}
10
+ <h1>{pageMeta.title}</h1>
11
+ {/if}
12
+ {#if pageMeta.datePublished}
13
+ <p>Published: {pageMeta.datePublished}</p>
14
+ {/if}
15
+ {#if pageMeta.lastUpdated}
16
+ <p>Last updated: {pageMeta.lastUpdated}</p>
17
+ {/if}
18
+ {#if pageMeta.tags.length > 0}
19
+ <section id="article-tags">
20
+ Tags:
21
+ {#each pageMeta.tags as tag}
22
+ <span class="badge variant-filled">{tag}</span>
23
+ {/each}
24
+ </section>
25
+ {/if}
26
+ </hgroup>
27
+
28
+ <slot />
29
+ </article>
30
+ </div>
31
+ </Card>
32
+
33
+ <style>
34
+ hgroup {
35
+ margin-bottom: 1lh;
36
+ }
37
+
38
+ .badge {
39
+ margin-inline-end: 0.5em;
40
+ }
41
+ </style>
@@ -0,0 +1,19 @@
1
+ import { SvelteComponent } from "svelte";
2
+ import { type SimplePageMeta } from "..";
3
+ declare const __propDef: {
4
+ props: {
5
+ pageMeta: SimplePageMeta;
6
+ };
7
+ events: {
8
+ [evt: string]: CustomEvent<any>;
9
+ };
10
+ slots: {
11
+ default: {};
12
+ };
13
+ };
14
+ export type BlogTemplateProps = typeof __propDef.props;
15
+ export type BlogTemplateEvents = typeof __propDef.events;
16
+ export type BlogTemplateSlots = typeof __propDef.slots;
17
+ export default class BlogTemplate extends SvelteComponent<BlogTemplateProps, BlogTemplateEvents, BlogTemplateSlots> {
18
+ }
19
+ export {};
@@ -4,3 +4,4 @@ export { default as Chip } from "./chip/Chip.svelte";
4
4
  export { default as PineappleSlideToggle } from "./PineappleSlideToggle.svelte";
5
5
  export { default as SocialSection } from "./SocialSection.svelte";
6
6
  export { default as ElementVisbilityDetector } from "./ElementVisbilityDetector.svelte";
7
+ export { default as BlogTemplate } from "./BlogTemplate.svelte";
@@ -5,3 +5,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 "./SocialSection.svelte";
7
7
  export { default as ElementVisbilityDetector } from "./ElementVisbilityDetector.svelte";
8
+ export { default as BlogTemplate } from "./BlogTemplate.svelte";
@@ -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
  }
@@ -37,6 +37,8 @@ declare module '$env/static/private' {
37
37
  export const COMSPEC: string;
38
38
  export const DriverData: string;
39
39
  export const EXEPATH: string;
40
+ export const FPS_BROWSER_APP_PROFILE_STRING: string;
41
+ export const FPS_BROWSER_USER_PROFILE_STRING: string;
40
42
  export const GIT_XL_PATH: string;
41
43
  export const GoLand: string;
42
44
  export const GOPATH: string;
@@ -225,6 +227,8 @@ declare module '$env/dynamic/private' {
225
227
  COMSPEC: string;
226
228
  DriverData: string;
227
229
  EXEPATH: string;
230
+ FPS_BROWSER_APP_PROFILE_STRING: string;
231
+ FPS_BROWSER_USER_PROFILE_STRING: string;
228
232
  GIT_XL_PATH: string;
229
233
  GoLand: string;
230
234
  GOPATH: string;
@@ -21,7 +21,7 @@ export const options = {
21
21
  app: ({ head, body, assets, nonce, env }) => "<!DOCTYPE html>\n<html lang=\"en\">\n\t<head>\n\t\t<meta charset=\"utf-8\" />\n\t\t<link rel=\"icon\" href=\"" + assets + "/favicon.png\" />\n\t\t<meta name=\"viewport\" content=\"width=device-width\" />\n\t\t" + head + "\n\t</head>\n\n\t<body data-sveltekit-preload-data=\"hover\" data-theme=\"crimson\">\n\t\t<div style=\"display: contents\" class=\"h-full overflow-hidden\">" + body + "</div>\n\t</body>\n</html>\n",
22
22
  error: ({ status, message }) => "<!doctype html>\n<html lang=\"en\">\n\t<head>\n\t\t<meta charset=\"utf-8\" />\n\t\t<title>" + message + "</title>\n\n\t\t<style>\n\t\t\tbody {\n\t\t\t\t--bg: white;\n\t\t\t\t--fg: #222;\n\t\t\t\t--divider: #ccc;\n\t\t\t\tbackground: var(--bg);\n\t\t\t\tcolor: var(--fg);\n\t\t\t\tfont-family:\n\t\t\t\t\tsystem-ui,\n\t\t\t\t\t-apple-system,\n\t\t\t\t\tBlinkMacSystemFont,\n\t\t\t\t\t'Segoe UI',\n\t\t\t\t\tRoboto,\n\t\t\t\t\tOxygen,\n\t\t\t\t\tUbuntu,\n\t\t\t\t\tCantarell,\n\t\t\t\t\t'Open Sans',\n\t\t\t\t\t'Helvetica Neue',\n\t\t\t\t\tsans-serif;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: center;\n\t\t\t\theight: 100vh;\n\t\t\t\tmargin: 0;\n\t\t\t}\n\n\t\t\t.error {\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tmax-width: 32rem;\n\t\t\t\tmargin: 0 1rem;\n\t\t\t}\n\n\t\t\t.status {\n\t\t\t\tfont-weight: 200;\n\t\t\t\tfont-size: 3rem;\n\t\t\t\tline-height: 1;\n\t\t\t\tposition: relative;\n\t\t\t\ttop: -0.05rem;\n\t\t\t}\n\n\t\t\t.message {\n\t\t\t\tborder-left: 1px solid var(--divider);\n\t\t\t\tpadding: 0 0 0 1rem;\n\t\t\t\tmargin: 0 0 0 1rem;\n\t\t\t\tmin-height: 2.5rem;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t}\n\n\t\t\t.message h1 {\n\t\t\t\tfont-weight: 400;\n\t\t\t\tfont-size: 1em;\n\t\t\t\tmargin: 0;\n\t\t\t}\n\n\t\t\t@media (prefers-color-scheme: dark) {\n\t\t\t\tbody {\n\t\t\t\t\t--bg: #222;\n\t\t\t\t\t--fg: #ddd;\n\t\t\t\t\t--divider: #666;\n\t\t\t\t}\n\t\t\t}\n\t\t</style>\n\t</head>\n\t<body>\n\t\t<div class=\"error\">\n\t\t\t<span class=\"status\">" + status + "</span>\n\t\t\t<div class=\"message\">\n\t\t\t\t<h1>" + message + "</h1>\n\t\t\t</div>\n\t\t</div>\n\t</body>\n</html>\n"
23
23
  },
24
- version_hash: "1czq7kj"
24
+ version_hash: "1dmipqv"
25
25
  };
26
26
 
27
27
  export async function get_hooks() {
@@ -0,0 +1,41 @@
1
+ <script xmlns="http://www.w3.org/1999/html">import { Card } from "..";
2
+ export let pageMeta;
3
+ </script>
4
+
5
+ <Card>
6
+ <div slot="content" class="default-card">
7
+ <article>
8
+ <hgroup>
9
+ {#if pageMeta.title}
10
+ <h1>{pageMeta.title}</h1>
11
+ {/if}
12
+ {#if pageMeta.datePublished}
13
+ <p>Published: {pageMeta.datePublished}</p>
14
+ {/if}
15
+ {#if pageMeta.lastUpdated}
16
+ <p>Last updated: {pageMeta.lastUpdated}</p>
17
+ {/if}
18
+ {#if pageMeta.tags.length > 0}
19
+ <section id="article-tags">
20
+ Tags:
21
+ {#each pageMeta.tags as tag}
22
+ <span class="badge variant-filled">{tag}</span>
23
+ {/each}
24
+ </section>
25
+ {/if}
26
+ </hgroup>
27
+
28
+ <slot />
29
+ </article>
30
+ </div>
31
+ </Card>
32
+
33
+ <style>
34
+ hgroup {
35
+ margin-bottom: 1lh;
36
+ }
37
+
38
+ .badge {
39
+ margin-inline-end: 0.5em;
40
+ }
41
+ </style>
@@ -0,0 +1,19 @@
1
+ import { SvelteComponent } from "svelte";
2
+ import { type SimplePageMeta } from "..";
3
+ declare const __propDef: {
4
+ props: {
5
+ pageMeta: SimplePageMeta;
6
+ };
7
+ events: {
8
+ [evt: string]: CustomEvent<any>;
9
+ };
10
+ slots: {
11
+ default: {};
12
+ };
13
+ };
14
+ export type BlogTemplateProps = typeof __propDef.props;
15
+ export type BlogTemplateEvents = typeof __propDef.events;
16
+ export type BlogTemplateSlots = typeof __propDef.slots;
17
+ export default class BlogTemplate extends SvelteComponent<BlogTemplateProps, BlogTemplateEvents, BlogTemplateSlots> {
18
+ }
19
+ export {};
@@ -4,3 +4,4 @@ export { default as Chip } from "./chip/Chip.svelte";
4
4
  export { default as PineappleSlideToggle } from "./PineappleSlideToggle.svelte";
5
5
  export { default as SocialSection } from "./SocialSection.svelte";
6
6
  export { default as ElementVisbilityDetector } from "./ElementVisbilityDetector.svelte";
7
+ export { default as BlogTemplate } from "./BlogTemplate.svelte";
@@ -5,3 +5,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 "./SocialSection.svelte";
7
7
  export { default as ElementVisbilityDetector } from "./ElementVisbilityDetector.svelte";
8
+ export { default as BlogTemplate } from "./BlogTemplate.svelte";
@@ -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
  }
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.77",
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>
@@ -6,3 +6,4 @@ export { default as Chip } from "./chip/Chip.svelte";
6
6
  export { default as PineappleSlideToggle } from "./PineappleSlideToggle.svelte";
7
7
  export { default as SocialSection } from "./SocialSection.svelte";
8
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
  }
@@ -1,8 +1,9 @@
1
- <script>
2
- import { Card } from "$pkg";
1
+ <script lang="ts">
2
+ import pageMeta from "./meta.json";
3
3
  import { page } from "$app/stores";
4
+ import BlogTemplate from "$pkg/components/BlogTemplate.svelte";
4
5
  </script>
5
6
 
6
- <Card>
7
- <h1 slot="content" class="default-card">{$page.url}</h1>
8
- </Card>
7
+ <BlogTemplate pageMeta={pageMeta}>
8
+ <p>{$page.url}</p>
9
+ </BlogTemplate>
@@ -1,8 +1,9 @@
1
- <script>
2
- import { Card } from "$pkg";
1
+ <script lang="ts">
2
+ import pageMeta from "./meta.json";
3
3
  import { page } from "$app/stores";
4
+ import BlogTemplate from "$pkg/components/BlogTemplate.svelte";
4
5
  </script>
5
6
 
6
- <Card>
7
- <h1 slot="content" class="default-card">{$page.url}</h1>
8
- </Card>
7
+ <BlogTemplate pageMeta={pageMeta}>
8
+ <p>{$page.url}</p>
9
+ </BlogTemplate>
@@ -1,8 +1,9 @@
1
- <script>
2
- import { Card } from "$pkg";
1
+ <script lang="ts">
2
+ import pageMeta from "./meta.json";
3
3
  import { page } from "$app/stores";
4
+ import BlogTemplate from "$pkg/components/BlogTemplate.svelte";
4
5
  </script>
5
6
 
6
- <Card>
7
- <h1 slot="content" class="default-card">{$page.url}</h1>
8
- </Card>
7
+ <BlogTemplate pageMeta={pageMeta}>
8
+ <p>{$page.url}</p>
9
+ </BlogTemplate>
package/vite.config.ts CHANGED
@@ -3,5 +3,5 @@ import { defineConfig } from "vite";
3
3
 
4
4
  export default defineConfig({
5
5
  plugins: [sveltekit()],
6
- assetsInclude: ["**/*.yarn", "**/*.json"]
6
+ assetsInclude: ["**/*.yarn"]
7
7
  });
package/docs/Workflow.md DELETED
@@ -1,5 +0,0 @@
1
- # Workflow
2
-
3
- - When making new changes, update the number in the package.json on the dependent codebase.
4
- - Run `npm update-pineapple` to update afterwards
5
- - To update all repos, run `./dev/update_all_repos.sh`