@turnipxenon/pineapple 2.4.66 → 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.
- package/.idea/workspace.xml +31 -16
- package/.svelte-kit/__package__/api/GetLatestBlogs.d.ts +1 -0
- package/.svelte-kit/__package__/api/GetLatestBlogs.js +7 -0
- package/.svelte-kit/__package__/api/index.d.ts +1 -0
- package/.svelte-kit/__package__/api/index.js +2 -0
- package/.svelte-kit/__package__/components/navigation_component/NavigationComponent.svelte +1 -1
- package/.svelte-kit/__package__/components/navigation_component/NavigationComponent.svelte.d.ts +1 -1
- package/.svelte-kit/__package__/components/navigation_component/PageMeta.d.ts +1 -1
- package/.svelte-kit/__package__/index.d.ts +1 -0
- package/.svelte-kit/__package__/index.js +1 -0
- package/.svelte-kit/__package__/template/seaweed/ChumBucket.svelte +72 -0
- package/.svelte-kit/__package__/template/seaweed/ChumBucket.svelte.d.ts +14 -0
- package/.svelte-kit/__package__/template/seaweed/SeaweedTemplate.svelte +4 -1
- package/.svelte-kit/ambient.d.ts +2 -0
- package/.svelte-kit/generated/server/internal.js +1 -1
- package/.svelte-kit/types/route_meta_data.json +3 -0
- package/.svelte-kit/types/src/routes/api/get-latest-blogs/$types.d.ts +10 -0
- package/dist/api/GetLatestBlogs.d.ts +1 -0
- package/dist/api/GetLatestBlogs.js +7 -0
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.js +2 -0
- package/dist/components/navigation_component/NavigationComponent.svelte +1 -1
- package/dist/components/navigation_component/NavigationComponent.svelte.d.ts +1 -1
- package/dist/components/navigation_component/PageMeta.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/template/seaweed/ChumBucket.svelte +72 -0
- package/dist/template/seaweed/ChumBucket.svelte.d.ts +14 -0
- package/dist/template/seaweed/SeaweedTemplate.svelte +4 -1
- package/package.json +1 -1
- package/src/lib/api/GetLatestBlogs.ts +7 -0
- package/src/lib/api/index.ts +3 -0
- package/src/lib/components/navigation_component/NavigationComponent.svelte +1 -1
- package/src/lib/components/navigation_component/PageMeta.ts +1 -1
- package/src/lib/index.ts +1 -0
- package/src/lib/template/seaweed/ChumBucket.svelte +75 -0
- package/src/lib/template/seaweed/SeaweedTemplate.svelte +4 -1
- package/src/routes/api/get-latest-blogs/+server.ts +4 -0
package/.idea/workspace.xml
CHANGED
|
@@ -4,8 +4,14 @@
|
|
|
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
|
|
8
|
-
<change
|
|
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" />
|
|
9
15
|
</list>
|
|
10
16
|
<option name="SHOW_DIALOG" value="false" />
|
|
11
17
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
@@ -52,10 +58,11 @@
|
|
|
52
58
|
<option value="ComboBoxWithButton" />
|
|
53
59
|
<option value="RandomComponent" />
|
|
54
60
|
<option value="UrlShortenerForm" />
|
|
55
|
-
<option value="TypeScript File" />
|
|
56
61
|
<option value="PineappleSlideToggle" />
|
|
57
62
|
<option value="PostCSS File" />
|
|
58
63
|
<option value="CSS File" />
|
|
64
|
+
<option value="ChumBucket" />
|
|
65
|
+
<option value="TypeScript File" />
|
|
59
66
|
</list>
|
|
60
67
|
</option>
|
|
61
68
|
</component>
|
|
@@ -347,15 +354,15 @@
|
|
|
347
354
|
<workItem from="1712756828446" duration="499000" />
|
|
348
355
|
<workItem from="1712757929028" duration="266000" />
|
|
349
356
|
<workItem from="1712759920412" duration="16000" />
|
|
350
|
-
<workItem from="1712761439292" duration="
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
<
|
|
354
|
-
<
|
|
355
|
-
<
|
|
356
|
-
<
|
|
357
|
-
<
|
|
358
|
-
<
|
|
357
|
+
<workItem from="1712761439292" duration="385000" />
|
|
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" />
|
|
359
366
|
</task>
|
|
360
367
|
<task id="LOCAL-00136" summary="Add resolutions to use Node 20 in Azure SWA GithubActions Reference: https://github.com/Azure/static-web-apps-cli/issues/756#issuecomment-1775748572">
|
|
361
368
|
<option name="closed" value="true" />
|
|
@@ -741,7 +748,15 @@
|
|
|
741
748
|
<option name="project" value="LOCAL" />
|
|
742
749
|
<updated>1712761479941</updated>
|
|
743
750
|
</task>
|
|
744
|
-
<
|
|
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" />
|
|
745
760
|
<servers />
|
|
746
761
|
</component>
|
|
747
762
|
<component name="TypeScriptGeneratedFilesManager">
|
|
@@ -779,7 +794,7 @@
|
|
|
779
794
|
<entry key="branch">
|
|
780
795
|
<value>
|
|
781
796
|
<list>
|
|
782
|
-
<option value="
|
|
797
|
+
<option value="turnip/dev" />
|
|
783
798
|
</list>
|
|
784
799
|
</value>
|
|
785
800
|
</entry>
|
|
@@ -799,7 +814,6 @@
|
|
|
799
814
|
</option>
|
|
800
815
|
</component>
|
|
801
816
|
<component name="VcsManagerConfiguration">
|
|
802
|
-
<MESSAGE value="Fix yarn dependencies" />
|
|
803
817
|
<MESSAGE value="Support swappable group for backwards compatibility" />
|
|
804
818
|
<MESSAGE value="Add back gameSectionFirst behaviour" />
|
|
805
819
|
<MESSAGE value="Delay parsing for query terms after page transformation" />
|
|
@@ -824,6 +838,7 @@
|
|
|
824
838
|
<MESSAGE value="Add border for slider toggle during light mode" />
|
|
825
839
|
<MESSAGE value="WIP attempt to fix slider" />
|
|
826
840
|
<MESSAGE value="Add hideable upper controls for NavigationComponent" />
|
|
827
|
-
<
|
|
841
|
+
<MESSAGE value="Add default value for allowUpperControl in NavigationComponent" />
|
|
842
|
+
<option name="LAST_COMMIT_MESSAGE" value="Add default value for allowUpperControl in NavigationComponent" />
|
|
828
843
|
</component>
|
|
829
844
|
</project>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const GetLatestBlogs: () => Promise<Response>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -7,7 +7,7 @@ export let title = void 0;
|
|
|
7
7
|
export let imageMap = /* @__PURE__ */ new Map();
|
|
8
8
|
export let shouldAllowControl = true;
|
|
9
9
|
export let parentSubpath;
|
|
10
|
-
export let allowUpperControl;
|
|
10
|
+
export let allowUpperControl = true;
|
|
11
11
|
export let compareFn = void 0;
|
|
12
12
|
export let pageSize = 5;
|
|
13
13
|
export let currentIndex = 0;
|
package/.svelte-kit/__package__/components/navigation_component/NavigationComponent.svelte.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ declare const __propDef: {
|
|
|
10
10
|
/**
|
|
11
11
|
* Should include a slash before and after the path
|
|
12
12
|
*/ parentSubpath: string;
|
|
13
|
-
allowUpperControl
|
|
13
|
+
allowUpperControl?: boolean | undefined;
|
|
14
14
|
compareFn?: undefined | ParsePageMetaCompareFn;
|
|
15
15
|
pageSize?: number | undefined;
|
|
16
16
|
currentIndex?: number | undefined;
|
|
@@ -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
|
|
@@ -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:
|
|
325
|
+
<div aria-hidden="true" style="height: 3lh" />
|
|
323
326
|
|
|
324
327
|
<Card>
|
|
325
328
|
<div slot="content" class="default-card advanced-setting">
|
package/.svelte-kit/ambient.d.ts
CHANGED
|
@@ -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: "
|
|
24
|
+
version_hash: "u4p1xt"
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
export async function get_hooks() {
|
|
@@ -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 @@
|
|
|
1
|
+
export {};
|
|
@@ -7,7 +7,7 @@ export let title = void 0;
|
|
|
7
7
|
export let imageMap = /* @__PURE__ */ new Map();
|
|
8
8
|
export let shouldAllowControl = true;
|
|
9
9
|
export let parentSubpath;
|
|
10
|
-
export let allowUpperControl;
|
|
10
|
+
export let allowUpperControl = true;
|
|
11
11
|
export let compareFn = void 0;
|
|
12
12
|
export let pageSize = 5;
|
|
13
13
|
export let currentIndex = 0;
|
|
@@ -10,7 +10,7 @@ declare const __propDef: {
|
|
|
10
10
|
/**
|
|
11
11
|
* Should include a slash before and after the path
|
|
12
12
|
*/ parentSubpath: string;
|
|
13
|
-
allowUpperControl
|
|
13
|
+
allowUpperControl?: boolean | undefined;
|
|
14
14
|
compareFn?: undefined | ParsePageMetaCompareFn;
|
|
15
15
|
pageSize?: number | undefined;
|
|
16
16
|
currentIndex?: number | undefined;
|
|
@@ -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
package/dist/index.js
CHANGED
|
@@ -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:
|
|
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
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* Should include a slash before and after the path
|
|
14
14
|
*/
|
|
15
15
|
export let parentSubpath: string;
|
|
16
|
-
export let allowUpperControl
|
|
16
|
+
export let allowUpperControl = true;
|
|
17
17
|
export let compareFn: undefined | ParsePageMetaCompareFn = undefined;
|
|
18
18
|
export let pageSize = 5;
|
|
19
19
|
export let currentIndex = 0;
|
|
@@ -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
|
@@ -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:
|
|
386
|
+
<div aria-hidden="true" style="height: 3lh" />
|
|
384
387
|
|
|
385
388
|
<Card>
|
|
386
389
|
<div slot="content" class="default-card advanced-setting">
|