@turnipxenon/pineapple 2.4.69 → 2.4.71

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/.gitignore +4 -0
  2. package/.idea/workspace.xml +68 -64
  3. package/.svelte-kit/__package__/.gitignore +1 -0
  4. package/.svelte-kit/__package__/server-temp/prisma.d.ts +2 -0
  5. package/.svelte-kit/__package__/server-temp/prisma.js +2 -0
  6. package/.svelte-kit/__package__/template/seaweed/SeaweedTemplate.svelte +1 -2
  7. package/.svelte-kit/__package__/template/seaweed/entries/ThisWebpage.svelte +3 -3
  8. package/.svelte-kit/ambient.d.ts +4 -4
  9. package/.svelte-kit/generated/client/app.js +4 -2
  10. package/.svelte-kit/generated/client/nodes/16.js +1 -0
  11. package/.svelte-kit/generated/server/internal.js +1 -1
  12. package/.svelte-kit/types/route_meta_data.json +3 -0
  13. package/.svelte-kit/types/src/routes/$types.d.ts +2 -2
  14. package/.svelte-kit/types/src/routes/(seaweed)/$types.d.ts +2 -2
  15. package/.svelte-kit/types/src/routes/(seaweed)/portfolio/actual/[slug]/$types.d.ts +25 -0
  16. package/.svelte-kit/types/src/routes/(seaweed)/portfolio/actual/[slug]/proxy+page.server.ts +36 -0
  17. package/dist/.gitignore +1 -0
  18. package/dist/server-temp/prisma.d.ts +2 -0
  19. package/dist/server-temp/prisma.js +2 -0
  20. package/dist/template/seaweed/SeaweedTemplate.svelte +1 -2
  21. package/dist/template/seaweed/entries/ThisWebpage.svelte +3 -3
  22. package/package.json +3 -1
  23. package/prisma/migrations/20240408050417_init/migration.sql +7 -0
  24. package/prisma/migrations/migration_lock.toml +3 -0
  25. package/prisma/schema.prisma +13 -0
  26. package/src/lib/.gitignore +1 -0
  27. package/src/lib/server-temp/prisma.ts +3 -0
  28. package/src/lib/template/seaweed/SeaweedTemplate.svelte +1 -3
  29. package/src/lib/template/seaweed/entries/ThisWebpage.svelte +3 -3
  30. package/src/routes/(seaweed)/portfolio/actual/[slug]/+page.server.ts +35 -0
  31. package/src/routes/(seaweed)/portfolio/actual/[slug]/+page.svelte +40 -0
  32. package/src/routes/(seaweed)/portfolio/actual/[slug]/SlugPageData.ts +4 -0
  33. package/yarn.lock +48 -0
package/.gitignore CHANGED
@@ -12,3 +12,7 @@ vite.config.ts.timestamp-*
12
12
  .idea
13
13
  dist
14
14
  /.vercel/
15
+
16
+ # Prisma for debugging; need to migrate some Prisma function to Seaweed
17
+ ./prisma
18
+
@@ -4,9 +4,8 @@
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="Fix align-items">
8
- <change beforePath="$PROJECT_DIR$/src/lib/api/index.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/lib/api/index.ts" afterDir="false" />
9
- </list>
7
+ <list default="true" id="accb6ba2-c343-4f84-ad30-6e2d71eceee5" name="CreateUrlForm" comment="Fix bug with query params" />
8
+ <list id="a5282f93-c2bb-4265-921e-8b484677dd29" name="prisma" comment="" />
10
9
  <option name="SHOW_DIALOG" value="false" />
11
10
  <option name="HIGHLIGHT_CONFLICTS" value="true" />
12
11
  <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@@ -111,41 +110,41 @@
111
110
  <option name="hideEmptyMiddlePackages" value="true" />
112
111
  <option name="showLibraryContents" value="true" />
113
112
  </component>
