@turnipxenon/pineapple 2.4.34 → 2.4.36
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 +55 -51
- package/.svelte-kit/__package__/components/navigation_component/NavigationComponent.svelte +40 -18
- package/.svelte-kit/__package__/components/navigation_component/PageMeta.d.ts +1 -1
- package/.svelte-kit/__package__/components/navigation_component/PageMeta.js +8 -14
- package/.svelte-kit/generated/server/internal.js +1 -1
- package/dist/components/navigation_component/NavigationComponent.svelte +40 -18
- package/dist/components/navigation_component/PageMeta.d.ts +1 -1
- package/dist/components/navigation_component/PageMeta.js +8 -14
- package/package.json +1 -1
- package/src/lib/components/navigation_component/NavigationComponent.svelte +39 -17
- package/src/lib/components/navigation_component/PageMeta.ts +8 -12
- package/src/routes/(pineapple)/pineapple/(extra-pages)/page1/meta.json +14 -4
- package/src/routes/(pineapple)/pineapple/(extra-pages)/page3/page5/meta.json +7 -0
- package/src/routes/(pineapple)/pineapple/(extra-pages)/page3/page7/(test_layout)/page8/meta.json +7 -0
package/.idea/workspace.xml
CHANGED
|
@@ -4,10 +4,11 @@
|
|
|
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="
|
|
7
|
+
<list default="true" id="accb6ba2-c343-4f84-ad30-6e2d71eceee5" name="Changes" comment="Fix NavigationComponent styling">
|
|
8
|
+
<change afterPath="$PROJECT_DIR$/src/routes/(pineapple)/pineapple/(extra-pages)/page3/page5/meta.json" afterDir="false" />
|
|
9
|
+
<change afterPath="$PROJECT_DIR$/src/routes/(pineapple)/pineapple/(extra-pages)/page3/page7/(test_layout)/page8/meta.json" afterDir="false" />
|
|
8
10
|
<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" />
|
|
9
11
|
<change beforePath="$PROJECT_DIR$/src/routes/(pineapple)/pineapple/(extra-pages)/page1/meta.json" beforeDir="false" afterPath="$PROJECT_DIR$/src/routes/(pineapple)/pineapple/(extra-pages)/page1/meta.json" afterDir="false" />
|
|
10
|
-
<change beforePath="$PROJECT_DIR$/src/routes/(pineapple)/pineapple/(extra-pages)/page2/meta.json" beforeDir="false" afterPath="$PROJECT_DIR$/src/routes/(pineapple)/pineapple/(extra-pages)/page2/meta.json" afterDir="false" />
|
|
11
12
|
</list>
|
|
12
13
|
<option name="SHOW_DIALOG" value="false" />
|
|
13
14
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
|
@@ -86,40 +87,40 @@
|
|
|
86
87
|
<option name="hideEmptyMiddlePackages" value="true" />
|
|
87
88
|
<option name="showLibraryContents" value="true" />
|
|
88
89
|
</component>
|
|
89
|
-
<component name="PropertiesComponent"
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
90
|
+
<component name="PropertiesComponent"><![CDATA[{
|
|
91
|
+
"keyToString": {
|
|
92
|
+
"DefaultHtmlFileTemplate": "HTML File",
|
|
93
|
+
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
|
94
|
+
"RunOnceActivity.ShowReadmeOnStart": "true",
|
|
95
|
+
"WebServerToolWindowFactoryState": "false",
|
|
96
|
+
"git-widget-placeholder": "turnip/navigation",
|
|
97
|
+
"ignore.virus.scanning.warn.message": "true",
|
|
98
|
+
"last_opened_file_path": "C:/Users/Pumpkin/Projects/Web/pineapple/src/routes/(pineapple)/pineapple/(extra-pages)/page3/page7/(test_layout)/page8",
|
|
99
|
+
"list.type.of.created.stylesheet": "CSS",
|
|
100
|
+
"node.js.detected.package.eslint": "true",
|
|
101
|
+
"node.js.detected.package.tslint": "true",
|
|
102
|
+
"node.js.selected.package.eslint": "(autodetect)",
|
|
103
|
+
"node.js.selected.package.tslint": "(autodetect)",
|
|
104
|
+
"nodejs_interpreter_path": "node",
|
|
105
|
+
"nodejs_package_manager_path": "yarn",
|
|
106
|
+
"npm.build.executor": "Run",
|
|
107
|
+
"npm.dev (1).executor": "Run",
|
|
108
|
+
"npm.dev --open.executor": "Run",
|
|
109
|
+
"npm.dev offline.executor": "Run",
|
|
110
|
+
"npm.dev-offline.executor": "Run",
|
|
111
|
+
"npm.dev.executor": "Run",
|
|
112
|
+
"settings.editor.selected.configurable": "preferences.pluginManager",
|
|
113
|
+
"ts.external.directory.path": "C:\\Users\\Pumpkin\\Projects\\Web\\pineapple\\node_modules\\typescript\\lib",
|
|
114
|
+
"vue.rearranger.settings.migration": "true"
|
|
114
115
|
}
|
|
115
|
-
}
|
|
116
|
+
}]]></component>
|
|
116
117
|
<component name="RecentsManager">
|
|
117
118
|
<key name="CopyFile.RECENT_KEYS">
|
|
119
|
+
<recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\routes\(pineapple)\pineapple\(extra-pages)\page3\page7\(test_layout)\page8" />
|
|
120
|
+
<recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\routes\(pineapple)\pineapple\(extra-pages)\page3\page5" />
|
|
118
121
|
<recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\routes\(pineapple)\pineapple\(extra-pages)\page2" />
|
|
119
122
|
<recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\lib\components\navigation_component" />
|
|
120
123
|
<recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\routes\(pineapple)\pineapple\page3\page7\(test_layout)\page8" />
|
|
121
|
-
<recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\routes\(pineapple)\pineapple\page3\page7" />
|
|
122
|
-
<recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\routes\(pineapple)\pineapple\page3" />
|
|
123
124
|
</key>
|
|
124
125
|
<key name="MoveFile.RECENT_KEYS">
|
|
125
126
|
<recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\routes\(pineapple)\pineapple\(extra-pages)\page1" />
|
|
@@ -246,23 +247,10 @@
|
|
|
246
247
|
<workItem from="1711488375110" duration="856000" />
|
|
247
248
|
<workItem from="1711490061858" duration="2823000" />
|
|
248
249
|
<workItem from="1711492999560" duration="85000" />
|
|
249
|
-
<workItem from="1711493260312" duration="
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
<
|
|
253
|
-
<created>1710376338512</created>
|
|
254
|
-
<option name="number" value="00062" />
|
|
255
|
-
<option name="presentableId" value="LOCAL-00062" />
|
|
256
|
-
<option name="project" value="LOCAL" />
|
|
257
|
-
<updated>1710376338512</updated>
|
|
258
|
-
</task>
|
|
259
|
-
<task id="LOCAL-00063" summary="Add animation to dynamically added button in social section">
|
|
260
|
-
<option name="closed" value="true" />
|
|
261
|
-
<created>1710403640565</created>
|
|
262
|
-
<option name="number" value="00063" />
|
|
263
|
-
<option name="presentableId" value="LOCAL-00063" />
|
|
264
|
-
<option name="project" value="LOCAL" />
|
|
265
|
-
<updated>1710403640566</updated>
|
|
250
|
+
<workItem from="1711493260312" duration="1518000" />
|
|
251
|
+
<workItem from="1711494820779" duration="11000" />
|
|
252
|
+
<workItem from="1711495822479" duration="2695000" />
|
|
253
|
+
<workItem from="1711499095557" duration="657000" />
|
|
266
254
|
</task>
|
|
267
255
|
<task id="LOCAL-00064" summary="Implement normal state for PineappleBaseLayout">
|
|
268
256
|
<option name="closed" value="true" />
|
|
@@ -640,7 +628,23 @@
|
|
|
640
628
|
<option name="project" value="LOCAL" />
|
|
641
629
|
<updated>1711492747331</updated>
|
|
642
630
|
</task>
|
|
643
|
-
<
|
|
631
|
+
<task id="LOCAL-00111" summary="Add default sorter for NavigationComponent">
|
|
632
|
+
<option name="closed" value="true" />
|
|
633
|
+
<created>1711494655396</created>
|
|
634
|
+
<option name="number" value="00111" />
|
|
635
|
+
<option name="presentableId" value="LOCAL-00111" />
|
|
636
|
+
<option name="project" value="LOCAL" />
|
|
637
|
+
<updated>1711494655396</updated>
|
|
638
|
+
</task>
|
|
639
|
+
<task id="LOCAL-00112" summary="Fix NavigationComponent styling">
|
|
640
|
+
<option name="closed" value="true" />
|
|
641
|
+
<created>1711498416272</created>
|
|
642
|
+
<option name="number" value="00112" />
|
|
643
|
+
<option name="presentableId" value="LOCAL-00112" />
|
|
644
|
+
<option name="project" value="LOCAL" />
|
|
645
|
+
<updated>1711498416272</updated>
|
|
646
|
+
</task>
|
|
647
|
+
<option name="localTasksCounter" value="113" />
|
|
644
648
|
<servers />
|
|
645
649
|
</component>
|
|
646
650
|
<component name="TypeScriptGeneratedFilesManager">
|
|
@@ -698,8 +702,6 @@
|
|
|
698
702
|
</option>
|
|
699
703
|
</component>
|
|
700
704
|
<component name="VcsManagerConfiguration">
|
|
701
|
-
<MESSAGE value="Add external link warning stub" />
|
|
702
|
-
<MESSAGE value="Refactor Game Section to separate component" />
|
|
703
705
|
<MESSAGE value="Refactor GameSection out of SeaweedTemplate" />
|
|
704
706
|
<MESSAGE value="Remove unnecessary imports and variables in SeaweedTemplate" />
|
|
705
707
|
<MESSAGE value="Add page query param creator" />
|
|
@@ -723,6 +725,8 @@
|
|
|
723
725
|
<MESSAGE value="Export NavigationComponent" />
|
|
724
726
|
<MESSAGE value="Add a way to hide an entry in NavigationComponent" />
|
|
725
727
|
<MESSAGE value="Migrate from relying on json instead of comments for meta" />
|
|
726
|
-
<
|
|
728
|
+
<MESSAGE value="Add default sorter for NavigationComponent" />
|
|
729
|
+
<MESSAGE value="Fix NavigationComponent styling" />
|
|
730
|
+
<option name="LAST_COMMIT_MESSAGE" value="Fix NavigationComponent styling" />
|
|
727
731
|
</component>
|
|
728
732
|
</project>
|
|
@@ -35,7 +35,8 @@ $:
|
|
|
35
35
|
title={fullPath}
|
|
36
36
|
on:click={createGoToFunction(fullPath)}>
|
|
37
37
|
{#if pageMeta.imageUrl}
|
|
38
|
-
<img src={pageMeta.imageUrl}
|
|
38
|
+
<img src={pageMeta.imageUrl}
|
|
39
|
+
alt={pageMeta.imageAlt ?? "placeholder alt text please replace me or report me!"} />
|
|
39
40
|
{/if}
|
|
40
41
|
<section class="blurb-text">
|
|
41
42
|
<h2>{pageMeta.title}</h2>
|
|
@@ -44,7 +45,7 @@ $:
|
|
|
44
45
|
Tags:
|
|
45
46
|
{#if (pageMeta.tags && pageMeta.tags.length !== 0)}
|
|
46
47
|
{#each pageMeta.tags as tagValue}
|
|
47
|
-
<span class="badge variant-filled">{tagValue}</span>
|
|
48
|
+
<span class="badge variant-filled tag-container">{tagValue}</span>
|
|
48
49
|
{/each}
|
|
49
50
|
{:else}
|
|
50
51
|
None
|
|
@@ -67,28 +68,27 @@ $:
|
|
|
67
68
|
</div>
|
|
68
69
|
|
|
69
70
|
<style>
|
|
70
|
-
|
|
71
|
-
height: 20em;
|
|
72
|
-
width: 20em;
|
|
73
|
-
-o-object-fit: cover;
|
|
74
|
-
object-fit: cover;
|
|
75
|
-
padding: var(--theme-border-base);
|
|
76
|
-
border-radius: var(--theme-rounded-container) 0 0 var(--theme-rounded-container);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
@media (max-width: 50rem) {
|
|
71
|
+
@media (max-width: 800px) {
|
|
80
72
|
img {
|
|
81
73
|
max-height: 20rem;
|
|
82
74
|
width: 100%;
|
|
83
75
|
flex-basis: 100%;
|
|
84
76
|
border-radius: var(--theme-rounded-container) var(--theme-rounded-container) 0 0;
|
|
85
77
|
}
|
|
78
|
+
|
|
79
|
+
.navigation-element {
|
|
80
|
+
flex-direction: column;
|
|
81
|
+
}
|
|
86
82
|
}
|
|
87
83
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
84
|
+
@media (min-width: 801px) {
|
|
85
|
+
.navigation-element {
|
|
86
|
+
flex-direction: row;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
img {
|
|
90
|
+
width: 20em;
|
|
91
|
+
}
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
.dark .navigation-element {
|
|
@@ -210,22 +210,44 @@ $:
|
|
|
210
210
|
|
|
211
211
|
.navigation-element {
|
|
212
212
|
display: flex;
|
|
213
|
-
flex-
|
|
213
|
+
/*flex-direction: row;*/
|
|
214
214
|
text-align: start;
|
|
215
|
+
align-items: flex-start;
|
|
215
216
|
padding: 0;
|
|
216
217
|
}
|
|
217
218
|
|
|
219
|
+
img {
|
|
220
|
+
height: 20em;
|
|
221
|
+
-o-object-fit: cover;
|
|
222
|
+
object-fit: cover;
|
|
223
|
+
padding: var(--theme-border-base);
|
|
224
|
+
border-radius: var(--theme-rounded-container) 0 0 var(--theme-rounded-container);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.navigation-component {
|
|
228
|
+
display: flex;
|
|
229
|
+
flex-direction: column;
|
|
230
|
+
gap: 2em;
|
|
231
|
+
}
|
|
232
|
+
|
|
218
233
|
.navigation-title {
|
|
219
234
|
text-align: center;
|
|
220
235
|
}
|
|
221
236
|
|
|
222
237
|
.blurb-text {
|
|
223
|
-
flex: 1;
|
|
224
238
|
padding: 2em;
|
|
239
|
+
flex-grow: 1;
|
|
240
|
+
white-space: initial;
|
|
241
|
+
min-width: 0;
|
|
225
242
|
}
|
|
226
243
|
|
|
227
244
|
.navigation-wrapper {
|
|
228
245
|
display: flex;
|
|
229
246
|
flex-direction: column;
|
|
247
|
+
max-width: 1000px;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.tag-container {
|
|
251
|
+
margin: 0.25lh 0;
|
|
230
252
|
}
|
|
231
253
|
</style>
|
|
@@ -49,7 +49,7 @@ export declare const findPageMetaParent: (parentList: PageMeta[], child: PageMet
|
|
|
49
49
|
export type ParsePageMetaCompareFn = ((a: PageMeta, b: PageMeta) => number);
|
|
50
50
|
export declare const parsePageMeta: (fileList: Record<string, unknown>, jsonList: Record<string, unknown>, imageMap: Map<string, string>, compareFn?: ParsePageMetaCompareFn) => PageMeta[];
|
|
51
51
|
/**
|
|
52
|
-
* Prioritizes, in order, lastUpdated
|
|
52
|
+
* Prioritizes, in order, recently lastUpdated or datePublished, has description, then title
|
|
53
53
|
*
|
|
54
54
|
* @param a
|
|
55
55
|
* @param b
|
|
@@ -100,30 +100,24 @@ export const parsePageMeta = (fileList, jsonList, imageMap, compareFn) => {
|
|
|
100
100
|
const AWins = -1;
|
|
101
101
|
const BWins = 1;
|
|
102
102
|
/**
|
|
103
|
-
* Prioritizes, in order, lastUpdated
|
|
103
|
+
* Prioritizes, in order, recently lastUpdated or datePublished, has description, then title
|
|
104
104
|
*
|
|
105
105
|
* @param a
|
|
106
106
|
* @param b
|
|
107
107
|
* @constructor
|
|
108
108
|
*/
|
|
109
109
|
export const DefaultPageMetaSorter = (a, b) => {
|
|
110
|
-
|
|
110
|
+
const aDate = a.lastUpdated || a.datePublished;
|
|
111
|
+
const bDate = b.lastUpdated || b.datePublished;
|
|
112
|
+
if (aDate && !bDate) {
|
|
111
113
|
return AWins;
|
|
112
114
|
}
|
|
113
|
-
else if (!
|
|
115
|
+
else if (!aDate && bDate) {
|
|
114
116
|
return BWins;
|
|
115
117
|
}
|
|
116
|
-
else if (
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
if (a.datePublished && !b.datePublished) {
|
|
120
|
-
return AWins;
|
|
121
|
-
}
|
|
122
|
-
else if (!a.lastUpdated && b.datePublished) {
|
|
123
|
-
return BWins;
|
|
124
|
-
}
|
|
125
|
-
else if (a.datePublished && b.datePublished) {
|
|
126
|
-
return a.datePublished.localeCompare(b.datePublished);
|
|
118
|
+
else if (aDate && bDate) {
|
|
119
|
+
// we invert the value because we want the dates to be in descending order
|
|
120
|
+
return -aDate.localeCompare(bDate);
|
|
127
121
|
}
|
|
128
122
|
if (a.description && !b.description) {
|
|
129
123
|
return AWins;
|
|
@@ -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: "p3htw9"
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
export async function get_hooks() {
|
|
@@ -35,7 +35,8 @@ $:
|
|
|
35
35
|
title={fullPath}
|
|
36
36
|
on:click={createGoToFunction(fullPath)}>
|
|
37
37
|
{#if pageMeta.imageUrl}
|
|
38
|
-
<img src={pageMeta.imageUrl}
|
|
38
|
+
<img src={pageMeta.imageUrl}
|
|
39
|
+
alt={pageMeta.imageAlt ?? "placeholder alt text please replace me or report me!"} />
|
|
39
40
|
{/if}
|
|
40
41
|
<section class="blurb-text">
|
|
41
42
|
<h2>{pageMeta.title}</h2>
|
|
@@ -44,7 +45,7 @@ $:
|
|
|
44
45
|
Tags:
|
|
45
46
|
{#if (pageMeta.tags && pageMeta.tags.length !== 0)}
|
|
46
47
|
{#each pageMeta.tags as tagValue}
|
|
47
|
-
<span class="badge variant-filled">{tagValue}</span>
|
|
48
|
+
<span class="badge variant-filled tag-container">{tagValue}</span>
|
|
48
49
|
{/each}
|
|
49
50
|
{:else}
|
|
50
51
|
None
|
|
@@ -67,28 +68,27 @@ $:
|
|
|
67
68
|
</div>
|
|
68
69
|
|
|
69
70
|
<style>
|
|
70
|
-
|
|
71
|
-
height: 20em;
|
|
72
|
-
width: 20em;
|
|
73
|
-
-o-object-fit: cover;
|
|
74
|
-
object-fit: cover;
|
|
75
|
-
padding: var(--theme-border-base);
|
|
76
|
-
border-radius: var(--theme-rounded-container) 0 0 var(--theme-rounded-container);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
@media (max-width: 50rem) {
|
|
71
|
+
@media (max-width: 800px) {
|
|
80
72
|
img {
|
|
81
73
|
max-height: 20rem;
|
|
82
74
|
width: 100%;
|
|
83
75
|
flex-basis: 100%;
|
|
84
76
|
border-radius: var(--theme-rounded-container) var(--theme-rounded-container) 0 0;
|
|
85
77
|
}
|
|
78
|
+
|
|
79
|
+
.navigation-element {
|
|
80
|
+
flex-direction: column;
|
|
81
|
+
}
|
|
86
82
|
}
|
|
87
83
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
84
|
+
@media (min-width: 801px) {
|
|
85
|
+
.navigation-element {
|
|
86
|
+
flex-direction: row;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
img {
|
|
90
|
+
width: 20em;
|
|
91
|
+
}
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
.dark .navigation-element {
|
|
@@ -210,22 +210,44 @@ $:
|
|
|
210
210
|
|
|
211
211
|
.navigation-element {
|
|
212
212
|
display: flex;
|
|
213
|
-
flex-
|
|
213
|
+
/*flex-direction: row;*/
|
|
214
214
|
text-align: start;
|
|
215
|
+
align-items: flex-start;
|
|
215
216
|
padding: 0;
|
|
216
217
|
}
|
|
217
218
|
|
|
219
|
+
img {
|
|
220
|
+
height: 20em;
|
|
221
|
+
-o-object-fit: cover;
|
|
222
|
+
object-fit: cover;
|
|
223
|
+
padding: var(--theme-border-base);
|
|
224
|
+
border-radius: var(--theme-rounded-container) 0 0 var(--theme-rounded-container);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.navigation-component {
|
|
228
|
+
display: flex;
|
|
229
|
+
flex-direction: column;
|
|
230
|
+
gap: 2em;
|
|
231
|
+
}
|
|
232
|
+
|
|
218
233
|
.navigation-title {
|
|
219
234
|
text-align: center;
|
|
220
235
|
}
|
|
221
236
|
|
|
222
237
|
.blurb-text {
|
|
223
|
-
flex: 1;
|
|
224
238
|
padding: 2em;
|
|
239
|
+
flex-grow: 1;
|
|
240
|
+
white-space: initial;
|
|
241
|
+
min-width: 0;
|
|
225
242
|
}
|
|
226
243
|
|
|
227
244
|
.navigation-wrapper {
|
|
228
245
|
display: flex;
|
|
229
246
|
flex-direction: column;
|
|
247
|
+
max-width: 1000px;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.tag-container {
|
|
251
|
+
margin: 0.25lh 0;
|
|
230
252
|
}
|
|
231
253
|
</style>
|
|
@@ -49,7 +49,7 @@ export declare const findPageMetaParent: (parentList: PageMeta[], child: PageMet
|
|
|
49
49
|
export type ParsePageMetaCompareFn = ((a: PageMeta, b: PageMeta) => number);
|
|
50
50
|
export declare const parsePageMeta: (fileList: Record<string, unknown>, jsonList: Record<string, unknown>, imageMap: Map<string, string>, compareFn?: ParsePageMetaCompareFn) => PageMeta[];
|
|
51
51
|
/**
|
|
52
|
-
* Prioritizes, in order, lastUpdated
|
|
52
|
+
* Prioritizes, in order, recently lastUpdated or datePublished, has description, then title
|
|
53
53
|
*
|
|
54
54
|
* @param a
|
|
55
55
|
* @param b
|
|
@@ -100,30 +100,24 @@ export const parsePageMeta = (fileList, jsonList, imageMap, compareFn) => {
|
|
|
100
100
|
const AWins = -1;
|
|
101
101
|
const BWins = 1;
|
|
102
102
|
/**
|
|
103
|
-
* Prioritizes, in order, lastUpdated
|
|
103
|
+
* Prioritizes, in order, recently lastUpdated or datePublished, has description, then title
|
|
104
104
|
*
|
|
105
105
|
* @param a
|
|
106
106
|
* @param b
|
|
107
107
|
* @constructor
|
|
108
108
|
*/
|
|
109
109
|
export const DefaultPageMetaSorter = (a, b) => {
|
|
110
|
-
|
|
110
|
+
const aDate = a.lastUpdated || a.datePublished;
|
|
111
|
+
const bDate = b.lastUpdated || b.datePublished;
|
|
112
|
+
if (aDate && !bDate) {
|
|
111
113
|
return AWins;
|
|
112
114
|
}
|
|
113
|
-
else if (!
|
|
115
|
+
else if (!aDate && bDate) {
|
|
114
116
|
return BWins;
|
|
115
117
|
}
|
|
116
|
-
else if (
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
if (a.datePublished && !b.datePublished) {
|
|
120
|
-
return AWins;
|
|
121
|
-
}
|
|
122
|
-
else if (!a.lastUpdated && b.datePublished) {
|
|
123
|
-
return BWins;
|
|
124
|
-
}
|
|
125
|
-
else if (a.datePublished && b.datePublished) {
|
|
126
|
-
return a.datePublished.localeCompare(b.datePublished);
|
|
118
|
+
else if (aDate && bDate) {
|
|
119
|
+
// we invert the value because we want the dates to be in descending order
|
|
120
|
+
return -aDate.localeCompare(bDate);
|
|
127
121
|
}
|
|
128
122
|
if (a.description && !b.description) {
|
|
129
123
|
return AWins;
|
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.
|
|
4
|
+
"version": "2.4.36",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "vite dev",
|
|
7
7
|
"build": "npm run check-requirements && vite build && yarn package",
|
|
@@ -43,7 +43,8 @@
|
|
|
43
43
|
title={fullPath}
|
|
44
44
|
on:click={createGoToFunction(fullPath)}>
|
|
45
45
|
{#if pageMeta.imageUrl}
|
|
46
|
-
<img src={pageMeta.imageUrl}
|
|
46
|
+
<img src={pageMeta.imageUrl}
|
|
47
|
+
alt={pageMeta.imageAlt ?? "placeholder alt text please replace me or report me!"} />
|
|
47
48
|
{/if}
|
|
48
49
|
<section class="blurb-text">
|
|
49
50
|
<h2>{pageMeta.title}</h2>
|
|
@@ -52,7 +53,7 @@
|
|
|
52
53
|
Tags:
|
|
53
54
|
{#if (pageMeta.tags && pageMeta.tags.length !== 0)}
|
|
54
55
|
{#each pageMeta.tags as tagValue}
|
|
55
|
-
<span class="badge variant-filled">{tagValue}</span>
|
|
56
|
+
<span class="badge variant-filled tag-container">{tagValue}</span>
|
|
56
57
|
{/each}
|
|
57
58
|
{:else}
|
|
58
59
|
None
|
|
@@ -75,48 +76,69 @@
|
|
|
75
76
|
</div>
|
|
76
77
|
|
|
77
78
|
<style lang="postcss">
|
|
78
|
-
|
|
79
|
-
height: 20em;
|
|
80
|
-
width: 20em;
|
|
81
|
-
object-fit: cover;
|
|
82
|
-
padding: var(--theme-border-base);
|
|
83
|
-
border-radius: var(--theme-rounded-container) 0 0 var(--theme-rounded-container);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
@media (max-width: 50rem) {
|
|
79
|
+
@media (max-width: 800px) {
|
|
87
80
|
img {
|
|
88
81
|
max-height: 20rem;
|
|
89
82
|
width: 100%;
|
|
90
83
|
flex-basis: 100%;
|
|
91
84
|
border-radius: var(--theme-rounded-container) var(--theme-rounded-container) 0 0;
|
|
92
85
|
}
|
|
86
|
+
|
|
87
|
+
.navigation-element {
|
|
88
|
+
flex-direction: column;
|
|
89
|
+
}
|
|
93
90
|
}
|
|
94
91
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
92
|
+
@media (min-width: 801px) {
|
|
93
|
+
.navigation-element {
|
|
94
|
+
flex-direction: row;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
img {
|
|
98
|
+
width: 20em;
|
|
99
|
+
}
|
|
99
100
|
}
|
|
100
101
|
|
|
101
102
|
.navigation-element {
|
|
102
103
|
@apply btn card card-hover bg-surface-100 dark:bg-surface-900;
|
|
103
104
|
display: flex;
|
|
104
|
-
flex-
|
|
105
|
+
/*flex-direction: row;*/
|
|
105
106
|
text-align: start;
|
|
107
|
+
align-items: flex-start;
|
|
106
108
|
padding: 0;
|
|
107
109
|
}
|
|
108
110
|
|
|
111
|
+
img {
|
|
112
|
+
height: 20em;
|
|
113
|
+
object-fit: cover;
|
|
114
|
+
padding: var(--theme-border-base);
|
|
115
|
+
border-radius: var(--theme-rounded-container) 0 0 var(--theme-rounded-container);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.navigation-component {
|
|
119
|
+
display: flex;
|
|
120
|
+
flex-direction: column;
|
|
121
|
+
gap: 2em;
|
|
122
|
+
}
|
|
123
|
+
|
|
109
124
|
.navigation-title {
|
|
110
125
|
text-align: center;
|
|
111
126
|
}
|
|
112
127
|
|
|
113
128
|
.blurb-text {
|
|
114
|
-
flex: 1;
|
|
115
129
|
padding: 2em;
|
|
130
|
+
flex-grow: 1;
|
|
131
|
+
white-space: initial;
|
|
132
|
+
min-width: 0;
|
|
116
133
|
}
|
|
117
134
|
|
|
118
135
|
.navigation-wrapper {
|
|
119
136
|
display: flex;
|
|
120
137
|
flex-direction: column;
|
|
138
|
+
max-width: 1000px;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.tag-container {
|
|
142
|
+
margin: 0.25lh 0;
|
|
121
143
|
}
|
|
122
144
|
</style>
|
|
@@ -178,27 +178,23 @@ const AWins = -1;
|
|
|
178
178
|
const BWins = 1;
|
|
179
179
|
|
|
180
180
|
/**
|
|
181
|
-
* Prioritizes, in order, lastUpdated
|
|
181
|
+
* Prioritizes, in order, recently lastUpdated or datePublished, has description, then title
|
|
182
182
|
*
|
|
183
183
|
* @param a
|
|
184
184
|
* @param b
|
|
185
185
|
* @constructor
|
|
186
186
|
*/
|
|
187
187
|
export const DefaultPageMetaSorter: ParsePageMetaCompareFn = (a, b) => {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
} else if (!a.lastUpdated && b.lastUpdated) {
|
|
191
|
-
return BWins;
|
|
192
|
-
} else if (a.lastUpdated && b.lastUpdated) {
|
|
193
|
-
return a.lastUpdated.localeCompare(b.lastUpdated);
|
|
194
|
-
}
|
|
188
|
+
const aDate = a.lastUpdated || a.datePublished;
|
|
189
|
+
const bDate = b.lastUpdated || b.datePublished;
|
|
195
190
|
|
|
196
|
-
if (
|
|
191
|
+
if (aDate && !bDate) {
|
|
197
192
|
return AWins;
|
|
198
|
-
} else if (!
|
|
193
|
+
} else if (!aDate && bDate) {
|
|
199
194
|
return BWins;
|
|
200
|
-
} else if (
|
|
201
|
-
|
|
195
|
+
} else if (aDate && bDate) {
|
|
196
|
+
// we invert the value because we want the dates to be in descending order
|
|
197
|
+
return -aDate.localeCompare(bDate);
|
|
202
198
|
}
|
|
203
199
|
|
|
204
200
|
if (a.description && !b.description) {
|
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
{
|
|
2
|
-
"datePublished": "
|
|
3
|
-
"description": "random description but look at Ares!",
|
|
2
|
+
"datePublished": "2023-01-01",
|
|
3
|
+
"description": "random description but look at Ares! Let's try out a long-ish text to see how things would wrap and all that. I don't know what else to say. Please stream Umpah Umpah.",
|
|
4
4
|
"imageAlt": "Image of Ares being excited",
|
|
5
5
|
"imageID": "testImageID",
|
|
6
6
|
"imageURL": "./favicon.png/?q=imageIDTakesPrecedence",
|
|
7
|
-
"lastUpdated": "
|
|
7
|
+
"lastUpdated": "2023-02-02",
|
|
8
8
|
"shouldGroup": false,
|
|
9
9
|
"shouldHide": false,
|
|
10
10
|
"tags": [
|
|
11
|
-
"random"
|
|
11
|
+
"random",
|
|
12
|
+
"random8",
|
|
13
|
+
"random2",
|
|
14
|
+
"random5",
|
|
15
|
+
"random5",
|
|
16
|
+
"random5",
|
|
17
|
+
"random5",
|
|
18
|
+
"random5",
|
|
19
|
+
"random5",
|
|
20
|
+
"random5",
|
|
21
|
+
"random4"
|
|
12
22
|
],
|
|
13
23
|
"title": "Custom title for page 1!!!"
|
|
14
24
|
}
|