@turnipxenon/pineapple 2.4.12 → 2.4.13
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 +69 -66
- package/.svelte-kit/__package__/components/Card.svelte +27 -27
- package/.svelte-kit/__package__/components/CarouselElement.svelte +16 -16
- package/.svelte-kit/__package__/components/Chip.svelte +12 -12
- package/.svelte-kit/__package__/components/ElementVisbilityDetector.svelte +5 -5
- package/.svelte-kit/__package__/components/SocialSection.svelte +162 -159
- package/.svelte-kit/__package__/components/StickyElement.svelte +20 -20
- package/.svelte-kit/__package__/components/ToggleableContent.svelte +8 -8
- package/.svelte-kit/__package__/components/layouts/PineappleBaseLayout.svelte +21 -0
- package/.svelte-kit/__package__/components/layouts/SeaweedBaseLayout.svelte +1 -8
- package/.svelte-kit/__package__/components/layouts/SeaweedBaseLayout.svelte.d.ts +1 -0
- package/.svelte-kit/__package__/postcss.d.ts +3 -3
- package/.svelte-kit/__package__/styles/global.css +1 -1
- package/.svelte-kit/__package__/theme.postcss +2 -1
- package/.svelte-kit/ambient.d.ts +4 -0
- package/.svelte-kit/generated/client/app.js +6 -5
- package/.svelte-kit/generated/client/nodes/2.js +1 -1
- package/.svelte-kit/generated/client/nodes/3.js +1 -1
- package/.svelte-kit/generated/client/nodes/4.js +1 -1
- package/.svelte-kit/generated/client/nodes/5.js +1 -1
- package/.svelte-kit/generated/client/nodes/6.js +1 -1
- package/.svelte-kit/generated/client/nodes/7.js +1 -0
- package/.svelte-kit/generated/server/internal.js +1 -1
- package/.svelte-kit/types/route_meta_data.json +6 -4
- package/.svelte-kit/types/src/routes/$types.d.ts +1 -4
- package/.svelte-kit/types/src/routes/{personal → (pineapple)}/$types.d.ts +2 -2
- package/.svelte-kit/types/src/routes/{portfolio/actual → (pineapple)/personal}/$types.d.ts +2 -2
- package/.svelte-kit/types/src/routes/(seaweed)/$types.d.ts +19 -0
- package/.svelte-kit/types/src/routes/{portfolio → (seaweed)/portfolio}/$types.d.ts +3 -3
- package/.svelte-kit/types/src/routes/(seaweed)/portfolio/actual/$types.d.ts +17 -0
- package/.svelte-kit/types/src/routes/{portfolio → (seaweed)/portfolio}/proxy+page.server.ts +1 -1
- package/README.md +8 -18
- package/dist/components/Card.svelte +27 -27
- package/dist/components/CarouselElement.svelte +16 -16
- package/dist/components/Chip.svelte +12 -12
- package/dist/components/ElementVisbilityDetector.svelte +5 -5
- package/dist/components/SocialSection.svelte +162 -159
- package/dist/components/StickyElement.svelte +20 -20
- package/dist/components/ToggleableContent.svelte +8 -8
- package/dist/components/layouts/PineappleBaseLayout.svelte +21 -0
- package/dist/components/layouts/SeaweedBaseLayout.svelte +1 -8
- package/dist/components/layouts/SeaweedBaseLayout.svelte.d.ts +1 -0
- package/dist/postcss.d.ts +3 -3
- package/dist/styles/global.css +1 -1
- package/dist/theme.postcss +2 -1
- package/package.json +1 -1
- package/src/lib/components/Card.svelte +32 -32
- package/src/lib/components/CarouselElement.svelte +22 -22
- package/src/lib/components/Chip.svelte +12 -12
- package/src/lib/components/ElementVisbilityDetector.svelte +22 -22
- package/src/lib/components/OnElementVisbilityChanged.ts +1 -1
- package/src/lib/components/SocialSection.svelte +95 -92
- package/src/lib/components/StickyElement.svelte +39 -39
- package/src/lib/components/ToggleableContent.svelte +85 -85
- package/src/lib/components/ToggleableContentType.ts +4 -4
- package/src/lib/components/layouts/LayoutConstants.ts +1 -1
- package/src/lib/components/layouts/PineappleBaseLayout.svelte +21 -0
- package/src/lib/components/layouts/SeaweedBaseLayout.svelte +1 -8
- package/src/lib/consts.ts +2 -2
- package/src/lib/postcss.d.ts +3 -3
- package/src/lib/styles/global.css +1 -1
- package/src/lib/theme.postcss +2 -1
- package/src/lib/util/create_go_to_function.ts +5 -5
- package/src/routes/{personal → (pineapple)}/+layout.svelte +1 -1
- package/src/routes/(pineapple)/+page.svelte +36 -0
- package/src/routes/(seaweed)/+layout.svelte +10 -0
- package/src/routes/{portfolio → (seaweed)/portfolio}/+page.server.ts +1 -1
- package/src/routes/{portfolio → (seaweed)/portfolio}/+page.svelte +2 -2
- package/src/routes/{portfolio → (seaweed)/portfolio}/.gitignore +1 -1
- package/src/routes/{portfolio → (seaweed)/portfolio}/actual/+page.svelte +1 -1
- package/src/routes/+layout.svelte +0 -7
- package/static/robots.txt +5 -5
- package/src/routes/+page.svelte +0 -38
- /package/src/routes/{personal → (pineapple)/personal}/+page.svelte +0 -0
|
@@ -55,12 +55,12 @@ onMount(() => {
|
|
|
55
55
|
});
|
|
56
56
|
$:
|
|
57
57
|
attachGibberish(gibberishParent);
|
|
58
|
-
</script>
|
|
59
|
-
|
|
60
|
-
{#if toggle === ToggleableContentType.Default}
|
|
61
|
-
<slot />
|
|
62
|
-
{:else if (ToggleableContentType.Gibberish === toggle)}
|
|
63
|
-
<div bind:this={defaultSlot} style={`visibility: ${gibberishState === GibberishState.Binded}`}>
|
|
64
|
-
<slot />
|
|
65
|
-
</div>
|
|
58
|
+
</script>
|
|
59
|
+
|
|
60
|
+
{#if toggle === ToggleableContentType.Default}
|
|
61
|
+
<slot />
|
|
62
|
+
{:else if (ToggleableContentType.Gibberish === toggle)}
|
|
63
|
+
<div bind:this={defaultSlot} style={`visibility: ${gibberishState === GibberishState.Binded}`}>
|
|
64
|
+
<slot />
|
|
65
|
+
</div>
|
|
66
66
|
{/if}
|
|
@@ -4,6 +4,7 @@ import { page } from "$app/stores";
|
|
|
4
4
|
import { enableBackground } from "../../store";
|
|
5
5
|
import DialogOverlay from "../DialogOverlay.svelte";
|
|
6
6
|
import AresLogo from "../../assets/characters/ares/ares_logo.webp";
|
|
7
|
+
import FABIcon from "../../assets/placeholder/placeholder_circle.png";
|
|
7
8
|
import { enableDialogueOverlay } from "../dialog_manager/DialogManagerStore";
|
|
8
9
|
let pages = [];
|
|
9
10
|
const updateBreadcrumb = (pathname) => {
|
|
@@ -46,6 +47,13 @@ enableDialogueOverlay.subscribe((value) => {
|
|
|
46
47
|
{@html `<script>${autoModeWatcher.toString()} autoModeWatcher();</script>`}
|
|
47
48
|
</svelte:head>
|
|
48
49
|
|
|
50
|
+
<!--todo: turn off hidden when it's time-->
|
|
51
|
+
<button type="button" class="fab" on:click={()=>{
|
|
52
|
+
enableDialogueOverlay.set(!enableDialogueOverlayValue);
|
|
53
|
+
}}>
|
|
54
|
+
<img src={FABIcon} alt="interactive floating action button represented as a turnip">
|
|
55
|
+
</button>
|
|
56
|
+
|
|
49
57
|
<AppShell>
|
|
50
58
|
<svelte:fragment slot="header">
|
|
51
59
|
<!-- App Bar -->
|
|
@@ -184,4 +192,17 @@ enableDialogueOverlay.subscribe((value) => {
|
|
|
184
192
|
.breadcrumb li:nth-last-child(1) {
|
|
185
193
|
display: block;
|
|
186
194
|
}
|
|
195
|
+
|
|
196
|
+
.fab {
|
|
197
|
+
position: fixed;
|
|
198
|
+
bottom: 2em;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.fab:dir(ltr) {
|
|
202
|
+
right: 2em;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.fab:dir(rtl) {
|
|
206
|
+
left: 2em;
|
|
207
|
+
}
|
|
187
208
|
</style>
|
|
@@ -18,13 +18,6 @@ let shouldDisplaySocialIcons = writable(false);
|
|
|
18
18
|
{@html `<script>${autoModeWatcher.toString()} autoModeWatcher();</script>`}
|
|
19
19
|
</svelte:head>
|
|
20
20
|
|
|
21
|
-
<!--todo: turn off hidden when it's time-->
|
|
22
|
-
<!--<button type="button" class="fab" on:click={()=>{-->
|
|
23
|
-
<!-- enableDialogueOverlay.set(!enableDialogueOverlayValue);-->
|
|
24
|
-
<!--}}>-->
|
|
25
|
-
<!-- <img src={FABIcon} alt="interactive floating action button represented as a turnip">-->
|
|
26
|
-
<!--</button>-->
|
|
27
|
-
|
|
28
21
|
<AppShell>
|
|
29
22
|
<svelte:fragment slot="header">
|
|
30
23
|
<!-- App Bar -->
|
|
@@ -39,7 +32,7 @@ let shouldDisplaySocialIcons = writable(false);
|
|
|
39
32
|
</div>
|
|
40
33
|
{:else if $$slots.extraLeadingIcons}
|
|
41
34
|
<div hidden>
|
|
42
|
-
<slot name="
|
|
35
|
+
<slot name="s" />
|
|
43
36
|
</div>
|
|
44
37
|
{/if}
|
|
45
38
|
</svelte:fragment>
|
package/dist/postcss.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
// from https://stackoverflow.com/a/63885623/17836168
|
|
2
|
-
declare module "./app.postcss";
|
|
3
|
-
declare module "./theme.postcss";
|
|
1
|
+
// from https://stackoverflow.com/a/63885623/17836168
|
|
2
|
+
declare module "./app.postcss";
|
|
3
|
+
declare module "./theme.postcss";
|
package/dist/styles/global.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
/* todo: delete if unneeded */
|
|
1
|
+
/* todo: delete if unneeded */
|
package/dist/theme.postcss
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
--theme-font-family-base: system-ui;
|
|
6
6
|
--theme-font-family-heading: system-ui;
|
|
7
7
|
--theme-font-color-base: var(--color-primary-900);
|
|
8
|
-
--theme-font-color-dark: var(--color-primary-
|
|
8
|
+
--theme-font-color-dark: var(--color-primary-50);
|
|
9
9
|
--theme-rounded-base: 24px;
|
|
10
10
|
--theme-rounded-container: 16px;
|
|
11
11
|
--theme-border-base: 2px;
|
|
@@ -99,6 +99,7 @@
|
|
|
99
99
|
--color-surface-800: 153 148 136; /* ⬅ #999488 */
|
|
100
100
|
--color-surface-900: 125 121 111; /* ⬅ #7d796f */
|
|
101
101
|
/* text color | #3f312f */
|
|
102
|
+
--color-text-25: 237 234 234; /* ⬅ #e2e0e0 */
|
|
102
103
|
--color-text-50: 226 224 224; /* ⬅ #e2e0e0 */
|
|
103
104
|
--color-text-100: 217 214 213; /* ⬅ #d9d6d5 */
|
|
104
105
|
--color-text-200: 207 204 203; /* ⬅ #cfcccb */
|
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.13",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "vite dev",
|
|
7
7
|
"build": "npm run check-requirements && vite build && yarn package",
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
export let margin = "0";
|
|
3
|
-
export let marginBottom = "3em";
|
|
4
|
-
export let overrideStyle = "";
|
|
5
|
-
export let includeDataNoSnippet = true;
|
|
6
|
-
|
|
7
|
-
// warning: don't forget the semi-colon when adding new style!
|
|
8
|
-
const style = `
|
|
9
|
-
--turnip-card-margin: ${margin};
|
|
10
|
-
--turnip-card-margin-bottom: ${marginBottom};
|
|
11
|
-
${overrideStyle};
|
|
12
|
-
`;
|
|
13
|
-
</script>
|
|
14
|
-
|
|
15
|
-
{#if (includeDataNoSnippet)}
|
|
16
|
-
<div class="card turnip-card" style={style} data-no-snippet>
|
|
17
|
-
<slot name="content" class="card" />
|
|
18
|
-
</div>
|
|
19
|
-
{:else }
|
|
20
|
-
<div class="card turnip-card" style={style}>
|
|
21
|
-
<slot name="content" class="card" />
|
|
22
|
-
</div>
|
|
23
|
-
{/if}
|
|
24
|
-
|
|
25
|
-
<style lang="postcss">
|
|
26
|
-
.turnip-card {
|
|
27
|
-
@apply bg-surface-100 dark:bg-surface-900;
|
|
28
|
-
margin: var(--turnip-card-margin);
|
|
29
|
-
margin-bottom: var(--turnip-card-margin-bottom);
|
|
30
|
-
border-radius: var(--theme-rounded-container);
|
|
31
|
-
}
|
|
32
|
-
</style>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
export let margin = "0";
|
|
3
|
+
export let marginBottom = "3em";
|
|
4
|
+
export let overrideStyle = "";
|
|
5
|
+
export let includeDataNoSnippet = true;
|
|
6
|
+
|
|
7
|
+
// warning: don't forget the semi-colon when adding new style!
|
|
8
|
+
const style = `
|
|
9
|
+
--turnip-card-margin: ${margin};
|
|
10
|
+
--turnip-card-margin-bottom: ${marginBottom};
|
|
11
|
+
${overrideStyle};
|
|
12
|
+
`;
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
{#if (includeDataNoSnippet)}
|
|
16
|
+
<div class="card turnip-card" style={style} data-no-snippet>
|
|
17
|
+
<slot name="content" class="card" />
|
|
18
|
+
</div>
|
|
19
|
+
{:else }
|
|
20
|
+
<div class="card turnip-card" style={style}>
|
|
21
|
+
<slot name="content" class="card" />
|
|
22
|
+
</div>
|
|
23
|
+
{/if}
|
|
24
|
+
|
|
25
|
+
<style lang="postcss">
|
|
26
|
+
.turnip-card {
|
|
27
|
+
@apply bg-surface-100 dark:bg-surface-900;
|
|
28
|
+
margin: var(--turnip-card-margin);
|
|
29
|
+
margin-bottom: var(--turnip-card-margin-bottom);
|
|
30
|
+
border-radius: var(--theme-rounded-container);
|
|
31
|
+
}
|
|
32
|
+
</style>
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
export let activeGameIndex: number;
|
|
3
|
-
export let selfIndex: number;
|
|
4
|
-
|
|
5
|
-
import {fly, slide, scale} from "svelte/transition";
|
|
6
|
-
|
|
7
|
-
</script>
|
|
8
|
-
|
|
9
|
-
{#if (activeGameIndex === selfIndex)}
|
|
10
|
-
<!--todo: make section consistent size for all-->
|
|
11
|
-
<section class="game-showcase"
|
|
12
|
-
in:fly={{x: '100%'}} out:fly={{x: '-100%'}}>
|
|
13
|
-
<slot/>
|
|
14
|
-
</section>
|
|
15
|
-
{/if}
|
|
16
|
-
|
|
17
|
-
<style>
|
|
18
|
-
.game-showcase {
|
|
19
|
-
@apply snap-center rounded-container-token;
|
|
20
|
-
margin: auto;
|
|
21
|
-
width: 100%;
|
|
22
|
-
}
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
export let activeGameIndex: number;
|
|
3
|
+
export let selfIndex: number;
|
|
4
|
+
|
|
5
|
+
import {fly, slide, scale} from "svelte/transition";
|
|
6
|
+
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
{#if (activeGameIndex === selfIndex)}
|
|
10
|
+
<!--todo: make section consistent size for all-->
|
|
11
|
+
<section class="game-showcase"
|
|
12
|
+
in:fly={{x: '100%'}} out:fly={{x: '-100%'}}>
|
|
13
|
+
<slot/>
|
|
14
|
+
</section>
|
|
15
|
+
{/if}
|
|
16
|
+
|
|
17
|
+
<style>
|
|
18
|
+
.game-showcase {
|
|
19
|
+
@apply snap-center rounded-container-token;
|
|
20
|
+
margin: auto;
|
|
21
|
+
width: 100%;
|
|
22
|
+
}
|
|
23
23
|
</style>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
<span class="chip variant-filled-tertiary">
|
|
2
|
-
<slot />
|
|
3
|
-
</span>
|
|
4
|
-
|
|
5
|
-
<style lang="postcss">
|
|
6
|
-
.chip {
|
|
7
|
-
border-radius: 1em;
|
|
8
|
-
margin: 0.25em;
|
|
9
|
-
font-weight: bold;
|
|
10
|
-
pointer-events: none;
|
|
11
|
-
}
|
|
12
|
-
</style>
|
|
1
|
+
<span class="chip variant-filled-tertiary">
|
|
2
|
+
<slot />
|
|
3
|
+
</span>
|
|
4
|
+
|
|
5
|
+
<style lang="postcss">
|
|
6
|
+
.chip {
|
|
7
|
+
border-radius: 1em;
|
|
8
|
+
margin: 0.25em;
|
|
9
|
+
font-weight: bold;
|
|
10
|
+
pointer-events: none;
|
|
11
|
+
}
|
|
12
|
+
</style>
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import {onMount} from "svelte";
|
|
3
|
-
|
|
4
|
-
export let isVisible = true;
|
|
5
|
-
|
|
6
|
-
let stickyElem: HTMLElement;
|
|
7
|
-
|
|
8
|
-
let observer: undefined | IntersectionObserver;
|
|
9
|
-
onMount(() => {
|
|
10
|
-
observer = new IntersectionObserver(
|
|
11
|
-
([e]) => {
|
|
12
|
-
isVisible = e.intersectionRatio >= 1;
|
|
13
|
-
},
|
|
14
|
-
{threshold: [1]}
|
|
15
|
-
);
|
|
16
|
-
observer.observe(stickyElem);
|
|
17
|
-
});
|
|
18
|
-
</script>
|
|
19
|
-
|
|
20
|
-
<span bind:this={stickyElem}>
|
|
21
|
-
<slot/>
|
|
22
|
-
</span>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import {onMount} from "svelte";
|
|
3
|
+
|
|
4
|
+
export let isVisible = true;
|
|
5
|
+
|
|
6
|
+
let stickyElem: HTMLElement;
|
|
7
|
+
|
|
8
|
+
let observer: undefined | IntersectionObserver;
|
|
9
|
+
onMount(() => {
|
|
10
|
+
observer = new IntersectionObserver(
|
|
11
|
+
([e]) => {
|
|
12
|
+
isVisible = e.intersectionRatio >= 1;
|
|
13
|
+
},
|
|
14
|
+
{threshold: [1]}
|
|
15
|
+
);
|
|
16
|
+
observer.observe(stickyElem);
|
|
17
|
+
});
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<span bind:this={stickyElem}>
|
|
21
|
+
<slot/>
|
|
22
|
+
</span>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type OnElementVisibilityChanged = (isVisible: boolean) => void;
|
|
1
|
+
export type OnElementVisibilityChanged = (isVisible: boolean) => void;
|
|
@@ -1,93 +1,96 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
{
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
{
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
{
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
{
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
1
|
+
<script>
|
|
2
|
+
export let isSmallVersion = false;
|
|
3
|
+
export let email = "turnipxenon@gmail.com";
|
|
4
|
+
export let linkedinSlug = "turnip-xenon";
|
|
5
|
+
export let isSlot = false;
|
|
6
|
+
|
|
7
|
+
import { ItchLogoHotLink } from "$pkg/consts";
|
|
8
|
+
import { onMount } from "svelte";
|
|
9
|
+
import { scale } from "svelte/transition";
|
|
10
|
+
|
|
11
|
+
import MailIcon from "$pkg/assets/icons/mail.svg";
|
|
12
|
+
import GithubIcon from "$pkg/assets/icons/github-mark.svg";
|
|
13
|
+
import LinkedinIcon from "$pkg/assets/icons/linkedin.svg";
|
|
14
|
+
|
|
15
|
+
let shouldShowExtra = false;
|
|
16
|
+
const style = `
|
|
17
|
+
--preferred-justify-content: ${isSlot ? "flex-start" : "center"};
|
|
18
|
+
--preferred-overall-margin-bottom: ${isSlot ? "0" : "0.75lh"};
|
|
19
|
+
`;
|
|
20
|
+
|
|
21
|
+
onMount(() => {
|
|
22
|
+
shouldShowExtra = window.screen.availWidth >= 440;
|
|
23
|
+
});
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<div class="socials" class:isSmall={isSmallVersion} style={style} data-nosnippet>
|
|
27
|
+
<button type="button" class="social-button turnip-button"
|
|
28
|
+
role="link"
|
|
29
|
+
title="https://github.com/TurnipXenon"
|
|
30
|
+
on:click={() => window.open("https://github.com/TurnipXenon")}>
|
|
31
|
+
<img src={GithubIcon} alt="github icon">
|
|
32
|
+
{#if (!isSmallVersion)}
|
|
33
|
+
<span>TurnipXenon</span>
|
|
34
|
+
{/if}
|
|
35
|
+
</button>
|
|
36
|
+
<button type="button" class="social-button turnip-button"
|
|
37
|
+
role="link"
|
|
38
|
+
title={`https://www.linkedin.com/in/${linkedinSlug}/`}
|
|
39
|
+
on:click={() => window.open(`https://www.linkedin.com/in/${linkedinSlug}/`)}>
|
|
40
|
+
<img src={LinkedinIcon} alt="linkedikn icon">
|
|
41
|
+
{#if (!isSmallVersion)}
|
|
42
|
+
<span>{linkedinSlug}</span>
|
|
43
|
+
{/if}
|
|
44
|
+
</button>
|
|
45
|
+
<button type="button" class="social-button turnip-button"
|
|
46
|
+
role="link"
|
|
47
|
+
title={`mailto:${email}`}
|
|
48
|
+
on:click={() => window.open(`mailto:${email}`)}>
|
|
49
|
+
<img src={MailIcon} alt="mail icon" />
|
|
50
|
+
{#if (!isSmallVersion)}
|
|
51
|
+
<span>{email}</span>
|
|
52
|
+
{/if}
|
|
53
|
+
</button>
|
|
54
|
+
{#if (shouldShowExtra)}
|
|
55
|
+
<button type="button" class="social-button turnip-button"
|
|
56
|
+
role="link"
|
|
57
|
+
title="https://turnipxenon.itch.io/"
|
|
58
|
+
transition:scale
|
|
59
|
+
on:click={() => window.open("https://turnipxenon.itch.io/")}>
|
|
60
|
+
<img src={ItchLogoHotLink} alt="itch icon">
|
|
61
|
+
{#if (!isSmallVersion)}
|
|
62
|
+
<span>TurnipXenon</span>
|
|
63
|
+
{/if}
|
|
64
|
+
</button>
|
|
65
|
+
{/if}
|
|
66
|
+
</div>
|
|
67
|
+
|
|
68
|
+
<style lang="postcss">
|
|
69
|
+
.social-button {
|
|
70
|
+
@apply btn variant-filled-primary;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
button > img {
|
|
74
|
+
max-height: 1lh;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
button {
|
|
78
|
+
min-width: 0;
|
|
79
|
+
min-height: 0;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.socials {
|
|
83
|
+
display: flex;
|
|
84
|
+
flex-wrap: wrap;
|
|
85
|
+
justify-content: var(--preferred-justify-content);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.socials > button {
|
|
89
|
+
margin: 0 0.5em var(--preferred-overall-margin-bottom);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.socials.isSmall > button {
|
|
93
|
+
margin-left: 0.25em;
|
|
94
|
+
margin-right: 0.25em;
|
|
95
|
+
}
|
|
93
96
|
</style>
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import {onMount} from "svelte";
|
|
3
|
-
import {fly} from "svelte/transition";
|
|
4
|
-
|
|
5
|
-
export let isFirst = false;
|
|
6
|
-
|
|
7
|
-
let stickyElem: HTMLElement;
|
|
8
|
-
let isSticky = false;
|
|
9
|
-
|
|
10
|
-
let observer: undefined | IntersectionObserver;
|
|
11
|
-
onMount(() => {
|
|
12
|
-
observer = new IntersectionObserver(
|
|
13
|
-
([e]) => {
|
|
14
|
-
isSticky = e.intersectionRatio < 1;
|
|
15
|
-
},
|
|
16
|
-
{threshold: [1]}
|
|
17
|
-
);
|
|
18
|
-
observer.observe(stickyElem);
|
|
19
|
-
});
|
|
20
|
-
</script>
|
|
21
|
-
|
|
22
|
-
<span transition:fly={{y: -100}}>
|
|
23
|
-
{#if (isFirst && !isSticky)}
|
|
24
|
-
<!-- intentionally empty -->
|
|
25
|
-
{:else if (isSticky)}
|
|
26
|
-
{" | "}
|
|
27
|
-
{:else }
|
|
28
|
-
<br>
|
|
29
|
-
{/if}
|
|
30
|
-
<span class="sticky-div" bind:this={stickyElem}>
|
|
31
|
-
<slot/>
|
|
32
|
-
</span>
|
|
33
|
-
</span>
|
|
34
|
-
|
|
35
|
-
<style>
|
|
36
|
-
.sticky-div {
|
|
37
|
-
position: sticky;
|
|
38
|
-
top: -1px;
|
|
39
|
-
}
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import {onMount} from "svelte";
|
|
3
|
+
import {fly} from "svelte/transition";
|
|
4
|
+
|
|
5
|
+
export let isFirst = false;
|
|
6
|
+
|
|
7
|
+
let stickyElem: HTMLElement;
|
|
8
|
+
let isSticky = false;
|
|
9
|
+
|
|
10
|
+
let observer: undefined | IntersectionObserver;
|
|
11
|
+
onMount(() => {
|
|
12
|
+
observer = new IntersectionObserver(
|
|
13
|
+
([e]) => {
|
|
14
|
+
isSticky = e.intersectionRatio < 1;
|
|
15
|
+
},
|
|
16
|
+
{threshold: [1]}
|
|
17
|
+
);
|
|
18
|
+
observer.observe(stickyElem);
|
|
19
|
+
});
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<span transition:fly={{y: -100}}>
|
|
23
|
+
{#if (isFirst && !isSticky)}
|
|
24
|
+
<!-- intentionally empty -->
|
|
25
|
+
{:else if (isSticky)}
|
|
26
|
+
{" | "}
|
|
27
|
+
{:else }
|
|
28
|
+
<br>
|
|
29
|
+
{/if}
|
|
30
|
+
<span class="sticky-div" bind:this={stickyElem}>
|
|
31
|
+
<slot/>
|
|
32
|
+
</span>
|
|
33
|
+
</span>
|
|
34
|
+
|
|
35
|
+
<style>
|
|
36
|
+
.sticky-div {
|
|
37
|
+
position: sticky;
|
|
38
|
+
top: -1px;
|
|
39
|
+
}
|
|
40
40
|
</style>
|