@turnipxenon/pineapple 2.4.77 → 2.4.79
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/.gitignore +2 -0
- package/.idea/workspace.xml +65 -55
- package/.svelte-kit/__package__/components/blog_template/BlogTemplate.svelte +44 -0
- package/.svelte-kit/__package__/components/blog_template/BlogTemplate.svelte.d.ts +20 -0
- package/.svelte-kit/__package__/components/blog_template/blog-template.css +7 -0
- package/.svelte-kit/__package__/components/index.d.ts +1 -0
- package/.svelte-kit/__package__/components/index.js +1 -0
- package/.svelte-kit/__package__/components/navigation_component/PageMeta.d.ts +37 -0
- package/.svelte-kit/__package__/components/overrideable_meta/OverridableMetaProps.d.ts +2 -0
- package/.svelte-kit/ambient.d.ts +4 -0
- package/.svelte-kit/generated/server/internal.js +1 -1
- package/dist/components/blog_template/BlogTemplate.svelte +44 -0
- package/dist/components/blog_template/BlogTemplate.svelte.d.ts +20 -0
- package/dist/components/blog_template/blog-template.css +7 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/navigation_component/PageMeta.d.ts +37 -0
- package/dist/components/overrideable_meta/OverridableMetaProps.d.ts +2 -0
- package/package.json +1 -1
- package/src/lib/components/blog_template/BlogTemplate.svelte +47 -0
- package/src/lib/components/blog_template/blog-template.css +7 -0
- package/src/lib/components/index.ts +1 -0
- package/src/lib/components/navigation_component/PageMeta.ts +43 -0
- package/src/lib/components/overrideable_meta/OverridableMetaProps.ts +2 -0
- package/src/routes/(pineapple)/pineapple/(extra-pages)/page1/+page.svelte +8 -5
- package/src/routes/(pineapple)/pineapple/(extra-pages)/page2/+page.svelte +6 -5
- package/src/routes/(pineapple)/pineapple/(extra-pages)/page3/page5/+page.svelte +6 -5
- package/vite.config.ts +1 -1
- package/docs/Workflow.md +0 -5
package/.gitignore
CHANGED
package/.idea/workspace.xml
CHANGED
|
@@ -4,10 +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="Changes" comment="
|
|
8
|
-
<change
|
|
9
|
-
<change beforePath="$PROJECT_DIR
|
|
10
|
-
<change beforePath="$PROJECT_DIR$/src/
|
|
7
|
+
<list default="true" id="accb6ba2-c343-4f84-ad30-6e2d71eceee5" name="Changes" comment="Add BlogTemplate">
|
|
8
|
+
<change afterPath="$PROJECT_DIR$/src/lib/components/blog_template/blog-template.css" afterDir="false" />
|
|
9
|
+
<change beforePath="$PROJECT_DIR$/.gitignore" beforeDir="false" afterPath="$PROJECT_DIR$/.gitignore" afterDir="false" />
|
|
10
|
+
<change beforePath="$PROJECT_DIR$/src/lib/components/BlogTemplate.svelte" beforeDir="false" afterPath="$PROJECT_DIR$/src/lib/components/blog_template/BlogTemplate.svelte" afterDir="false" />
|
|
11
|
+
<change beforePath="$PROJECT_DIR$/src/lib/components/index.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/lib/components/index.ts" afterDir="false" />
|
|
12
|
+
<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" />
|
|
13
|
+
<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" />
|
|
14
|
+
<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" />
|
|
11
15
|
</list>
|
|
12
16
|
<option name="SHOW_DIALOG" value="false" />
|
|
13
17
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
@@ -56,10 +60,11 @@
|
|
|
56
60
|
<option value="UrlShortenerForm" />
|
|
57
61
|
<option value="PineappleSlideToggle" />
|
|
58
62
|
<option value="PostCSS File" />
|
|
59
|
-
<option value="CSS File" />
|
|
60
63
|
<option value="ChumBucket" />
|
|
61
64
|
<option value="WorkExperience" />
|
|
62
65
|
<option value="TypeScript File" />
|
|
66
|
+
<option value="BlogTemplate" />
|
|
67
|
+
<option value="CSS File" />
|
|
63
68
|
</list>
|
|
64
69
|
</option>
|
|
65
70
|
</component>
|
|
@@ -114,34 +119,34 @@
|
|
|
114
119
|
<option name="hideEmptyMiddlePackages" value="true" />
|
|
115
120
|
<option name="showLibraryContents" value="true" />
|
|
116
121
|
</component>
|
|
117
|
-
<component name="PropertiesComponent"
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
122
|
+
<component name="PropertiesComponent">{
|
|
123
|
+
"keyToString": {
|
|
124
|
+
"DefaultHtmlFileTemplate": "HTML File",
|
|
125
|
+
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
|
126
|
+
"RunOnceActivity.ShowReadmeOnStart": "true",
|
|
127
|
+
"WebServerToolWindowFactoryState": "false",
|
|
128
|
+
"git-widget-placeholder": "turnip/dev",
|
|
129
|
+
"ignore.virus.scanning.warn.message": "true",
|
|
130
|
+
"last_opened_file_path": "C:/Users/Pumpkin/Projects/Web/pineapple/src/lib",
|
|
131
|
+
"list.type.of.created.stylesheet": "CSS",
|
|
132
|
+
"node.js.detected.package.eslint": "true",
|
|
133
|
+
"node.js.detected.package.tslint": "true",
|
|
134
|
+
"node.js.selected.package.eslint": "(autodetect)",
|
|
135
|
+
"node.js.selected.package.tslint": "(autodetect)",
|
|
136
|
+
"nodejs_interpreter_path": "node",
|
|
137
|
+
"nodejs_package_manager_path": "yarn",
|
|
138
|
+
"npm.build.executor": "Run",
|
|
139
|
+
"npm.dev (1).executor": "Run",
|
|
140
|
+
"npm.dev --open.executor": "Run",
|
|
141
|
+
"npm.dev offline.executor": "Run",
|
|
142
|
+
"npm.dev-offline.executor": "Run",
|
|
143
|
+
"npm.dev.executor": "Run",
|
|
144
|
+
"npm.to-dev.executor": "Run",
|
|
145
|
+
"settings.editor.selected.configurable": "settings.sync",
|
|
146
|
+
"ts.external.directory.path": "C:\\Users\\Pumpkin\\Projects\\Web\\pineapple\\node_modules\\typescript\\lib",
|
|
147
|
+
"vue.rearranger.settings.migration": "true"
|
|
143
148
|
}
|
|
144
|
-
}
|
|
149
|
+
}</component>
|
|
145
150
|
<component name="RecentsManager">
|
|
146
151
|
<key name="CopyFile.RECENT_KEYS">
|
|
147
152
|
<recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\lib" />
|
|
@@ -151,11 +156,11 @@
|
|
|
151
156
|
<recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\lib\template\seaweed" />
|
|
152
157
|
</key>
|
|
153
158
|
<key name="MoveFile.RECENT_KEYS">
|
|
159
|
+
<recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\lib\components\blog_template" />
|
|
154
160
|
<recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\lib\components\pineapple-slide-toggle" />
|
|
155
161
|
<recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\lib\components\chip" />
|
|
156
162
|
<recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\lib\components\combo_box" />
|
|
157
163
|
<recent name="C:\Users\Pumpkin\Projects\Web\pineapple\docs\archive" />
|
|
158
|
-
<recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\routes\(pineapple)\pineapple\(pineapple)" />
|
|
159
164
|
</key>
|
|
160
165
|
<key name="es6.move.members.recent.items">
|
|
161
166
|
<recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\routes\types\RootLayoutProps.ts" />
|
|
@@ -214,7 +219,7 @@
|
|
|
214
219
|
<component name="SharedIndexes">
|
|
215
220
|
<attachedChunks>
|
|
216
221
|
<set>
|
|
217
|
-
<option value="bundled-js-predefined-1d06a55b98c1-
|
|
222
|
+
<option value="bundled-js-predefined-1d06a55b98c1-2e7d6887c066-JavaScript-WS-241.15989.47" />
|
|
218
223
|
</set>
|
|
219
224
|
</attachedChunks>
|
|
220
225
|
</component>
|
|
@@ -383,23 +388,12 @@
|
|
|
383
388
|
<workItem from="1713055651151" duration="721000" />
|
|
384
389
|
<workItem from="1713056429943" duration="1789000" />
|
|
385
390
|
<workItem from="1713062148811" duration="58000" />
|
|
386
|
-
<workItem from="1713062548290" duration="
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
<
|
|
390
|
-
<
|
|
391
|
-
<
|
|
392
|
-
<option name="presentableId" value="LOCAL-00152" />
|
|
393
|
-
<option name="project" value="LOCAL" />
|
|
394
|
-
<updated>1712422241298</updated>
|
|
395
|
-
</task>
|
|
396
|
-
<task id="LOCAL-00153" summary="Extract EntryOrderConfig">
|
|
397
|
-
<option name="closed" value="true" />
|
|
398
|
-
<created>1712425281616</created>
|
|
399
|
-
<option name="number" value="00153" />
|
|
400
|
-
<option name="presentableId" value="LOCAL-00153" />
|
|
401
|
-
<option name="project" value="LOCAL" />
|
|
402
|
-
<updated>1712425281616</updated>
|
|
391
|
+
<workItem from="1713062548290" duration="4767000" />
|
|
392
|
+
<workItem from="1713067631329" duration="264000" />
|
|
393
|
+
<workItem from="1714244359244" duration="372000" />
|
|
394
|
+
<workItem from="1714252762932" duration="11000" />
|
|
395
|
+
<workItem from="1714365775212" duration="2408000" />
|
|
396
|
+
<workItem from="1714368490566" duration="433000" />
|
|
403
397
|
</task>
|
|
404
398
|
<task id="LOCAL-00154" summary="Add group swapping">
|
|
405
399
|
<option name="closed" value="true" />
|
|
@@ -777,7 +771,23 @@
|
|
|
777
771
|
<option name="project" value="LOCAL" />
|
|
778
772
|
<updated>1713065902296</updated>
|
|
779
773
|
</task>
|
|
780
|
-
<
|
|
774
|
+
<task id="LOCAL-00201" summary="Extract GetEntryGlobal functions">
|
|
775
|
+
<option name="closed" value="true" />
|
|
776
|
+
<created>1713066999084</created>
|
|
777
|
+
<option name="number" value="00201" />
|
|
778
|
+
<option name="presentableId" value="LOCAL-00201" />
|
|
779
|
+
<option name="project" value="LOCAL" />
|
|
780
|
+
<updated>1713066999084</updated>
|
|
781
|
+
</task>
|
|
782
|
+
<task id="LOCAL-00202" summary="Add BlogTemplate">
|
|
783
|
+
<option name="closed" value="true" />
|
|
784
|
+
<created>1714367982542</created>
|
|
785
|
+
<option name="number" value="00202" />
|
|
786
|
+
<option name="presentableId" value="LOCAL-00202" />
|
|
787
|
+
<option name="project" value="LOCAL" />
|
|
788
|
+
<updated>1714367982542</updated>
|
|
789
|
+
</task>
|
|
790
|
+
<option name="localTasksCounter" value="203" />
|
|
781
791
|
<servers />
|
|
782
792
|
</component>
|
|
783
793
|
<component name="TypeScriptGeneratedFilesManager">
|
|
@@ -835,8 +845,6 @@
|
|
|
835
845
|
</option>
|
|
836
846
|
</component>
|
|
837
847
|
<component name="VcsManagerConfiguration">
|
|
838
|
-
<MESSAGE value="Fix pkg import for Chip" />
|
|
839
|
-
<MESSAGE value="Extract tailwind css utility class to local-chip" />
|
|
840
848
|
<MESSAGE value="Fix chip issue in Advanced Settings" />
|
|
841
849
|
<MESSAGE value="Remove tailwind reliance on Chip" />
|
|
842
850
|
<MESSAGE value="Add border for slider toggle during light mode" />
|
|
@@ -860,6 +868,8 @@
|
|
|
860
868
|
<MESSAGE value="Fix exports" />
|
|
861
869
|
<MESSAGE value="Fix shouldAddFunNote reactivity" />
|
|
862
870
|
<MESSAGE value="Remove unused components" />
|
|
863
|
-
<
|
|
871
|
+
<MESSAGE value="Extract GetEntryGlobal functions" />
|
|
872
|
+
<MESSAGE value="Add BlogTemplate" />
|
|
873
|
+
<option name="LAST_COMMIT_MESSAGE" value="Add BlogTemplate" />
|
|
864
874
|
</component>
|
|
865
875
|
</project>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<script>import { Card } from "../..";
|
|
2
|
+
import "./blog-template.css";
|
|
3
|
+
export let pageMeta;
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<Card>
|
|
7
|
+
<div slot="content" class="default-card">
|
|
8
|
+
<article>
|
|
9
|
+
<hgroup>
|
|
10
|
+
{#if pageMeta.title}
|
|
11
|
+
<h1>{pageMeta.title}</h1>
|
|
12
|
+
{/if}
|
|
13
|
+
{#if pageMeta.datePublished}
|
|
14
|
+
<p>Published: {pageMeta.datePublished}</p>
|
|
15
|
+
{/if}
|
|
16
|
+
{#if pageMeta.lastUpdated}
|
|
17
|
+
<p>Last updated: {pageMeta.lastUpdated}</p>
|
|
18
|
+
{/if}
|
|
19
|
+
{#if pageMeta.tags.length > 0}
|
|
20
|
+
<section id="article-tags">
|
|
21
|
+
Tags:
|
|
22
|
+
{#each pageMeta.tags as tag}
|
|
23
|
+
<span class="badge variant-filled">{tag}</span>
|
|
24
|
+
{/each}
|
|
25
|
+
</section>
|
|
26
|
+
{/if}
|
|
27
|
+
</hgroup>
|
|
28
|
+
|
|
29
|
+
<div class="article-content">
|
|
30
|
+
<slot />
|
|
31
|
+
</div>
|
|
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>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { type SimplePageMeta } from "../..";
|
|
3
|
+
import "./blog-template.css";
|
|
4
|
+
declare const __propDef: {
|
|
5
|
+
props: {
|
|
6
|
+
pageMeta: SimplePageMeta;
|
|
7
|
+
};
|
|
8
|
+
events: {
|
|
9
|
+
[evt: string]: CustomEvent<any>;
|
|
10
|
+
};
|
|
11
|
+
slots: {
|
|
12
|
+
default: {};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export type BlogTemplateProps = typeof __propDef.props;
|
|
16
|
+
export type BlogTemplateEvents = typeof __propDef.events;
|
|
17
|
+
export type BlogTemplateSlots = typeof __propDef.slots;
|
|
18
|
+
export default class BlogTemplate extends SvelteComponent<BlogTemplateProps, BlogTemplateEvents, BlogTemplateSlots> {
|
|
19
|
+
}
|
|
20
|
+
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 "./blog_template/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 "./blog_template/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
|
package/.svelte-kit/ambient.d.ts
CHANGED
|
@@ -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: "
|
|
24
|
+
version_hash: "1a7ldx1"
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
export async function get_hooks() {
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<script>import { Card } from "../..";
|
|
2
|
+
import "./blog-template.css";
|
|
3
|
+
export let pageMeta;
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<Card>
|
|
7
|
+
<div slot="content" class="default-card">
|
|
8
|
+
<article>
|
|
9
|
+
<hgroup>
|
|
10
|
+
{#if pageMeta.title}
|
|
11
|
+
<h1>{pageMeta.title}</h1>
|
|
12
|
+
{/if}
|
|
13
|
+
{#if pageMeta.datePublished}
|
|
14
|
+
<p>Published: {pageMeta.datePublished}</p>
|
|
15
|
+
{/if}
|
|
16
|
+
{#if pageMeta.lastUpdated}
|
|
17
|
+
<p>Last updated: {pageMeta.lastUpdated}</p>
|
|
18
|
+
{/if}
|
|
19
|
+
{#if pageMeta.tags.length > 0}
|
|
20
|
+
<section id="article-tags">
|
|
21
|
+
Tags:
|
|
22
|
+
{#each pageMeta.tags as tag}
|
|
23
|
+
<span class="badge variant-filled">{tag}</span>
|
|
24
|
+
{/each}
|
|
25
|
+
</section>
|
|
26
|
+
{/if}
|
|
27
|
+
</hgroup>
|
|
28
|
+
|
|
29
|
+
<div class="article-content">
|
|
30
|
+
<slot />
|
|
31
|
+
</div>
|
|
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>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
import { type SimplePageMeta } from "../..";
|
|
3
|
+
import "./blog-template.css";
|
|
4
|
+
declare const __propDef: {
|
|
5
|
+
props: {
|
|
6
|
+
pageMeta: SimplePageMeta;
|
|
7
|
+
};
|
|
8
|
+
events: {
|
|
9
|
+
[evt: string]: CustomEvent<any>;
|
|
10
|
+
};
|
|
11
|
+
slots: {
|
|
12
|
+
default: {};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export type BlogTemplateProps = typeof __propDef.props;
|
|
16
|
+
export type BlogTemplateEvents = typeof __propDef.events;
|
|
17
|
+
export type BlogTemplateSlots = typeof __propDef.slots;
|
|
18
|
+
export default class BlogTemplate extends SvelteComponent<BlogTemplateProps, BlogTemplateEvents, BlogTemplateSlots> {
|
|
19
|
+
}
|
|
20
|
+
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 "./blog_template/BlogTemplate.svelte";
|
package/dist/components/index.js
CHANGED
|
@@ -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 "./blog_template/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
|
package/package.json
CHANGED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Card, type SimplePageMeta } from "$pkg";
|
|
3
|
+
import "./blog-template.css";
|
|
4
|
+
|
|
5
|
+
// grab page meta from the adjacent meta.json
|
|
6
|
+
export let pageMeta: SimplePageMeta;
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<Card>
|
|
10
|
+
<div slot="content" class="default-card">
|
|
11
|
+
<article>
|
|
12
|
+
<hgroup>
|
|
13
|
+
{#if pageMeta.title}
|
|
14
|
+
<h1>{pageMeta.title}</h1>
|
|
15
|
+
{/if}
|
|
16
|
+
{#if pageMeta.datePublished}
|
|
17
|
+
<p>Published: {pageMeta.datePublished}</p>
|
|
18
|
+
{/if}
|
|
19
|
+
{#if pageMeta.lastUpdated}
|
|
20
|
+
<p>Last updated: {pageMeta.lastUpdated}</p>
|
|
21
|
+
{/if}
|
|
22
|
+
{#if pageMeta.tags.length > 0}
|
|
23
|
+
<section id="article-tags">
|
|
24
|
+
Tags:
|
|
25
|
+
{#each pageMeta.tags as tag}
|
|
26
|
+
<span class="badge variant-filled">{tag}</span>
|
|
27
|
+
{/each}
|
|
28
|
+
</section>
|
|
29
|
+
{/if}
|
|
30
|
+
</hgroup>
|
|
31
|
+
|
|
32
|
+
<div class="article-content">
|
|
33
|
+
<slot />
|
|
34
|
+
</div>
|
|
35
|
+
</article>
|
|
36
|
+
</div>
|
|
37
|
+
</Card>
|
|
38
|
+
|
|
39
|
+
<style>
|
|
40
|
+
hgroup {
|
|
41
|
+
margin-bottom: 1lh;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.badge {
|
|
45
|
+
margin-inline-end: 0.5em;
|
|
46
|
+
}
|
|
47
|
+
</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 "./blog_template/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
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import pageMeta from "./meta.json";
|
|
3
3
|
import { page } from "$app/stores";
|
|
4
|
+
import BlogTemplate from "$pkg/components/blog_template/BlogTemplate.svelte";
|
|
4
5
|
</script>
|
|
5
6
|
|
|
6
|
-
<
|
|
7
|
-
<
|
|
8
|
-
</
|
|
7
|
+
<BlogTemplate pageMeta={pageMeta}>
|
|
8
|
+
<p>{$page.url}</p>
|
|
9
|
+
<p>Testing paragraph</p>
|
|
10
|
+
<p>Another one</p>
|
|
11
|
+
</BlogTemplate>
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import pageMeta from "./meta.json";
|
|
3
3
|
import { page } from "$app/stores";
|
|
4
|
+
import BlogTemplate from "$pkg/components/blog_template/BlogTemplate.svelte";
|
|
4
5
|
</script>
|
|
5
6
|
|
|
6
|
-
<
|
|
7
|
-
<
|
|
8
|
-
</
|
|
7
|
+
<BlogTemplate pageMeta={pageMeta}>
|
|
8
|
+
<p>{$page.url}</p>
|
|
9
|
+
</BlogTemplate>
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
import
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import pageMeta from "./meta.json";
|
|
3
3
|
import { page } from "$app/stores";
|
|
4
|
+
import BlogTemplate from "$pkg/components/blog_template/BlogTemplate.svelte";
|
|
4
5
|
</script>
|
|
5
6
|
|
|
6
|
-
<
|
|
7
|
-
<
|
|
8
|
-
</
|
|
7
|
+
<BlogTemplate pageMeta={pageMeta}>
|
|
8
|
+
<p>{$page.url}</p>
|
|
9
|
+
</BlogTemplate>
|
package/vite.config.ts
CHANGED