@turnipxenon/pineapple 4.3.1 → 4.4.0

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.
@@ -1,3 +1,4 @@
1
1
  export { menuPageServerLoad } from "./route-util/menuPageServerLoad";
2
2
  export { slugPageServerLoad } from "./route-util/slugPageServerLoad";
3
+ export { getSlugEntries } from "./route-util/getSlugEntries";
3
4
  export { default as ParsnipBlog } from "./route-util/ParsnipBlog.svelte";
@@ -1,3 +1,4 @@
1
1
  export { menuPageServerLoad } from "./route-util/menuPageServerLoad";
2
2
  export { slugPageServerLoad } from "./route-util/slugPageServerLoad";
3
+ export { getSlugEntries } from "./route-util/getSlugEntries";
3
4
  export { default as ParsnipBlog } from "./route-util/ParsnipBlog.svelte";
@@ -0,0 +1,3 @@
1
+ export declare const getSlugEntries: () => Promise<{
2
+ slug: string;
3
+ }[]>;
@@ -0,0 +1,17 @@
1
+ // https://svelte.dev/docs/kit/page-options#entries
2
+ import { getCmsBaseUrl } from "../../../util/env-getter";
3
+ export const getSlugEntries = async () => {
4
+ const baseUrl = getCmsBaseUrl();
5
+ const mainMeta = await fetch(`${baseUrl}/main.meta.json`);
6
+ if (!mainMeta.ok) {
7
+ console.error("Failed to get entries");
8
+ return [];
9
+ }
10
+ const parsnipOverall = {
11
+ ...(await mainMeta.json()),
12
+ baseUrl
13
+ };
14
+ return parsnipOverall.files.map(f => ({
15
+ slug: f.slug
16
+ }));
17
+ };
@@ -15,6 +15,8 @@
15
15
  import { page } from "$app/state";
16
16
 
17
17
  let {
18
+ email,
19
+ linkedinSlug,
18
20
  children,
19
21
  sideSection,
20
22
  entryList, // todo
@@ -22,7 +24,7 @@
22
24
  domain = "http://localhost:5173/seaweed2",
23
25
  queryTerms,
24
26
  showMiniSocial = false,
25
- serverParams = "",
27
+ serverParams = ""
26
28
  }: SeaweedLayoutProps = $props();
27
29
 
28
30
  let actualLayout = $state(layout);
@@ -161,7 +163,10 @@
161
163
 
162
164
 
163
165
  {#snippet socialSection()}
164
- <SocialSection></SocialSection>
166
+ <SocialSection
167
+ email={email}
168
+ linkedinSlug={linkedinSlug}
169
+ />
165
170
  {/snippet}
166
171
  <PinyaPageLayout>
167
172
  {#snippet appBarLead()}
@@ -170,7 +175,11 @@
170
175
  class="flex flex-row"
171
176
  transition:fly={{x:-10}}
172
177
  >
173
- <SocialSection isSmallVersion={true} />
178
+ <SocialSection
179
+ isSmallVersion={true}
180
+ email={email}
181
+ linkedinSlug={linkedinSlug}
182
+ />
174
183
  </div>
175
184
  {/if}
176
185
  {/snippet}
@@ -277,4 +286,4 @@
277
286
  gap: 0.25em;
278
287
  margin-top: 1lh;
279
288
  }
280
- </style>
289
+ </style>
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": "4.3.1",
4
+ "version": "4.4.0",
5
5
  "scripts": {
6
6
  "dev": "vite dev",
7
7
  "build": "vite build && yarn package",