@turnipxenon/pineapple 2.4.11 → 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 +87 -86
- 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__/template/SeaweedTemplate.svelte +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/template/SeaweedTemplate.svelte +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/template/SeaweedTemplate.svelte +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
|
@@ -4,14 +4,14 @@ type Expand<T> = T extends infer O ? { [K in keyof O]: O[K] } : never;
|
|
|
4
4
|
// @ts-ignore
|
|
5
5
|
type MatcherParam<M> = M extends (param : string) => param is infer U ? U extends string ? U : string : string;
|
|
6
6
|
type RouteParams = { };
|
|
7
|
-
type RouteId = '/
|
|
7
|
+
type RouteId = '/(pineapple)/personal';
|
|
8
8
|
type MaybeWithVoid<T> = {} extends T ? T | void : T;
|
|
9
9
|
export type RequiredKeys<T> = { [K in keyof T]-?: {} extends { [P in K]: T[K] } ? never : K; }[keyof T];
|
|
10
10
|
type OutputDataShape<T> = MaybeWithVoid<Omit<App.PageData, RequiredKeys<T>> & Partial<Pick<App.PageData, keyof T & keyof App.PageData>> & Record<string, any>>
|
|
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 PageParentData = EnsureDefined<import('../../$types.js').LayoutData>;
|
|
14
|
+
type PageParentData = Omit<EnsureDefined<import('../../$types.js').LayoutData>, keyof import('../$types.js').LayoutData> & EnsureDefined<import('../$types.js').LayoutData>;
|
|
15
15
|
|
|
16
16
|
export type PageServerData = null;
|
|
17
17
|
export type PageData = Expand<PageParentData>;
|
|
@@ -0,0 +1,19 @@
|
|
|
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 = { };
|
|
7
|
+
type RouteId = '/(seaweed)';
|
|
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 LayoutRouteId = RouteId | "/(seaweed)/portfolio" | "/(seaweed)/portfolio/actual"
|
|
15
|
+
type LayoutParams = RouteParams & { }
|
|
16
|
+
type LayoutParentData = EnsureDefined<import('../$types.js').LayoutData>;
|
|
17
|
+
|
|
18
|
+
export type LayoutServerData = null;
|
|
19
|
+
export type LayoutData = Expand<LayoutParentData>;
|
|
@@ -4,15 +4,15 @@ type Expand<T> = T extends infer O ? { [K in keyof O]: O[K] } : never;
|
|
|
4
4
|
// @ts-ignore
|
|
5
5
|
type MatcherParam<M> = M extends (param : string) => param is infer U ? U extends string ? U : string : string;
|
|
6
6
|
type RouteParams = { };
|
|
7
|
-
type RouteId = '/portfolio';
|
|
7
|
+
type RouteId = '/(seaweed)/portfolio';
|
|
8
8
|
type MaybeWithVoid<T> = {} extends T ? T | void : T;
|
|
9
9
|
export type RequiredKeys<T> = { [K in keyof T]-?: {} extends { [P in K]: T[K] } ? never : K; }[keyof T];
|
|
10
10
|
type OutputDataShape<T> = MaybeWithVoid<Omit<App.PageData, RequiredKeys<T>> & Partial<Pick<App.PageData, keyof T & keyof App.PageData>> & Record<string, any>>
|
|
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 PageServerParentData = EnsureDefined<import('../$types.js').LayoutServerData>;
|
|
15
|
-
type PageParentData = EnsureDefined<import('../$types.js').LayoutData>;
|
|
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
16
|
|
|
17
17
|
export type PageServerLoad<OutputData extends OutputDataShape<PageServerParentData> = OutputDataShape<PageServerParentData>> = Kit.ServerLoad<RouteParams, PageServerParentData, OutputData, RouteId>;
|
|
18
18
|
export type PageServerLoadEvent = Parameters<PageServerLoad>[0];
|
|
@@ -0,0 +1,17 @@
|
|
|
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 = { };
|
|
7
|
+
type RouteId = '/(seaweed)/portfolio/actual';
|
|
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 PageParentData = Omit<EnsureDefined<import('../../../$types.js').LayoutData>, keyof import('../../$types.js').LayoutData> & EnsureDefined<import('../../$types.js').LayoutData>;
|
|
15
|
+
|
|
16
|
+
export type PageServerData = null;
|
|
17
|
+
export type PageData = Expand<PageParentData>;
|
package/README.md
CHANGED
|
@@ -1,28 +1,18 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Pineapple
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This is the base package for styling my projects in Svelte.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
If you're seeing this, you've probably already done this step. Congrats!
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
# create a new project in the current directory
|
|
11
|
-
npm create svelte@latest
|
|
12
|
-
|
|
13
|
-
# create a new project in my-app
|
|
14
|
-
npm create svelte@latest my-app
|
|
15
|
-
```
|
|
5
|
+
NPM package: https://www.npmjs.com/package/@turnipxenon/pineapple
|
|
16
6
|
|
|
17
7
|
## Developing
|
|
18
8
|
|
|
19
|
-
Once you've created a project and installed dependencies with `
|
|
9
|
+
Once you've created a project and installed dependencies with `yarn`, start a development server:
|
|
20
10
|
|
|
21
11
|
```bash
|
|
22
|
-
|
|
12
|
+
yarn dev
|
|
23
13
|
|
|
24
14
|
# or start the server and open the app in a new browser tab
|
|
25
|
-
|
|
15
|
+
yarn dev -- --open
|
|
26
16
|
```
|
|
27
17
|
|
|
28
18
|
## Building
|
|
@@ -30,9 +20,9 @@ npm run dev -- --open
|
|
|
30
20
|
To create a production version of your app:
|
|
31
21
|
|
|
32
22
|
```bash
|
|
33
|
-
|
|
23
|
+
yarn build
|
|
34
24
|
```
|
|
35
25
|
|
|
36
|
-
You can preview the production build with `
|
|
26
|
+
You can preview the production build with `yarn preview`.
|
|
37
27
|
|
|
38
28
|
> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.
|
|
@@ -7,30 +7,30 @@ const style = `
|
|
|
7
7
|
--turnip-card-margin-bottom: ${marginBottom};
|
|
8
8
|
${overrideStyle};
|
|
9
9
|
`;
|
|
10
|
-
</script>
|
|
11
|
-
|
|
12
|
-
{#if (includeDataNoSnippet)}
|
|
13
|
-
<div class="card turnip-card" style={style} data-no-snippet>
|
|
14
|
-
<slot name="content" class="card" />
|
|
15
|
-
</div>
|
|
16
|
-
{:else }
|
|
17
|
-
<div class="card turnip-card" style={style}>
|
|
18
|
-
<slot name="content" class="card" />
|
|
19
|
-
</div>
|
|
20
|
-
{/if}
|
|
21
|
-
|
|
22
|
-
<style>
|
|
23
|
-
.turnip-card {
|
|
24
|
-
--tw-bg-opacity: 1;
|
|
25
|
-
background-color: rgb(var(--color-surface-100) / var(--tw-bg-opacity));
|
|
26
|
-
}
|
|
27
|
-
:is(.dark .turnip-card) {
|
|
28
|
-
--tw-bg-opacity: 1;
|
|
29
|
-
background-color: rgb(var(--color-surface-900) / var(--tw-bg-opacity));
|
|
30
|
-
}
|
|
31
|
-
.turnip-card {
|
|
32
|
-
margin: var(--turnip-card-margin);
|
|
33
|
-
margin-bottom: var(--turnip-card-margin-bottom);
|
|
34
|
-
border-radius: var(--theme-rounded-container);
|
|
35
|
-
}
|
|
36
|
-
</style>
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
{#if (includeDataNoSnippet)}
|
|
13
|
+
<div class="card turnip-card" style={style} data-no-snippet>
|
|
14
|
+
<slot name="content" class="card" />
|
|
15
|
+
</div>
|
|
16
|
+
{:else }
|
|
17
|
+
<div class="card turnip-card" style={style}>
|
|
18
|
+
<slot name="content" class="card" />
|
|
19
|
+
</div>
|
|
20
|
+
{/if}
|
|
21
|
+
|
|
22
|
+
<style>
|
|
23
|
+
.turnip-card {
|
|
24
|
+
--tw-bg-opacity: 1;
|
|
25
|
+
background-color: rgb(var(--color-surface-100) / var(--tw-bg-opacity));
|
|
26
|
+
}
|
|
27
|
+
:is(.dark .turnip-card) {
|
|
28
|
+
--tw-bg-opacity: 1;
|
|
29
|
+
background-color: rgb(var(--color-surface-900) / var(--tw-bg-opacity));
|
|
30
|
+
}
|
|
31
|
+
.turnip-card {
|
|
32
|
+
margin: var(--turnip-card-margin);
|
|
33
|
+
margin-bottom: var(--turnip-card-margin-bottom);
|
|
34
|
+
border-radius: var(--theme-rounded-container);
|
|
35
|
+
}
|
|
36
|
+
</style>
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
<script>export let activeGameIndex;
|
|
2
2
|
export let selfIndex;
|
|
3
3
|
import { fly, slide, scale } from "svelte/transition";
|
|
4
|
-
</script>
|
|
5
|
-
|
|
6
|
-
{#if (activeGameIndex === selfIndex)}
|
|
7
|
-
<!--todo: make section consistent size for all-->
|
|
8
|
-
<section class="game-showcase"
|
|
9
|
-
in:fly={{x: '100%'}} out:fly={{x: '-100%'}}>
|
|
10
|
-
<slot/>
|
|
11
|
-
</section>
|
|
12
|
-
{/if}
|
|
13
|
-
|
|
14
|
-
<style>
|
|
15
|
-
.game-showcase {
|
|
16
|
-
scroll-snap-align: center;
|
|
17
|
-
border-radius: var(--theme-rounded-container);
|
|
18
|
-
margin: auto;
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
{#if (activeGameIndex === selfIndex)}
|
|
7
|
+
<!--todo: make section consistent size for all-->
|
|
8
|
+
<section class="game-showcase"
|
|
9
|
+
in:fly={{x: '100%'}} out:fly={{x: '-100%'}}>
|
|
10
|
+
<slot/>
|
|
11
|
+
</section>
|
|
12
|
+
{/if}
|
|
13
|
+
|
|
14
|
+
<style>
|
|
15
|
+
.game-showcase {
|
|
16
|
+
scroll-snap-align: center;
|
|
17
|
+
border-radius: var(--theme-rounded-container);
|
|
18
|
+
margin: auto;
|
|
19
19
|
width: 100%
|
|
20
|
-
}
|
|
20
|
+
}
|
|
21
21
|
</style>
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
<span class="chip variant-filled-tertiary">
|
|
2
|
-
<slot />
|
|
3
|
-
</span>
|
|
4
|
-
|
|
5
|
-
<style>
|
|
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>
|
|
6
|
+
.chip {
|
|
7
|
+
border-radius: 1em;
|
|
8
|
+
margin: 0.25em;
|
|
9
|
+
font-weight: bold;
|
|
10
|
+
pointer-events: none;
|
|
11
|
+
}
|
|
12
|
+
</style>
|
|
@@ -1,160 +1,163 @@
|
|
|
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
|
-
|
|
93
|
-
|
|
94
|
-
padding-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
--tw-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
:
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
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 "../consts";
|
|
8
|
+
import { onMount } from "svelte";
|
|
9
|
+
import { scale } from "svelte/transition";
|
|
10
|
+
|
|
11
|
+
import MailIcon from "../assets/icons/mail.svg";
|
|
12
|
+
import GithubIcon from "../assets/icons/github-mark.svg";
|
|
13
|
+
import LinkedinIcon from "../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>
|
|
69
|
+
:is(.dark .social-button) {
|
|
70
|
+
--tw-bg-opacity: 1;
|
|
71
|
+
background-color: rgb(var(--color-primary-500) / var(--tw-bg-opacity));
|
|
72
|
+
color: rgb(var(--on-primary));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.social-button:disabled {
|
|
76
|
+
cursor: not-allowed;
|
|
77
|
+
opacity: 0.5;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.social-button:disabled:hover {
|
|
81
|
+
--tw-brightness: brightness(1);
|
|
82
|
+
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.social-button:disabled:active {
|
|
86
|
+
--tw-scale-x: 1;
|
|
87
|
+
--tw-scale-y: 1;
|
|
88
|
+
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.social-button {
|
|
92
|
+
font-size: 1rem;
|
|
93
|
+
line-height: 1.5rem;
|
|
94
|
+
padding-left: 1.25rem;
|
|
95
|
+
padding-right: 1.25rem;
|
|
96
|
+
padding-top: 9px;
|
|
97
|
+
padding-bottom: 9px;
|
|
98
|
+
white-space: nowrap;
|
|
99
|
+
text-align: center;
|
|
100
|
+
display: inline-flex;
|
|
101
|
+
align-items: center;
|
|
102
|
+
justify-content: center;
|
|
103
|
+
transition-property: all;
|
|
104
|
+
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
105
|
+
transition-duration: 150ms;
|
|
106
|
+
border-radius: var(--theme-rounded-base);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.social-button > :not([hidden]) ~ :not([hidden]) {
|
|
110
|
+
--tw-space-x-reverse: 0;
|
|
111
|
+
margin-right: calc(0.5rem * var(--tw-space-x-reverse));
|
|
112
|
+
margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.social-button:hover {
|
|
116
|
+
--tw-brightness: brightness(1.15);
|
|
117
|
+
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.social-button:active {
|
|
121
|
+
--tw-scale-x: 95%;
|
|
122
|
+
--tw-scale-y: 95%;
|
|
123
|
+
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
124
|
+
--tw-brightness: brightness(.9);
|
|
125
|
+
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.social-button {
|
|
129
|
+
--tw-bg-opacity: 1;
|
|
130
|
+
background-color: rgb(var(--color-primary-500) / var(--tw-bg-opacity));
|
|
131
|
+
color: rgb(var(--on-primary));
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
:is(.dark .social-button) {
|
|
135
|
+
--tw-bg-opacity: 1;
|
|
136
|
+
background-color: rgb(var(--color-primary-500) / var(--tw-bg-opacity));
|
|
137
|
+
color: rgb(var(--on-primary));
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
button > img {
|
|
141
|
+
max-height: 1lh;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
button {
|
|
145
|
+
min-width: 0;
|
|
146
|
+
min-height: 0;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.socials {
|
|
150
|
+
display: flex;
|
|
151
|
+
flex-wrap: wrap;
|
|
152
|
+
justify-content: var(--preferred-justify-content);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.socials > button {
|
|
156
|
+
margin: 0 0.5em var(--preferred-overall-margin-bottom);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.socials.isSmall > button {
|
|
160
|
+
margin-left: 0.25em;
|
|
161
|
+
margin-right: 0.25em;
|
|
162
|
+
}
|
|
160
163
|
</style>
|
|
@@ -13,24 +13,24 @@ onMount(() => {
|
|
|
13
13
|
);
|
|
14
14
|
observer.observe(stickyElem);
|
|
15
15
|
});
|
|
16
|
-
</script>
|
|
17
|
-
|
|
18
|
-
<span transition:fly={{y: -100}}>
|
|
19
|
-
{#if (isFirst && !isSticky)}
|
|
20
|
-
<!-- intentionally empty -->
|
|
21
|
-
{:else if (isSticky)}
|
|
22
|
-
{" | "}
|
|
23
|
-
{:else }
|
|
24
|
-
<br>
|
|
25
|
-
{/if}
|
|
26
|
-
<span class="sticky-div" bind:this={stickyElem}>
|
|
27
|
-
<slot/>
|
|
28
|
-
</span>
|
|
29
|
-
</span>
|
|
30
|
-
|
|
31
|
-
<style>
|
|
32
|
-
.sticky-div {
|
|
33
|
-
position: sticky;
|
|
34
|
-
top: -1px;
|
|
35
|
-
}
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<span transition:fly={{y: -100}}>
|
|
19
|
+
{#if (isFirst && !isSticky)}
|
|
20
|
+
<!-- intentionally empty -->
|
|
21
|
+
{:else if (isSticky)}
|
|
22
|
+
{" | "}
|
|
23
|
+
{:else }
|
|
24
|
+
<br>
|
|
25
|
+
{/if}
|
|
26
|
+
<span class="sticky-div" bind:this={stickyElem}>
|
|
27
|
+
<slot/>
|
|
28
|
+
</span>
|
|
29
|
+
</span>
|
|
30
|
+
|
|
31
|
+
<style>
|
|
32
|
+
.sticky-div {
|
|
33
|
+
position: sticky;
|
|
34
|
+
top: -1px;
|
|
35
|
+
}
|
|
36
36
|
</style>
|