@turnipxenon/pineapple 2.4.67 → 2.4.68

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 (33) hide show
  1. package/.idea/workspace.xml +33 -16
  2. package/.svelte-kit/__package__/api/GetLatestBlogs.d.ts +1 -0
  3. package/.svelte-kit/__package__/api/GetLatestBlogs.js +7 -0
  4. package/.svelte-kit/__package__/api/index.d.ts +1 -0
  5. package/.svelte-kit/__package__/api/index.js +2 -0
  6. package/.svelte-kit/__package__/components/navigation_component/PageMeta.d.ts +1 -1
  7. package/.svelte-kit/__package__/index.d.ts +1 -0
  8. package/.svelte-kit/__package__/index.js +1 -0
  9. package/.svelte-kit/__package__/template/seaweed/ChumBucket.svelte +72 -0
  10. package/.svelte-kit/__package__/template/seaweed/ChumBucket.svelte.d.ts +14 -0
  11. package/.svelte-kit/__package__/template/seaweed/SeaweedTemplate.svelte +4 -1
  12. package/.svelte-kit/ambient.d.ts +2 -0
  13. package/.svelte-kit/generated/server/internal.js +1 -1
  14. package/.svelte-kit/types/route_meta_data.json +3 -0
  15. package/.svelte-kit/types/src/routes/api/get-latest-blogs/$types.d.ts +10 -0
  16. package/dist/api/GetLatestBlogs.d.ts +1 -0
  17. package/dist/api/GetLatestBlogs.js +7 -0
  18. package/dist/api/index.d.ts +1 -0
  19. package/dist/api/index.js +2 -0
  20. package/dist/components/navigation_component/PageMeta.d.ts +1 -1
  21. package/dist/index.d.ts +1 -0
  22. package/dist/index.js +1 -0
  23. package/dist/template/seaweed/ChumBucket.svelte +72 -0
  24. package/dist/template/seaweed/ChumBucket.svelte.d.ts +14 -0
  25. package/dist/template/seaweed/SeaweedTemplate.svelte +4 -1
  26. package/package.json +1 -1
  27. package/src/lib/api/GetLatestBlogs.ts +7 -0
  28. package/src/lib/api/index.ts +3 -0
  29. package/src/lib/components/navigation_component/PageMeta.ts +1 -1
  30. package/src/lib/index.ts +1 -0
  31. package/src/lib/template/seaweed/ChumBucket.svelte +75 -0
  32. package/src/lib/template/seaweed/SeaweedTemplate.svelte +4 -1
  33. package/src/routes/api/get-latest-blogs/+server.ts +4 -0
@@ -4,7 +4,15 @@
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="CreateUrlForm" comment="Add hideable upper controls for NavigationComponent" />
7
+ <list default="true" id="accb6ba2-c343-4f84-ad30-6e2d71eceee5" name="CreateUrlForm" comment="Add default value for allowUpperControl in NavigationComponent">
8
+ <change afterPath="$PROJECT_DIR$/src/lib/api/GetLatestBlogs.ts" afterDir="false" />
9
+ <change afterPath="$PROJECT_DIR$/src/lib/api/index.ts" afterDir="false" />
10
+ <change afterPath="$PROJECT_DIR$/src/lib/template/seaweed/ChumBucket.svelte" afterDir="false" />
11
+ <change afterPath="$PROJECT_DIR$/src/routes/api/get-latest-blogs/+server.ts" afterDir="false" />
12
+ <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" />
13
+ <change beforePath="$PROJECT_DIR$/src/lib/index.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/lib/index.ts" afterDir="false" />
14
+ <change beforePath="$PROJECT_DIR$/src/lib/template/seaweed/SeaweedTemplate.svelte" beforeDir="false" afterPath="$PROJECT_DIR$/src/lib/template/seaweed/SeaweedTemplate.svelte" afterDir="false" />
15
+ </list>
8
16
  <option name="SHOW_DIALOG" value="false" />
9
17
  <option name="HIGHLIGHT_CONFLICTS" value="true" />
10
18
  <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@@ -50,10 +58,11 @@
50
58
  <option value="ComboBoxWithButton" />
51
59
  <option value="RandomComponent" />