114
- <component name="PropertiesComponent">{
115
- &quot;keyToString&quot;: {
116
- &quot;DefaultHtmlFileTemplate&quot;: &quot;HTML File&quot;,
117
- &quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;,
118
- &quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
119
- &quot;WebServerToolWindowFactoryState&quot;: &quot;false&quot;,
120
- &quot;git-widget-placeholder&quot;: &quot;turnip/dev&quot;,
121
- &quot;ignore.virus.scanning.warn.message&quot;: &quot;true&quot;,
122
- &quot;last_opened_file_path&quot;: &quot;C:/Users/Pumpkin/Projects/Web/pineapple&quot;,
123
- &quot;list.type.of.created.stylesheet&quot;: &quot;CSS&quot;,
124
- &quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
125
- &quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
126
- &quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
127
- &quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
128
- &quot;nodejs_interpreter_path&quot;: &quot;node&quot;,
129
- &quot;nodejs_package_manager_path&quot;: &quot;yarn&quot;,
130
- &quot;npm.build.executor&quot;: &quot;Run&quot;,
131
- &quot;npm.dev (1).executor&quot;: &quot;Run&quot;,
132
- &quot;npm.dev --open.executor&quot;: &quot;Run&quot;,
133
- &quot;npm.dev offline.executor&quot;: &quot;Run&quot;,
134
- &quot;npm.dev-offline.executor&quot;: &quot;Run&quot;,
135
- &quot;npm.dev.executor&quot;: &quot;Run&quot;,
136
- &quot;npm.to-dev.executor&quot;: &quot;Run&quot;,
137
- &quot;settings.editor.selected.configurable&quot;: &quot;settings.sync&quot;,
138
- &quot;ts.external.directory.path&quot;: &quot;C:\\Users\\Pumpkin\\Projects\\Web\\pineapple\\node_modules\\typescript\\lib&quot;,
139
- &quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
113
+ <component name="PropertiesComponent"><![CDATA[{
114
+ "keyToString": {
115
+ "DefaultHtmlFileTemplate": "HTML File",
116
+ "RunOnceActivity.OpenProjectViewOnStart": "true",
117
+ "RunOnceActivity.ShowReadmeOnStart": "true",
118
+ "WebServerToolWindowFactoryState": "false",
119
+ "git-widget-placeholder": "turnip/dev",
120
+ "ignore.virus.scanning.warn.message": "true",
121
+ "last_opened_file_path": "C:/Users/Pumpkin/Projects/Web/pineapple/src/lib",
122
+ "list.type.of.created.stylesheet": "CSS",
123
+ "node.js.detected.package.eslint": "true",
124
+ "node.js.detected.package.tslint": "true",
125
+ "node.js.selected.package.eslint": "(autodetect)",
126
+ "node.js.selected.package.tslint": "(autodetect)",
127
+ "nodejs_interpreter_path": "node",
128
+ "nodejs_package_manager_path": "yarn",
129
+ "npm.build.executor": "Run",
130
+ "npm.dev (1).executor": "Run",
131
+ "npm.dev --open.executor": "Run",
132
+ "npm.dev offline.executor": "Run",
133
+ "npm.dev-offline.executor": "Run",
134
+ "npm.dev.executor": "Run",
135
+ "npm.to-dev.executor": "Run",
136
+ "settings.editor.selected.configurable": "settings.sync",
137
+ "ts.external.directory.path": "C:\\Users\\Pumpkin\\Projects\\Web\\pineapple\\node_modules\\typescript\\lib",
138
+ "vue.rearranger.settings.migration": "true"
140
139
  }
141
- }</component>
140
+ }]]></component>
142
141
  <component name="RecentsManager">
143
142
  <key name="CopyFile.RECENT_KEYS">
143
+ <recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\lib" />
144
+ <recent name="C:\Users\Pumpkin\Projects\Web\pineapple" />
145
+ <recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\routes\(seaweed)\portfolio\actual" />
144
146
  <recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\routes\api\create-url" />
145
147
  <recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\lib\template\seaweed" />
146
- <recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\lib\template\seaweed\entries" />
147
- <recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\routes\(pineapple)\pineapple\(extra-pages)\page3\page7\(test_layout)\page8" />
148
- <recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\routes\(pineapple)\pineapple\(extra-pages)\page3\page5" />
149
148
  </key>
150
149
  <key name="MoveFile.RECENT_KEYS">
151
150
  <recent name="C:\Users\Pumpkin\Projects\Web\pineapple\src\lib\components\pineapple-slide-toggle" />
@@ -168,7 +167,9 @@
168
167
  </scripts>
169
168
  <arguments value="--open" />
170
169
  <node-interpreter value="project" />
171
- <envs />
170
+ <envs>
171
+ <env name="POSTGRES_PRISMA_URL" value="postgres://default:cV8MAtPjiF1n@ep-wandering-flower-a4iaz9vz-pooler.us-east-1.aws.neon.tech/verceldb?sslmode=require" />
172
+ </envs>
172
173
  <method v="2" />
173
174
  </configuration>
174
175
  <configuration name="dev-offline" type="js.build_tools.npm" temporary="true" nameIsGenerated="true">
@@ -210,6 +211,7 @@
210
211
  <component name="TaskManager">
211
212
  <task active="true" id="Default" summary="Default task">
212
213
  <changelist id="accb6ba2-c343-4f84-ad30-6e2d71eceee5" name="Changes" comment="" />
214
+ <changelist id="a5282f93-c2bb-4265-921e-8b484677dd29" name="prisma" comment="" />
213
215
  <created>1695180599963</created>
214
216
  <option name="number" value="Default" />
215
217
  <option name="presentableId" value="Default" />
@@ -357,31 +359,9 @@
357
359
  <workItem from="1712774708776" duration="809000" />
358
360
  <workItem from="1712777702027" duration="1171000" />
359
361
  <workItem from="1712779118025" duration="2950000" />
360
- <workItem from="1712782201465" duration="216000" />
361
- </task>
362
- <task id="LOCAL-00138" summary="Add cdktf">
363
- <option name="closed" value="true" />
364
- <created>1712393084567</created>
365
- <option name="number" value="00138" />
366
- <option name="presentableId" value="LOCAL-00138" />
367
- <option name="project" value="LOCAL" />
368
- <updated>1712393084568</updated>
369
- </task>
370
- <task id="LOCAL-00139" summary="Add cdktf">
371
- <option name="closed" value="true" />
372
- <created>1712394836168</created>
373
- <option name="number" value="00139" />
374
- <option name="presentableId" value="LOCAL-00139" />
375
- <option name="project" value="LOCAL" />
376
- <updated>1712394836169</updated>
377
- </task>
378
- <task id="LOCAL-00140" summary="Add cdktf">
379
- <option name="closed" value="true" />
380
- <created>1712394845245</created>
381
- <option name="number" value="00140" />
382
- <option name="presentableId" value="LOCAL-00140" />
383
- <option name="project" value="LOCAL" />
384
- <updated>1712394845245</updated>
362
+ <workItem from="1712782201465" duration="745000" />
363
+ <workItem from="1712790206684" duration="453000" />
364
+ <workItem from="1712941939083" duration="1159000" />
385
365
  </task>
386
366
  <task id="LOCAL-00141" summary="Implement cdktf for empty AppService">
387
367
  <option name="closed" value="true" />
@@ -751,7 +731,31 @@
751
731
  <option name="project" value="LOCAL" />
752
732
  <updated>1712782065010</updated>
753
733
  </task>
754
- <option name="localTasksCounter" value="187" />
734
+ <task id="LOCAL-00187" summary="Export GetLatestBlogs properly">
735
+ <option name="closed" value="true" />
736
+ <created>1712782430277</created>
737
+ <option name="number" value="00187" />
738
+ <option name="presentableId" value="LOCAL-00187" />
739
+ <option name="project" value="LOCAL" />
740
+ <updated>1712782430277</updated>
741
+ </task>
742
+ <task id="LOCAL-00188" summary="Update description for ThisWebpage">
743
+ <option name="closed" value="true" />
744
+ <created>1712790512091</created>
745
+ <option name="number" value="00188" />
746
+ <option name="presentableId" value="LOCAL-00188" />
747
+ <option name="project" value="LOCAL" />
748
+ <updated>1712790512092</updated>
749
+ </task>
750
+ <task id="LOCAL-00189" summary="Fix bug with query params">
751
+ <option name="closed" value="true" />
752
+ <created>1712942987623</created>
753
+ <option name="number" value="00189" />
754
+ <option name="presentableId" value="LOCAL-00189" />
755
+ <option name="project" value="LOCAL" />
756
+ <updated>1712942987624</updated>
757
+ </task>
758
+ <option name="localTasksCounter" value="190" />
755
759
  <servers />
756
760
  </component>
757
761
  <component name="TypeScriptGeneratedFilesManager">
@@ -809,9 +813,6 @@
809
813
  </option>
810
814
  </component>
811
815
  <component name="VcsManagerConfiguration">
812
- <MESSAGE value="Delay parsing for query terms after page transformation" />
813
- <MESSAGE value="Put parseQTTerms in afterUpdate instead of onMount" />
814
- <MESSAGE value="Add logs to observe queryTermMap in downstream package" />
815
816
  <MESSAGE value="Add logs to observe parseQtTerms in downstream package" />
816
817
  <MESSAGE value="Move parseQtTerm on afterUpdate" />
817
818
  <MESSAGE value="Change parseQueryTerm to parse during runtime on the DOM instead of on the raw svelte text" />
@@ -834,6 +835,9 @@
834
835
  <MESSAGE value="Add default value for allowUpperControl in NavigationComponent" />
835
836
  <MESSAGE value="Add ChumBucket" />
836
837
  <MESSAGE value="Fix align-items" />
837
- <option name="LAST_COMMIT_MESSAGE" value="Fix align-items" />
838
+ <MESSAGE value="Export GetLatestBlogs properly" />
839
+ <MESSAGE value="Update description for ThisWebpage" />
840
+ <MESSAGE value="Fix bug with query params" />
841
+ <option name="LAST_COMMIT_MESSAGE" value="Fix bug with query params" />
838
842
  </component>
839
843
  </project>
@@ -0,0 +1 @@
1
+ ./server-temp
@@ -0,0 +1,2 @@
1
+ import { PrismaClient } from "@prisma/client";
2
+ export declare const prismaClient: PrismaClient<import(".prisma/client").Prisma.PrismaClientOptions, never, import("@prisma/client/runtime/library").DefaultArgs>;
@@ -0,0 +1,2 @@
1
+ import { PrismaClient } from "@prisma/client";
2
+ export const prismaClient = new PrismaClient();
@@ -105,8 +105,7 @@ const filterSearchParams = (searchParams) => {
105
105
  onMount(async () => {
106
106
  if (!letChaos && serverSideQueryParams) {
107
107
  filterSearchParams(new URLSearchParams(serverSideQueryParams));
108
- }
109
- if (!letChaos && $page.url.searchParams) {
108
+ } else if (!letChaos && $page.url.searchParams) {
110
109
  filterSearchParams($page.url.searchParams);
111
110
  }
112
111
  if (letChaos) {
@@ -18,10 +18,9 @@ export let props;
18
18
  <h2>This webpage!</h2>
19
19
 
20
20
  <p>
21
- The webpage is made of two parts. The webpage that has the content for everything here, I've
22
- lovingly called Seaweed. I kept seaweed as a private package. On the other hand, the base package which I
23
- want to use for all spin offs of my websites is called Pineapple and have kept that codebase public.
21
+ The webpage is made with two parts. The webpage that has the content for everything here, I've lovingly called Seaweed. I kept seaweed as a private package. On the other hand, the base package which I want to use for all spin offs of my websites is called Pineapple and have kept that codebase public.
24
22
  </p>
23
+ <p>The webpage can dynamically emphasize terms, rearrange the layout, use different terms, and save all these configurations as a shortened link. Additionally fetches the latest blog entries from turnipxenon.com via REST calls.</p>
25
24
 
26
25
  <p>
27
26
  <Chip>Svelte</Chip>
@@ -31,6 +30,7 @@ export let props;
31
30
  <Chip>YarnSpinner</Chip>
32
31
  <Chip>Postgres (SQL database)</Chip>
33
32
  <Chip>Prisma ORM</Chip>
33
+ <Chip>RESTful API</Chip>
34
34
  </p>
35
35
 
36
36
  <section class="game-link-section">
@@ -37,8 +37,6 @@ 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;
42
40
  export const GIT_XL_PATH: string;
43
41
  export const GoLand: string;
44
42
  export const GOPATH: string;
@@ -86,6 +84,7 @@ declare module '$env/static/private' {
86
84
  export const npm_package_dependencies_string_width: string;
87
85
  export const npm_package_dependencies_svelte: string;
88
86
  export const npm_package_dependencies_ts_node: string;
87
+ export const npm_package_dependencies__prisma_client: string;
89
88
  export const npm_package_dependencies__skeletonlabs_skeleton: string;
90
89
  export const npm_package_dependencies__skeletonlabs_tw_plugin: string;
91
90
  export const npm_package_dependencies__sveltejs_kit: string;
@@ -100,6 +99,7 @@ declare module '$env/static/private' {
100
99
  export const npm_package_devDependencies_postcss: string;
101
100
  export const npm_package_devDependencies_prettier: string;
102
101
  export const npm_package_devDependencies_prettier_plugin_svelte: string;
102
+ export const npm_package_devDependencies_prisma: string;
103
103
  export const npm_package_devDependencies_svelte2tsx: string;
104
104
  export const npm_package_devDependencies_svelte_check: string;
105
105
  export const npm_package_devDependencies_tailwindcss: string;
@@ -230,8 +230,6 @@ declare module '$env/dynamic/private' {
230
230
  COMSPEC: string;
231
231
  DriverData: string;
232
232
  EXEPATH: string;
233
- FPS_BROWSER_APP_PROFILE_STRING: string;
234
- FPS_BROWSER_USER_PROFILE_STRING: string;
235
233
  GIT_XL_PATH: string;
236
234
  GoLand: string;
237
235
  GOPATH: string;
@@ -279,6 +277,7 @@ declare module '$env/dynamic/private' {
279
277
  npm_package_dependencies_string_width: string;
280
278
  npm_package_dependencies_svelte: string;
281
279
  npm_package_dependencies_ts_node: string;
280
+ npm_package_dependencies__prisma_client: string;
282
281
  npm_package_dependencies__skeletonlabs_skeleton: string;
283
282
  npm_package_dependencies__skeletonlabs_tw_plugin: string;
284
283
  npm_package_dependencies__sveltejs_kit: string;
@@ -293,6 +292,7 @@ declare module '$env/dynamic/private' {
293
292
  npm_package_devDependencies_postcss: string;
294
293
  npm_package_devDependencies_prettier: string;
295
294
  npm_package_devDependencies_prettier_plugin_svelte: string;
295
+ npm_package_devDependencies_prisma: string;
296
296
  npm_package_devDependencies_svelte2tsx: string;
297
297
  npm_package_devDependencies_svelte_check: string;
298
298
  npm_package_devDependencies_tailwindcss: string;
@@ -16,7 +16,8 @@ export const nodes = [
16
16
  () => import('./nodes/12'),
17
17
  () => import('./nodes/13'),
18
18
  () => import('./nodes/14'),
19
- () => import('./nodes/15')
19
+ () => import('./nodes/15'),
20
+ () => import('./nodes/16')
20
21
  ];
21
22
 
22
23
  export const server_loads = [];
@@ -33,7 +34,8 @@ export const dictionary = {
33
34
  "/(pineapple)/pineapple/(extra-pages)/page3/page7/(test_layout)/page8": [11,[2]],
34
35
  "/(pineapple)/pineapple/(extra-pages)/page4": [12,[2]],
35
36
  "/(seaweed)/portfolio": [~14,[3]],
36
- "/(seaweed)/portfolio/actual": [15,[3]]
37
+ "/(seaweed)/portfolio/actual": [15,[3]],
38
+ "/(seaweed)/portfolio/actual/[slug]": [~16,[3]]
37
39
  };
38
40
 
39
41
  export const hooks = {
@@ -0,0 +1 @@
1
+ export { default as component } from "../../../../src/routes/(seaweed)/portfolio/actual/[slug]/+page.svelte";
@@ -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: "u4p1xt"
24
+ version_hash: "7ec9o8"
25
25
  };
26
26
 
27
27
  export async function get_hooks() {
@@ -25,5 +25,8 @@
25
25
  ],
26
26
  "/(seaweed)/portfolio/actual": [
27
27
  "src/routes/(seaweed)/portfolio/actual/+page.ts"
28
+ ],
29
+ "/(seaweed)/portfolio/actual/[slug]": [
30
+ "src/routes/(seaweed)/portfolio/actual/[slug]/+page.server.ts"
28
31
  ]
29
32
  }
@@ -11,8 +11,8 @@ type OutputDataShape<T> = MaybeWithVoid<Omit<App.PageData, RequiredKeys<T>> & Pa
11
11
  type EnsureDefined<T> = T extends null | undefined ? {} : T;
12
12
  type OptionalUnion<U extends Record<string, any>, A extends keyof U = U extends U ? keyof U : never> = U extends unknown ? { [P in Exclude<A, keyof U>]?: never } & U : never;
13
13
  export type Snapshot<T = any> = Kit.Snapshot<T>;
14
- type LayoutRouteId = RouteId | "/(pineapple)" | "/(pineapple)/pineapple/(extra-pages)/page1" | "/(pineapple)/pineapple/(extra-pages)/page2" | "/(pineapple)/pineapple/(extra-pages)/page3" | "/(pineapple)/pineapple/(extra-pages)/page3/page5" | "/(pineapple)/pineapple/(extra-pages)/page3/page6" | "/(pineapple)/pineapple/(extra-pages)/page3/page7" | "/(pineapple)/pineapple/(extra-pages)/page3/page7/(test_layout)/page8" | "/(pineapple)/pineapple/(extra-pages)/page4" | "/(pineapple)/pineapple/(pineapple)" | "/(seaweed)/portfolio" | "/(seaweed)/portfolio/actual" | null
15
- type LayoutParams = RouteParams & { }
14
+ type LayoutRouteId = RouteId | "/(pineapple)" | "/(pineapple)/pineapple/(extra-pages)/page1" | "/(pineapple)/pineapple/(extra-pages)/page2" | "/(pineapple)/pineapple/(extra-pages)/page3" | "/(pineapple)/pineapple/(extra-pages)/page3/page5" | "/(pineapple)/pineapple/(extra-pages)/page3/page6" | "/(pineapple)/pineapple/(extra-pages)/page3/page7" | "/(pineapple)/pineapple/(extra-pages)/page3/page7/(test_layout)/page8" | "/(pineapple)/pineapple/(extra-pages)/page4" | "/(pineapple)/pineapple/(pineapple)" | "/(seaweed)/portfolio" | "/(seaweed)/portfolio/actual" | "/(seaweed)/portfolio/actual/[slug]" | null
15
+ type LayoutParams = RouteParams & { slug?: string }
16
16
  type LayoutParentData = EnsureDefined<{}>;
17
17
 
18
18
  export type LayoutServerData = null;
@@ -11,8 +11,8 @@ type OutputDataShape<T> = MaybeWithVoid<Omit<App.PageData, RequiredKeys<T>> & Pa
11
11
  type EnsureDefined<T> = T extends null | undefined ? {} : T;
12
12
  type OptionalUnion<U extends Record<string, any>, A extends keyof U = U extends U ? keyof U : never> = U extends unknown ? { [P in Exclude<A, keyof U>]?: never } & U : never;
13
13
  export type Snapshot<T = any> = Kit.Snapshot<T>;
14
- type LayoutRouteId = RouteId | "/(seaweed)/portfolio" | "/(seaweed)/portfolio/actual"
15
- type LayoutParams = RouteParams & { }
14
+ type LayoutRouteId = RouteId | "/(seaweed)/portfolio" | "/(seaweed)/portfolio/actual" | "/(seaweed)/portfolio/actual/[slug]"
15
+ type LayoutParams = RouteParams & { slug?: string }
16
16
  type LayoutParentData = EnsureDefined<import('../$types.js').LayoutData>;
17
17
 
18
18
  export type LayoutServerData = null;
@@ -0,0 +1,25 @@
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 = { slug: string };
7
+ type RouteId = '/(seaweed)/portfolio/actual/[slug]';
8
+ type MaybeWithVoid<T> = {} extends T ? T | void : T;
9
+ export type RequiredKeys<T> = { [K in keyof T]-?: {} extends { [P in K]: T[K] } ? never : K; }[keyof T];
10
+ type OutputDataShape<T> = MaybeWithVoid<Omit<App.PageData, RequiredKeys<T>> & Partial<Pick<App.PageData, keyof T & keyof App.PageData>> & Record<string, any>>
11
+ type EnsureDefined<T> = T extends null | undefined ? {} : T;
12
+ type OptionalUnion<U extends Record<string, any>, A extends keyof U = U extends U ? keyof U : never> = U extends unknown ? { [P in Exclude<A, keyof U>]?: never } & U : never;
13
+ export type Snapshot<T = any> = Kit.Snapshot<T>;
14
+ type PageServerParentData = Omit<EnsureDefined<import('../../../../$types.js').LayoutServerData>, keyof import('../../../$types.js').LayoutServerData> & EnsureDefined<import('../../../$types.js').LayoutServerData>;
15
+ type PageParentData = Omit<EnsureDefined<import('../../../../$types.js').LayoutData>, keyof import('../../../$types.js').LayoutData> & EnsureDefined<import('../../../$types.js').LayoutData>;
16
+
17
+ export type EntryGenerator = () => Promise<Array<RouteParams>> | Array<RouteParams>;
18
+ export type PageServerLoad<OutputData extends OutputDataShape<PageServerParentData> = OutputDataShape<PageServerParentData>> = Kit.ServerLoad<RouteParams, PageServerParentData, OutputData, RouteId>;
19
+ export type PageServerLoadEvent = Parameters<PageServerLoad>[0];
20
+ export type ActionData = unknown;
21
+ export type PageServerData = Expand<OptionalUnion<EnsureDefined<Kit.LoadProperties<Awaited<ReturnType<typeof import('./proxy+page.server.js').load>>>>>>;
22
+ export type PageData = Expand<Omit<PageParentData, keyof PageServerData> & EnsureDefined<PageServerData>>;
23
+ export type Action<OutputData extends Record<string, any> | void = Record<string, any> | void> = Kit.Action<RouteParams, OutputData, RouteId>
24
+ export type Actions<OutputData extends Record<string, any> | void = Record<string, any> | void> = Kit.Actions<RouteParams, OutputData, RouteId>
25
+ export type RequestEvent = Kit.RequestEvent<RouteParams, RouteId>;
@@ -0,0 +1,36 @@
1
+ // @ts-nocheck
2
+ import type { PageServerLoad } from "./$types";
3
+ import type { SlugPageData } from "./SlugPageData";
4
+ import { prismaClient } from "$pkg/server-temp/prisma";
5
+
6
+
7
+ export const load = async ({ params }: Parameters<PageServerLoad>[0]): Promise<SlugPageData> => {
8
+ const slug = params.slug;
9
+ if (slug) {
10
+ try {
11
+ const queryParams = await prismaClient.seaweedParams.findFirst({
12
+ select: {
13
+ queryParams: true
14
+ },
15
+ where: { slug }
16
+ });
17
+
18
+ if (queryParams && queryParams.queryParams) {
19
+ return {
20
+ queryParams: queryParams.queryParams,
21
+ slugFound: true
22
+ };
23
+ }
24
+ } catch (error) {
25
+ console.error("[slug] page server-temp error:", error);
26
+ } finally {
27
+ prismaClient.$disconnect();
28
+ }
29
+ }
30
+
31
+ return {
32
+ queryParams: "",
33
+ slugFound: false
34
+ };
35
+ };
36
+
@@ -0,0 +1 @@
1
+ ./server-temp
@@ -0,0 +1,2 @@
1
+ import { PrismaClient } from "@prisma/client";
2
+ export declare const prismaClient: PrismaClient<import(".prisma/client").Prisma.PrismaClientOptions, never, import("@prisma/client/runtime/library").DefaultArgs>;
@@ -0,0 +1,2 @@
1
+ import { PrismaClient } from "@prisma/client";
2
+ export const prismaClient = new PrismaClient();
@@ -105,8 +105,7 @@ const filterSearchParams = (searchParams) => {
105
105
  onMount(async () => {
106
106
  if (!letChaos && serverSideQueryParams) {
107
107
  filterSearchParams(new URLSearchParams(serverSideQueryParams));
108
- }
109
- if (!letChaos && $page.url.searchParams) {
108
+ } else if (!letChaos && $page.url.searchParams) {
110
109
  filterSearchParams($page.url.searchParams);
111
110
  }
112
111
  if (letChaos) {
@@ -18,10 +18,9 @@ export let props;
18
18
  <h2>This webpage!</h2>
19
19
 
20
20
  <p>
21
- The webpage is made of two parts. The webpage that has the content for everything here, I've
22
- lovingly called Seaweed. I kept seaweed as a private package. On the other hand, the base package which I
23
- want to use for all spin offs of my websites is called Pineapple and have kept that codebase public.
21
+ The webpage is made with two parts. The webpage that has the content for everything here, I've lovingly called Seaweed. I kept seaweed as a private package. On the other hand, the base package which I want to use for all spin offs of my websites is called Pineapple and have kept that codebase public.
24
22
  </p>
23
+ <p>The webpage can dynamically emphasize terms, rearrange the layout, use different terms, and save all these configurations as a shortened link. Additionally fetches the latest blog entries from turnipxenon.com via REST calls.</p>
25
24
 
26
25
  <p>
27
26
  <Chip>Svelte</Chip>
@@ -31,6 +30,7 @@ export let props;
31
30
  <Chip>YarnSpinner</Chip>
32
31
  <Chip>Postgres (SQL database)</Chip>
33
32
  <Chip>Prisma ORM</Chip>
33
+ <Chip>RESTful API</Chip>
34
34
  </p>
35
35
 
36
36
  <section class="game-link-section">
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.69",
4
+ "version": "2.4.71",
5
5
  "scripts": {
6
6
  "dev": "vite dev",
7
7
  "build": "vite build && yarn package",
@@ -33,6 +33,7 @@
33
33
  "postcss": "8.4.35",
34
34
  "prettier": "^3.2.5",
35
35
  "prettier-plugin-svelte": "^3.2.2",
36
+ "prisma": "^5.12.1",
36
37
  "svelte": "^4.2.12",
37
38
  "svelte-check": "^3.6.6",
38
39
  "svelte2tsx": "^0.6.20",
@@ -42,6 +43,7 @@
42
43
  "vite": "^5.1.5"
43
44
  },
44
45
  "dependencies": {
46
+ "@prisma/client": "^5.12.1",
45
47
  "@skeletonlabs/skeleton": "^2.9.0",
46
48
  "@skeletonlabs/tw-plugin": "^0.3.1",
47
49
  "@sveltejs/kit": "^2.5.2",
@@ -0,0 +1,7 @@
1
+ -- CreateTable
2
+ CREATE TABLE "SeaweedParams" (
3
+ "slug" TEXT NOT NULL,
4
+ "queryParams" TEXT NOT NULL,
5
+
6
+ CONSTRAINT "SeaweedParams_pkey" PRIMARY KEY ("slug")
7
+ );
@@ -0,0 +1,3 @@
1
+ # Please do not edit this file manually
2
+ # It should be added in your version-control system (i.e. Git)
3
+ provider = "postgresql"
@@ -0,0 +1,13 @@
1
+ generator client {
2
+ provider = "prisma-client-js"
3
+ }
4
+
5
+ datasource db {
6
+ provider = "postgresql"
7
+ url = env("POSTGRES_PRISMA_URL")
8
+ }
9
+
10
+ model SeaweedParams {
11
+ slug String @id
12
+ queryParams String
13
+ }
@@ -0,0 +1 @@
1
+ ./server-temp
@@ -0,0 +1,3 @@
1
+ import { PrismaClient } from "@prisma/client";
2
+
3
+ export const prismaClient = new PrismaClient();
@@ -152,9 +152,7 @@
152
152
  onMount(async () => {
153
153
  if (!letChaos && serverSideQueryParams) {
154
154
  filterSearchParams(new URLSearchParams(serverSideQueryParams));
155
- }
156
-
157
- if (!letChaos && $page.url.searchParams) {
155
+ } else if (!letChaos && $page.url.searchParams) {
158
156
  filterSearchParams($page.url.searchParams);
159
157
  }
160
158
 
@@ -21,10 +21,9 @@
21
21
  <h2>This webpage!</h2>
22
22
 
23
23
  <p>
24
- The webpage is made of two parts. The webpage that has the content for everything here, I've
25
- lovingly called Seaweed. I kept seaweed as a private package. On the other hand, the base package which I
26
- want to use for all spin offs of my websites is called Pineapple and have kept that codebase public.
24
+ The webpage is made with two parts. The webpage that has the content for everything here, I've lovingly called Seaweed. I kept seaweed as a private package. On the other hand, the base package which I want to use for all spin offs of my websites is called Pineapple and have kept that codebase public.
27
25
  </p>
26
+ <p>The webpage can dynamically emphasize terms, rearrange the layout, use different terms, and save all these configurations as a shortened link. Additionally fetches the latest blog entries from turnipxenon.com via REST calls.</p>
28
27
 
29
28
  <p>
30
29
  <Chip>Svelte</Chip>
@@ -34,6 +33,7 @@
34
33
  <Chip>YarnSpinner</Chip>
35
34
  <Chip>Postgres (SQL database)</Chip>
36
35
  <Chip>Prisma ORM</Chip>
36
+ <Chip>RESTful API</Chip>
37
37
  </p>
38
38
 
39
39
  <section class="game-link-section">
@@ -0,0 +1,35 @@
1
+ import type { PageServerLoad } from "./$types";
2
+ import type { SlugPageData } from "./SlugPageData";
3
+ import { prismaClient } from "$pkg/server-temp/prisma";
4
+
5
+
6
+ export const load: PageServerLoad = async ({ params }): Promise<SlugPageData> => {
7
+ const slug = params.slug;
8
+ if (slug) {
9
+ try {
10
+ const queryParams = await prismaClient.seaweedParams.findFirst({
11
+ select: {
12
+ queryParams: true
13
+ },
14
+ where: { slug }
15
+ });
16
+
17
+ if (queryParams && queryParams.queryParams) {
18
+ return {
19
+ queryParams: queryParams.queryParams,
20
+ slugFound: true
21
+ };
22
+ }
23
+ } catch (error) {
24
+ console.error("[slug] page server-temp error:", error);
25
+ } finally {
26
+ prismaClient.$disconnect();
27
+ }
28
+ }
29
+
30
+ return {
31
+ queryParams: "",
32
+ slugFound: false
33
+ };
34
+ };
35
+
@@ -0,0 +1,40 @@
1
+ <script lang="ts">
2
+ import type { SlugPageData } from "./SlugPageData";
3
+ import { getToastStore, type ToastSettings } from "@skeletonlabs/skeleton";
4
+ import { goto } from "$app/navigation";
5
+ import { onMount } from "svelte";
6
+ import { SeaweedTemplate } from "$pkg";
7
+
8
+ export let data: SlugPageData;
9
+
10
+ if (!data.slugFound) {
11
+ const toastStore = getToastStore();
12
+ const failToast: ToastSettings = {
13
+ message: "URL does not exist. Redirected to default page"
14
+ };
15
+ toastStore.trigger(failToast);
16
+ }
17
+
18
+ onMount(() => {
19
+ if (!data.slugFound) {
20
+ goto("/");
21
+ }
22
+ });
23
+ </script>
24
+
25
+ <svelte:head>
26
+ <meta charset="utf-8" />
27
+ <title>Welcome to Allan's portfolio</title>
28
+ <meta name="twitter:card" content="summary" />
29
+ <meta property="og:url" content="https://www.allanmanuba.com/" />
30
+ <meta property="og:title" content="Welcome to Allan's portfolio" />
31
+ <meta property="og:description" content="This is Allan's portfolio showcasing his experience, games, and projects" />
32
+ </svelte:head>
33
+
34
+ <SeaweedTemplate letChaos={false}
35
+ name="Allan"
36
+ email="allanmanuba@gmail.com"
37
+ linkedinSlug="allan-manuba"
38
+ serverSideQueryParams={data.queryParams}
39
+ domain="https://www.allanmanuba.com/">
40
+ </SeaweedTemplate>
@@ -0,0 +1,4 @@
1
+ export interface SlugPageData {
2
+ queryParams: string;
3
+ slugFound: boolean;
4
+ }
package/yarn.lock CHANGED
@@ -276,6 +276,47 @@
276
276
  resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.24.tgz#58601079e11784d20f82d0585865bb42305c4df3"
277
277
  integrity sha512-2LuNTFBIO0m7kKIQvvPHN6UE63VjpmL9rnEEaOOaiSPbZK+zUOYIzBAWcED+3XYzhYsd/0mD57VdxAEqqV52CQ==
278
278
 
279
+ "@prisma/client@^5.12.1":
280
+ version "5.12.1"
281
+ resolved "https://registry.yarnpkg.com/@prisma/client/-/client-5.12.1.tgz#c26a674fea76754b3a9e8b90a11e617f90212f76"
282
+ integrity sha512-6/JnizEdlSBxDIdiLbrBdMW5NqDxOmhXAJaNXiPpgzAPr/nLZResT6MMpbOHLo5yAbQ1Vv5UU8PTPRzb0WIxdA==
283
+
284
+ "@prisma/debug@5.12.1":
285
+ version "5.12.1"
286
+ resolved "https://registry.yarnpkg.com/@prisma/debug/-/debug-5.12.1.tgz#007c8ad2e466d565bcd0671b8846c27f8700c722"
287
+ integrity sha512-kd/wNsR0klrv79o1ITsbWxYyh4QWuBidvxsXSParPsYSu0ircUmNk3q4ojsgNc3/81b0ozg76iastOG43tbf8A==
288
+
289
+ "@prisma/engines-version@5.12.0-21.473ed3124229e22d881cb7addf559799debae1ab":
290
+ version "5.12.0-21.473ed3124229e22d881cb7addf559799debae1ab"
291
+ resolved "https://registry.yarnpkg.com/@prisma/engines-version/-/engines-version-5.12.0-21.473ed3124229e22d881cb7addf559799debae1ab.tgz#c78d099a3fe86d446db7442e64e56987e39e7f32"
292
+ integrity sha512-6yvO8s80Tym61aB4QNtYZfWVmE3pwqe807jEtzm8C5VDe7nw8O1FGX3TXUaXmWV0fQTIAfRbeL2Gwrndabp/0g==
293
+
294
+ "@prisma/engines@5.12.1":
295
+ version "5.12.1"
296
+ resolved "https://registry.yarnpkg.com/@prisma/engines/-/engines-5.12.1.tgz#a50649427d627a9af962a188a84c65d61c6e2b3f"
297
+ integrity sha512-HQDdglLw2bZR/TXD2Y+YfDMvi5Q8H+acbswqOsWyq9pPjBLYJ6gzM+ptlTU/AV6tl0XSZLU1/7F4qaWa8bqpJA==
298
+ dependencies:
299
+ "@prisma/debug" "5.12.1"
300
+ "@prisma/engines-version" "5.12.0-21.473ed3124229e22d881cb7addf559799debae1ab"
301
+ "@prisma/fetch-engine" "5.12.1"
302
+ "@prisma/get-platform" "5.12.1"
303
+
304
+ "@prisma/fetch-engine@5.12.1":
305
+ version "5.12.1"
306
+ resolved "https://registry.yarnpkg.com/@prisma/fetch-engine/-/fetch-engine-5.12.1.tgz#c38e9fa17fdc535b4c83cbb7645569ad0a511fa9"
307
+ integrity sha512-qSs3KcX1HKcea1A+hlJVK/ljj0PNIUHDxAayGMvgJBqmaN32P9tCidlKz1EGv6WoRFICYnk3Dd/YFLBwnFIozA==
308
+ dependencies:
309
+ "@prisma/debug" "5.12.1"
310
+ "@prisma/engines-version" "5.12.0-21.473ed3124229e22d881cb7addf559799debae1ab"
311
+ "@prisma/get-platform" "5.12.1"
312
+
313
+ "@prisma/get-platform@5.12.1":
314
+ version "5.12.1"
315
+ resolved "https://registry.yarnpkg.com/@prisma/get-platform/-/get-platform-5.12.1.tgz#33f427f6d744dee62a9e06858889691d78b50804"
316
+ integrity sha512-pgIR+pSvhYHiUcqXVEZS31NrFOTENC9yFUdEAcx7cdQBoZPmHVjtjN4Ss6NzVDMYPrKJJ51U14EhEoeuBlMioQ==
317
+ dependencies:
318
+ "@prisma/debug" "5.12.1"
319
+
279
320
  "@rollup/rollup-android-arm-eabi@4.12.1":
280
321
  version "4.12.1"
281
322
  resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.12.1.tgz#11aaa02a933864b87f0b31cf2b755734e1f22787"
@@ -1980,6 +2021,13 @@ prettier@^3.2.5:
1980
2021
  resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.2.5.tgz#e52bc3090586e824964a8813b09aba6233b28368"
1981
2022
  integrity sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==
1982
2023
 
2024
+ prisma@^5.12.1:
2025
+ version "5.12.1"
2026
+ resolved "https://registry.yarnpkg.com/prisma/-/prisma-5.12.1.tgz#db4596253bb066afc9f08744642f200a398d8d51"
2027
+ integrity sha512-SkMnb6wyIxTv9ACqiHBI2u9gD6y98qXRoCoLEnZsF6yee5Qg828G+ARrESN+lQHdw4maSZFFSBPPDpvSiVTo0Q==
2028
+ dependencies:
2029
+ "@prisma/engines" "5.12.1"
2030
+
1983
2031
  publint@^0.2.7:
1984
2032
  version "0.2.7"
1985
2033
  resolved "https://registry.yarnpkg.com/publint/-/publint-0.2.7.tgz#7b57ec5ff117c329f56dfe98d328e2bd860e12bf"