52
60
  <option value="UrlShortenerForm" />
53
- <option value="TypeScript File" />
54
61
  <option value="PineappleSlideToggle" />
55
62
  <option value="PostCSS File" />
56
63
  <option value="CSS File" />
64
+ <option value="ChumBucket" />
65
+ <option value="TypeScript File" />
57
66
  </list>
58
67
  </option>
59
68
  </component>
@@ -156,7 +165,7 @@
156
165
  <recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\lib\util\util.ts" />
157
166
  </key>
158
167
  </component>
159
- <component name="RunManager" selected="npm.to-dev">
168
+ <component name="RunManager" selected="npm.dev --open">
160
169
  <configuration name="dev --open" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
161
170
  <package-json value="$PROJECT_DIR$/package.json" />
162
171
  <command value="run" />
@@ -195,8 +204,8 @@
195
204
  </list>
196
205
  <recent_temporary>
197
206
  <list>
198
- <item itemvalue="npm.to-dev" />
199
207
  <item itemvalue="npm.dev --open" />
208
+ <item itemvalue="npm.to-dev" />
200
209
  <item itemvalue="npm.dev-offline" />
201
210
  <item itemvalue="npm.dev --open" />
202
211
  <item itemvalue="npm.to-dev" />
@@ -346,14 +355,14 @@
346
355
  <workItem from="1712757929028" duration="266000" />
347
356
  <workItem from="1712759920412" duration="16000" />
348
357
  <workItem from="1712761439292" duration="385000" />
349
- </task>
350
- <task id="LOCAL-00135" summary="Add resolutions to use Node 20 in Azure SWA GithubActions">
351
- <option name="closed" value="true" />
352
- <created>1712380591931</created>
353
- <option name="number" value="00135" />
354
- <option name="presentableId" value="LOCAL-00135" />
355
- <option name="project" value="LOCAL" />
356
- <updated>1712380591931</updated>
358
+ <workItem from="1712761882975" duration="777000" />
359
+ <workItem from="1712766991700" duration="25000" />
360
+ <workItem from="1712767347310" duration="142000" />
361
+ <workItem from="1712771630436" duration="32000" />
362
+ <workItem from="1712772267848" duration="578000" />
363
+ <workItem from="1712774708776" duration="809000" />
364
+ <workItem from="1712777702027" duration="1171000" />
365
+ <workItem from="1712779118025" duration="2748000" />
357
366
  </task>
358
367
  <task id="LOCAL-00136" summary="Add resolutions to use Node 20 in Azure SWA GithubActions&#10;&#10;Reference: https://github.com/Azure/static-web-apps-cli/issues/756#issuecomment-1775748572">
359
368
  <option name="closed" value="true" />
@@ -739,7 +748,15 @@
739
748
  <option name="project" value="LOCAL" />
740
749
  <updated>1712761479941</updated>
741
750
  </task>
742
- <option name="localTasksCounter" value="184" />
751
+ <task id="LOCAL-00184" summary="Add default value for allowUpperControl in NavigationComponent">
752
+ <option name="closed" value="true" />
753
+ <created>1712761924487</created>
754
+ <option name="number" value="00184" />
755
+ <option name="presentableId" value="LOCAL-00184" />
756
+ <option name="project" value="LOCAL" />
757
+ <updated>1712761924487</updated>
758
+ </task>
759
+ <option name="localTasksCounter" value="185" />
743
760
  <servers />
744
761
  </component>
745
762
  <component name="TypeScriptGeneratedFilesManager">
@@ -777,7 +794,7 @@
777
794
  <entry key="branch">
778
795
  <value>
779
796
  <list>
780
- <option value="main" />
797
+ <option value="turnip/dev" />
781
798
  </list>
782
799
  </value>
783
800
  </entry>
@@ -797,7 +814,6 @@
797
814
  </option>
798
815
  </component>
799
816
  <component name="VcsManagerConfiguration">
800
- <MESSAGE value="Fix yarn dependencies" />
801
817
  <MESSAGE value="Support swappable group for backwards compatibility" />
802
818
  <MESSAGE value="Add back gameSectionFirst behaviour" />
803
819
  <MESSAGE value="Delay parsing for query terms after page transformation" />
@@ -822,6 +838,7 @@
822
838
  <MESSAGE value="Add border for slider toggle during light mode" />
823
839
  <MESSAGE value="WIP attempt to fix slider" />
824
840
  <MESSAGE value="Add hideable upper controls for NavigationComponent" />
825
- <option name="LAST_COMMIT_MESSAGE" value="Add hideable upper controls for NavigationComponent" />
841
+ <MESSAGE value="Add default value for allowUpperControl in NavigationComponent" />
842
+ <option name="LAST_COMMIT_MESSAGE" value="Add default value for allowUpperControl in NavigationComponent" />
826
843
  </component>
827
844
  </project>
@@ -0,0 +1 @@
1
+ export declare const GetLatestBlogs: () => Promise<Response>;
@@ -0,0 +1,7 @@
1
+ export const GetLatestBlogs = async () => {
2
+ const resp = await fetch("http://turnipxenon.com/api/get-latest-blogs");
3
+ if (!resp.ok) {
4
+ return new Response(JSON.stringify([]));
5
+ }
6
+ return new Response(JSON.stringify(await resp.json()));
7
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ // noinspection ES6UnusedImports
2
+ import { GetLatestBlogs } from "./GetLatestBlogs";
@@ -9,7 +9,7 @@ export interface PageMeta {
9
9
  * 1. Add the imageID entry to the meta.json for the page
10
10
  * 2. Create a typescript file with the variable ImageMap: Map<string, string>
11
11
  * 3. Add a new entry with your imageID as key, and the image url as the value. Since this is
12
- * Typescript, you can use import ImageUrl from "./path.png" as you would normally do.
12
+ * Typescript, you can use import ImageUrl from "./path.png" as you would normally do.N
13
13
  * 4. Add ImageMap as an argument to your NavigationComponent.
14
14
  * Overall, this involves four files
15
15
  * - Your navigation page: ./+page.svelte
@@ -14,3 +14,4 @@ export * from "./components/dialog_manager/DialogUtils";
14
14
  export * from "./types/pineapple_fiber/PortraitType";
15
15
  export * from "./types/pineapple_fiber/DialogDetail";
16
16
  export * from "./util/util";
17
+ export * from "./api/index";
@@ -15,3 +15,4 @@ export * from "./components/dialog_manager/DialogUtils";
15
15
  export * from "./types/pineapple_fiber/PortraitType";
16
16
  export * from "./types/pineapple_fiber/DialogDetail";
17
17
  export * from "./util/util";
18
+ export * from "./api/index";
@@ -0,0 +1,72 @@
1
+ <script>import Card from "../../components/Card.svelte";
2
+ import {} from "../..";
3
+ import { onMount } from "svelte";
4
+ let pageMetaList = [];
5
+ const loadPageMeta = async () => {
6
+ fetch("/api/get-latest-blogs").then((resp) => resp.json()).then((json) => {
7
+ pageMetaList = json;
8
+ });
9
+ };
10
+ onMount(() => {
11
+ loadPageMeta();
12
+ });
13
+ </script>
14
+
15
+ <Card>
16
+ <div slot="content" class="chum-bucket">
17
+ <h2>More about me...</h2>
18
+ <p>Check out the latest things I've been rambling about at
19
+ <a href="https://turnipxenon.com" target="_blank">turnipxenon.com</a> or at
20
+ <a href="https://turnipxenon.com/blogs/coding-chagrin" target="_blank">turnipxenon.com/blogs/coding-chagrin.</a>
21
+ </p>
22
+
23
+ {#if pageMetaList.length > 0}
24
+ <h3><b>My latest blogs (sounds too fancy)</b></h3>
25
+ {/if}
26
+
27
+ <div class="chum-bucket-grid">
28
+ {#each pageMetaList as pageMeta}
29
+ <div class="chum-bucket-item">
30
+ {#if pageMeta.imageUrl}
31
+ <img src={`https://turnipxenon.com${pageMeta.imageUrl}`}
32
+ class="chum-bucket-image"
33
+ alt={pageMeta.imageAlt}>
34
+ {/if}
35
+ <div>
36
+ <h3><a href={`https://turnipxenon.com/${pageMeta.relativeLink}`}>{pageMeta.title}</a></h3>
37
+ <p>{pageMeta.description}</p>
38
+ </div>
39
+ </div>
40
+ {/each}
41
+ </div>
42
+ </div>
43
+ </Card>
44
+
45
+ <style>
46
+ .chum-bucket-item {
47
+ width: 100%;
48
+ display: flex;
49
+ flex-direction: row;
50
+ align-items: start;
51
+ }
52
+
53
+ .chum-bucket-image {
54
+ max-width: 10em;
55
+ height: auto;
56
+ margin-top: 0.5em;
57
+ margin-inline-end: 1em;
58
+ }
59
+
60
+
61
+ .chum-bucket {
62
+ padding: 1.5lh 2em;
63
+ max-width: 600px;
64
+ }
65
+
66
+ .chum-bucket-grid {
67
+ display: flex;
68
+ flex-direction: column;
69
+ margin-top: 0.5lh;
70
+ gap: 0.5lh;
71
+ }
72
+ </style>
@@ -0,0 +1,14 @@
1
+ import { SvelteComponent } from "svelte";
2
+ declare const __propDef: {
3
+ props: Record<string, never>;
4
+ events: {
5
+ [evt: string]: CustomEvent<any>;
6
+ };
7
+ slots: {};
8
+ };
9
+ export type ChumBucketProps = typeof __propDef.props;
10
+ export type ChumBucketEvents = typeof __propDef.events;
11
+ export type ChumBucketSlots = typeof __propDef.slots;
12
+ export default class ChumBucket extends SvelteComponent<ChumBucketProps, ChumBucketEvents, ChumBucketSlots> {
13
+ }
14
+ export {};
@@ -18,6 +18,7 @@ import { parseQueryTerms } from "./ParseQueryTerms";
18
18
  import UrlShortenerForm from "./CreateUrlForm.svelte";
19
19
  import PineappleSlideToggle from "../../components/PineappleSlideToggle.svelte";
20
20
  import { Chip } from "../../index";
21
+ import ChumBucket from "./ChumBucket.svelte";
21
22
  export let letChaos = true;
22
23
  export let name = "Turnip";
23
24
  export let email = "turnipxenon@gmail.com";
@@ -318,8 +319,10 @@ $:
318
319
  {/if}
319
320
  {/each}
320
321
 
322
+ <ChumBucket></ChumBucket>
323
+
321
324
  {#if (!letChaos)}
322
- <div aria-hidden="true" style="height: 25vh" />
325
+ <div aria-hidden="true" style="height: 3lh" />
323
326
 
324
327
  <Card>
325
328
  <div slot="content" class="default-card advanced-setting">
@@ -165,6 +165,7 @@ declare module '$env/static/private' {
165
165
  export const PUBLIC: string;
166
166
  export const PWD: string;
167
167
  export const PyCharm: string;
168
+ export const SESSIONNAME: string;
168
169
  export const SHLVL: string;
169
170
  export const SYSTEMDRIVE: string;
170
171
  export const SYSTEMROOT: string;
@@ -357,6 +358,7 @@ declare module '$env/dynamic/private' {
357
358
  PUBLIC: string;
358
359
  PWD: string;
359
360
  PyCharm: string;
361
+ SESSIONNAME: string;
360
362
  SHLVL: string;
361
363
  SYSTEMDRIVE: string;
362
364
  SYSTEMROOT: 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: "sdfwev"
24
+ version_hash: "u4p1xt"
25
25
  };
26
26
 
27
27
  export async function get_hooks() {
@@ -5,6 +5,9 @@
5
5
  "/api/create-url": [
6
6
  "src/routes/api/create-url/+server.ts"
7
7
  ],
8
+ "/api/get-latest-blogs": [
9
+ "src/routes/api/get-latest-blogs/+server.ts"
10
+ ],
8
11
  "/(pineapple)/pineapple/(pineapple)": [
9
12
  "src/routes/(pineapple)/pineapple/(pineapple)/+page.ts"
10
13
  ],
@@ -0,0 +1,10 @@
1
+ import type * as Kit from '@sveltejs/kit';
2
+
3
+ type Expand<T> = T extends infer O ? { [K in keyof O]: O[K] } : never;
4
+ // @ts-ignore
5
+ type MatcherParam<M> = M extends (param : string) => param is infer U ? U extends string ? U : string : string;
6
+ type RouteParams = { };
7
+ type RouteId = '/api/get-latest-blogs';
8
+
9
+ export type RequestHandler = Kit.RequestHandler<RouteParams, RouteId>;
10
+ export type RequestEvent = Kit.RequestEvent<RouteParams, RouteId>;
@@ -0,0 +1 @@
1
+ export declare const GetLatestBlogs: () => Promise<Response>;
@@ -0,0 +1,7 @@
1
+ export const GetLatestBlogs = async () => {
2
+ const resp = await fetch("http://turnipxenon.com/api/get-latest-blogs");
3
+ if (!resp.ok) {
4
+ return new Response(JSON.stringify([]));
5
+ }
6
+ return new Response(JSON.stringify(await resp.json()));
7
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ // noinspection ES6UnusedImports
2
+ import { GetLatestBlogs } from "./GetLatestBlogs";
@@ -9,7 +9,7 @@ export interface PageMeta {
9
9
  * 1. Add the imageID entry to the meta.json for the page
10
10
  * 2. Create a typescript file with the variable ImageMap: Map<string, string>
11
11
  * 3. Add a new entry with your imageID as key, and the image url as the value. Since this is
12
- * Typescript, you can use import ImageUrl from "./path.png" as you would normally do.
12
+ * Typescript, you can use import ImageUrl from "./path.png" as you would normally do.N
13
13
  * 4. Add ImageMap as an argument to your NavigationComponent.
14
14
  * Overall, this involves four files
15
15
  * - Your navigation page: ./+page.svelte
package/dist/index.d.ts CHANGED
@@ -14,3 +14,4 @@ export * from "./components/dialog_manager/DialogUtils";
14
14
  export * from "./types/pineapple_fiber/PortraitType";
15
15
  export * from "./types/pineapple_fiber/DialogDetail";
16
16
  export * from "./util/util";
17
+ export * from "./api/index";
package/dist/index.js CHANGED
@@ -15,3 +15,4 @@ export * from "./components/dialog_manager/DialogUtils";
15
15
  export * from "./types/pineapple_fiber/PortraitType";
16
16
  export * from "./types/pineapple_fiber/DialogDetail";
17
17
  export * from "./util/util";
18
+ export * from "./api/index";
@@ -0,0 +1,72 @@
1
+ <script>import Card from "../../components/Card.svelte";
2
+ import {} from "../..";
3
+ import { onMount } from "svelte";
4
+ let pageMetaList = [];
5
+ const loadPageMeta = async () => {
6
+ fetch("/api/get-latest-blogs").then((resp) => resp.json()).then((json) => {
7
+ pageMetaList = json;
8
+ });
9
+ };
10
+ onMount(() => {
11
+ loadPageMeta();
12
+ });
13
+ </script>
14
+
15
+ <Card>
16
+ <div slot="content" class="chum-bucket">
17
+ <h2>More about me...</h2>
18
+ <p>Check out the latest things I've been rambling about at
19
+ <a href="https://turnipxenon.com" target="_blank">turnipxenon.com</a> or at
20
+ <a href="https://turnipxenon.com/blogs/coding-chagrin" target="_blank">turnipxenon.com/blogs/coding-chagrin.</a>
21
+ </p>
22
+
23
+ {#if pageMetaList.length > 0}
24
+ <h3><b>My latest blogs (sounds too fancy)</b></h3>
25
+ {/if}
26
+
27
+ <div class="chum-bucket-grid">
28
+ {#each pageMetaList as pageMeta}
29
+ <div class="chum-bucket-item">
30
+ {#if pageMeta.imageUrl}
31
+ <img src={`https://turnipxenon.com${pageMeta.imageUrl}`}
32
+ class="chum-bucket-image"
33
+ alt={pageMeta.imageAlt}>
34
+ {/if}
35
+ <div>
36
+ <h3><a href={`https://turnipxenon.com/${pageMeta.relativeLink}`}>{pageMeta.title}</a></h3>
37
+ <p>{pageMeta.description}</p>
38
+ </div>
39
+ </div>
40
+ {/each}
41
+ </div>
42
+ </div>
43
+ </Card>
44
+
45
+ <style>
46
+ .chum-bucket-item {
47
+ width: 100%;
48
+ display: flex;
49
+ flex-direction: row;
50
+ align-items: start;
51
+ }
52
+
53
+ .chum-bucket-image {
54
+ max-width: 10em;
55
+ height: auto;
56
+ margin-top: 0.5em;
57
+ margin-inline-end: 1em;
58
+ }
59
+
60
+
61
+ .chum-bucket {
62
+ padding: 1.5lh 2em;
63
+ max-width: 600px;
64
+ }
65
+
66
+ .chum-bucket-grid {
67
+ display: flex;
68
+ flex-direction: column;
69
+ margin-top: 0.5lh;
70
+ gap: 0.5lh;
71
+ }
72
+ </style>
@@ -0,0 +1,14 @@
1
+ import { SvelteComponent } from "svelte";
2
+ declare const __propDef: {
3
+ props: Record<string, never>;
4
+ events: {
5
+ [evt: string]: CustomEvent<any>;
6
+ };
7
+ slots: {};
8
+ };
9
+ export type ChumBucketProps = typeof __propDef.props;
10
+ export type ChumBucketEvents = typeof __propDef.events;
11
+ export type ChumBucketSlots = typeof __propDef.slots;
12
+ export default class ChumBucket extends SvelteComponent<ChumBucketProps, ChumBucketEvents, ChumBucketSlots> {
13
+ }
14
+ export {};
@@ -18,6 +18,7 @@ import { parseQueryTerms } from "./ParseQueryTerms";
18
18
  import UrlShortenerForm from "./CreateUrlForm.svelte";
19
19
  import PineappleSlideToggle from "../../components/PineappleSlideToggle.svelte";
20
20
  import { Chip } from "../../index";
21
+ import ChumBucket from "./ChumBucket.svelte";
21
22
  export let letChaos = true;
22
23
  export let name = "Turnip";
23
24
  export let email = "turnipxenon@gmail.com";
@@ -318,8 +319,10 @@ $:
318
319
  {/if}
319
320
  {/each}
320
321
 
322
+ <ChumBucket></ChumBucket>
323
+
321
324
  {#if (!letChaos)}
322
- <div aria-hidden="true" style="height: 25vh" />
325
+ <div aria-hidden="true" style="height: 3lh" />
323
326
 
324
327
  <Card>
325
328
  <div slot="content" class="default-card advanced-setting">
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.67",
4
+ "version": "2.4.68",
5
5
  "scripts": {
6
6
  "dev": "vite dev",
7
7
  "build": "vite build && yarn package",
@@ -0,0 +1,7 @@
1
+ export const GetLatestBlogs = async () => {
2
+ const resp = await fetch("http://turnipxenon.com/api/get-latest-blogs");
3
+ if (!resp.ok) {
4
+ return new Response(JSON.stringify([]));
5
+ }
6
+ return new Response(JSON.stringify(await resp.json()));
7
+ };
@@ -0,0 +1,3 @@
1
+ // noinspection ES6UnusedImports
2
+
3
+ import { GetLatestBlogs } from "$pkg/api/GetLatestBlogs";
@@ -12,7 +12,7 @@ export interface PageMeta {
12
12
  * 1. Add the imageID entry to the meta.json for the page
13
13
  * 2. Create a typescript file with the variable ImageMap: Map<string, string>
14
14
  * 3. Add a new entry with your imageID as key, and the image url as the value. Since this is
15
- * Typescript, you can use import ImageUrl from "./path.png" as you would normally do.
15
+ * Typescript, you can use import ImageUrl from "./path.png" as you would normally do.N
16
16
  * 4. Add ImageMap as an argument to your NavigationComponent.
17
17
  * Overall, this involves four files
18
18
  * - Your navigation page: ./+page.svelte
package/src/lib/index.ts CHANGED
@@ -17,3 +17,4 @@ export * from "./components/dialog_manager/DialogUtils";
17
17
  export * from "./types/pineapple_fiber/PortraitType";
18
18
  export * from "./types/pineapple_fiber/DialogDetail";
19
19
  export * from "./util/util";
20
+ export * from "./api/index";
@@ -0,0 +1,75 @@
1
+ <script lang="ts">
2
+ import Card from "$pkg/components/Card.svelte";
3
+ import { type PageMeta } from "$pkg";
4
+ import { onMount } from "svelte";
5
+
6
+ let pageMetaList: PageMeta[] = [];
7
+ const loadPageMeta = async () => {
8
+ fetch("/api/get-latest-blogs").then(resp => resp.json()).then(json => {
9
+ pageMetaList = json as PageMeta[];
10
+ });
11
+ };
12
+
13
+ onMount(() => {
14
+ loadPageMeta();
15
+ });
16
+ </script>
17
+
18
+ <Card>
19
+ <div slot="content" class="chum-bucket">
20
+ <h2>More about me...</h2>
21
+ <p>Check out the latest things I've been rambling about at
22
+ <a href="https://turnipxenon.com" target="_blank">turnipxenon.com</a> or at
23
+ <a href="https://turnipxenon.com/blogs/coding-chagrin" target="_blank">turnipxenon.com/blogs/coding-chagrin.</a>
24
+ </p>
25
+
26
+ {#if pageMetaList.length > 0}
27
+ <h3><b>My latest blogs (sounds too fancy)</b></h3>
28
+ {/if}
29
+
30
+ <div class="chum-bucket-grid">
31
+ {#each pageMetaList as pageMeta}
32
+ <div class="chum-bucket-item">
33
+ {#if pageMeta.imageUrl}
34
+ <img src={`https://turnipxenon.com${pageMeta.imageUrl}`}
35
+ class="chum-bucket-image"
36
+ alt={pageMeta.imageAlt}>
37
+ {/if}
38
+ <div>
39
+ <h3><a href={`https://turnipxenon.com/${pageMeta.relativeLink}`}>{pageMeta.title}</a></h3>
40
+ <p>{pageMeta.description}</p>
41
+ </div>
42
+ </div>
43
+ {/each}
44
+ </div>
45
+ </div>
46
+ </Card>
47
+
48
+ <style lang="postcss">
49
+ .chum-bucket-item {
50
+ width: 100%;
51
+ display: flex;
52
+ flex-direction: row;
53
+ align-items: start;
54
+ }
55
+
56
+ .chum-bucket-image {
57
+ max-width: 10em;
58
+ height: auto;
59
+ margin-top: 0.5em;
60
+ margin-inline-end: 1em;
61
+ }
62
+
63
+
64
+ .chum-bucket {
65
+ padding: 1.5lh 2em;
66
+ max-width: 600px;
67
+ }
68
+
69
+ .chum-bucket-grid {
70
+ display: flex;
71
+ flex-direction: column;
72
+ margin-top: 0.5lh;
73
+ gap: 0.5lh;
74
+ }
75
+ </style>
@@ -22,6 +22,7 @@
22
22
  import UrlShortenerForm from "$pkg/template/seaweed/CreateUrlForm.svelte";
23
23
  import PineappleSlideToggle from "$pkg/components/PineappleSlideToggle.svelte";
24
24
  import { Chip } from "$pkg/index";
25
+ import ChumBucket from "$pkg/template/seaweed/ChumBucket.svelte";
25
26
 
26
27
  export let letChaos = true;
27
28
  export let name = "Turnip";
@@ -379,8 +380,10 @@
379
380
  {/if}
380
381
  {/each}
381
382
 
383
+ <ChumBucket></ChumBucket>
384
+
382
385
  {#if (!letChaos)}
383
- <div aria-hidden="true" style="height: 25vh" />
386
+ <div aria-hidden="true" style="height: 3lh" />
384
387
 
385
388
  <Card>
386
389
  <div slot="content" class="default-card advanced-setting">
@@ -0,0 +1,4 @@
1
+ import type { RequestHandler } from "./$types";
2
+ import { GetLatestBlogs } from "$pkg/api/GetLatestBlogs";
3
+
4
+ export const GET: RequestHandler = GetLatestBlogs;