@turnipxenon/pineapple 2.10.0 → 3.0.0-alpha-3
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/dist/assets/icons/icon-check-dark-contrast.svg +1 -0
- package/dist/assets/icons/icon-check-light-contrast.svg +1 -0
- package/dist/assets/icons/icon-contrast.svg +1 -0
- package/dist/assets/icons/icon-copy-dark-contrast.svg +1 -0
- package/dist/assets/icons/icon-copy-light-contrast.svg +1 -0
- package/dist/assets/icons/icon-dark-mode.svg +1 -0
- package/dist/assets/icons/icon-light-mode.svg +1 -0
- package/dist/assets/icons/icon-settings.svg +1 -0
- package/dist/components/Card.svelte +43 -41
- package/dist/components/Card.svelte.d.ts +11 -24
- package/dist/components/CarouselElement.svelte +15 -8
- package/dist/components/CarouselElement.svelte.d.ts +7 -18
- package/dist/components/ElementVisbilityDetector.svelte +23 -14
- package/dist/components/ElementVisbilityDetector.svelte.d.ts +6 -17
- package/dist/components/LazyAsset.svelte +93 -65
- package/dist/components/LazyAsset.svelte.d.ts +9 -19
- package/dist/components/PineappleSlideToggle.svelte +28 -10
- package/dist/components/PineappleSlideToggle.svelte.d.ts +9 -19
- package/dist/components/RandomizedBackground.svelte +46 -27
- package/dist/components/RandomizedBackground.svelte.d.ts +5 -15
- package/dist/components/RandomizedImage.svelte +15 -8
- package/dist/components/RandomizedImage.svelte.d.ts +6 -16
- package/dist/components/StickyElement.svelte +25 -16
- package/dist/components/StickyElement.svelte.d.ts +6 -17
- package/dist/components/ToggleableContent.svelte +88 -59
- package/dist/components/ToggleableContent.svelte.d.ts +6 -17
- package/dist/components/blog_template/BlogTemplate.svelte +45 -25
- package/dist/components/blog_template/BlogTemplate.svelte.d.ts +9 -20
- package/dist/components/blog_template/BlogTemplateInner.svelte +11 -3
- package/dist/components/blog_template/BlogTemplateInner.svelte.d.ts +6 -17
- package/dist/components/chip/Chip.svelte +33 -57
- package/dist/components/chip/Chip.svelte.d.ts +7 -18
- package/dist/components/combo_box/ComboBox.svelte +10 -4
- package/dist/components/combo_box/ComboBox.svelte.d.ts +6 -16
- package/dist/components/combo_box/ComboBoxWithButton.svelte +16 -9
- package/dist/components/combo_box/ComboBoxWithButton.svelte.d.ts +7 -17
- package/dist/components/combo_box/combo-box.postcss +2 -2
- package/dist/components/dialog_manager/DialogManager.d.ts +0 -1
- package/dist/components/dialog_manager/DialogManagerStore.d.ts +0 -1
- package/dist/components/dialog_manager/DialogManagerStore.js +1 -1
- package/dist/components/dialog_overlay/DialogOverlay.svelte +42 -34
- package/dist/components/dialog_overlay/DialogOverlay.svelte.d.ts +3 -14
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/layouts/SeaweedBaseLayout.svelte +80 -43
- package/dist/components/layouts/SeaweedBaseLayout.svelte.d.ts +8 -21
- package/dist/components/navigation_component/NavigationComponent.svelte +52 -141
- package/dist/components/navigation_component/NavigationComponent.svelte.d.ts +17 -26
- package/dist/components/navigation_component/NavigationControl.svelte +52 -103
- package/dist/components/navigation_component/NavigationControl.svelte.d.ts +7 -17
- package/dist/components/overrideable_meta/OverridableMeta.svelte +37 -22
- package/dist/components/overrideable_meta/OverridableMeta.svelte.d.ts +9 -19
- package/dist/components/pineapple/PineappleBaseLayout.svelte +132 -188
- package/dist/components/pineapple/PineappleBaseLayout.svelte.d.ts +6 -17
- package/dist/components/pineapple/toast/DefaultToastBody.svelte +14 -16
- package/dist/components/pineapple/toast/DefaultToastBody.svelte.d.ts +7 -17
- package/dist/components/pineapple/toast/Toast.d.ts +0 -1
- package/dist/components/pineapple/toast/Toast.svelte +92 -64
- package/dist/components/pineapple/toast/Toast.svelte.d.ts +3 -14
- package/dist/components/pineapple/toast/custom-toast/TestCustomToast.svelte.d.ts +22 -19
- package/dist/paraglide/messages/_index.d.ts +2 -0
- package/dist/paraglide/messages/_index.js +3 -0
- package/dist/paraglide/messages/example_message.d.ts +5 -0
- package/dist/paraglide/messages/example_message.js +39 -0
- package/dist/paraglide/messages/settings.d.ts +3 -0
- package/dist/paraglide/messages/settings.js +38 -0
- package/dist/paraglide/messages.d.ts +2 -0
- package/dist/paraglide/messages.js +4 -0
- package/dist/paraglide/registry.d.ts +21 -0
- package/dist/paraglide/registry.js +31 -0
- package/dist/paraglide/runtime.d.ts +400 -0
- package/dist/paraglide/runtime.js +1060 -0
- package/dist/paraglide/server.d.ts +64 -0
- package/dist/paraglide/server.js +161 -0
- package/dist/scripts/util/FileManagement.d.ts +1 -1
- package/dist/store.d.ts +0 -1
- package/dist/styles/app.css +144 -0
- package/dist/styles/turnip-theme.css +327 -0
- package/dist/template/seaweed/CreateUrlForm.svelte +59 -41
- package/dist/template/seaweed/CreateUrlForm.svelte.d.ts +8 -15
- package/dist/template/seaweed/SeaweedTemplate.svelte +244 -195
- package/dist/template/seaweed/SeaweedTemplate.svelte.d.ts +28 -25
- package/dist/template/seaweed/ToastSettings.d.ts +15 -0
- package/dist/template/seaweed/ToastSettings.js +1 -0
- package/dist/template/seaweed/entries/ChefWings.svelte +37 -39
- package/dist/template/seaweed/entries/ChefWings.svelte.d.ts +5 -15
- package/dist/template/seaweed/entries/CustomizedYarnspinner.svelte +32 -24
- package/dist/template/seaweed/entries/CustomizedYarnspinner.svelte.d.ts +5 -15
- package/dist/template/seaweed/entries/Hepcat.svelte +58 -49
- package/dist/template/seaweed/entries/Hepcat.svelte.d.ts +5 -15
- package/dist/template/seaweed/entries/Pengi.svelte +51 -43
- package/dist/template/seaweed/entries/Pengi.svelte.d.ts +5 -15
- package/dist/template/seaweed/entries/Soulwork.svelte +44 -36
- package/dist/template/seaweed/entries/Soulwork.svelte.d.ts +5 -15
- package/dist/template/seaweed/entries/ThisWebpage.svelte +47 -38
- package/dist/template/seaweed/entries/ThisWebpage.svelte.d.ts +5 -15
- package/dist/template/seaweed/entries/WorkExperience.svelte +109 -92
- package/dist/template/seaweed/entries/WorkExperience.svelte.d.ts +6 -16
- package/dist/template/seaweed/entries/Workset.svelte +51 -42
- package/dist/template/seaweed/entries/Workset.svelte.d.ts +5 -15
- package/dist/template/seaweed/entry_order_config/EntryOrderConfig.svelte +169 -259
- package/dist/template/seaweed/entry_order_config/EntryOrderConfig.svelte.d.ts +10 -21
- package/dist/template/seaweed/seaweed.postcss +1 -9
- package/dist/{theme.postcss → theme.css} +1 -4
- package/dist/ui/components/FourPartCard.svelte +47 -0
- package/dist/ui/components/FourPartCard.svelte.d.ts +10 -0
- package/dist/ui/components/ModalBase.svelte +75 -0
- package/dist/ui/components/ModalBase.svelte.d.ts +8 -0
- package/dist/ui/components/SocialSection.svelte +87 -0
- package/dist/ui/components/SocialSection.svelte.d.ts +9 -0
- package/dist/ui/components/index.d.ts +3 -0
- package/dist/ui/components/index.js +3 -0
- package/dist/ui/components/randomized-background/RandomizedBackground.svelte +87 -0
- package/dist/ui/components/randomized-background/RandomizedBackground.svelte.d.ts +6 -0
- package/dist/ui/components/randomized-background/RandomizedImage.svelte +42 -0
- package/dist/ui/components/randomized-background/RandomizedImage.svelte.d.ts +7 -0
- package/dist/ui/elements/CodeBlock/CodeBlock.svelte +65 -0
- package/dist/ui/elements/CodeBlock/CodeBlock.svelte.d.ts +5 -0
- package/dist/ui/elements/CodeBlock/CodeBlockProps.d.ts +11 -0
- package/dist/ui/elements/CodeBlock/CodeBlockProps.js +1 -0
- package/dist/ui/elements/CodeBlock/index.d.ts +2 -0
- package/dist/ui/elements/CodeBlock/index.js +2 -0
- package/dist/ui/elements/ColorScheme.d.ts +10 -0
- package/dist/ui/elements/ColorScheme.js +11 -0
- package/dist/ui/elements/GeneralUIProps.d.ts +12 -0
- package/dist/ui/elements/GeneralUIProps.js +1 -0
- package/dist/ui/elements/ImageIcon.svelte +54 -0
- package/dist/ui/elements/ImageIcon.svelte.d.ts +6 -0
- package/dist/ui/elements/OnBackground.d.ts +3 -0
- package/dist/ui/elements/OnBackground.js +4 -0
- package/dist/ui/elements/PineappleSwitch.svelte +29 -0
- package/dist/ui/elements/PineappleSwitch.svelte.d.ts +10 -0
- package/dist/ui/elements/TextLink.svelte +17 -0
- package/dist/ui/elements/TextLink.svelte.d.ts +8 -0
- package/dist/ui/elements/WrapperProps.d.ts +4 -0
- package/dist/ui/elements/WrapperProps.js +1 -0
- package/dist/ui/elements/index.d.ts +10 -0
- package/dist/ui/elements/index.js +10 -0
- package/dist/ui/elements/pinya-button/component.svelte +47 -0
- package/dist/ui/elements/pinya-button/component.svelte.d.ts +4 -0
- package/dist/ui/elements/pinya-button/index.d.ts +2 -0
- package/dist/ui/elements/pinya-button/index.js +2 -0
- package/dist/ui/elements/pinya-button/props.d.ts +13 -0
- package/dist/ui/elements/pinya-button/props.js +6 -0
- package/dist/ui/elements/pinya-card/component.svelte +21 -0
- package/dist/ui/elements/pinya-card/component.svelte.d.ts +7 -0
- package/dist/ui/elements/pinya-card/index.d.ts +2 -0
- package/dist/ui/elements/pinya-card/index.js +2 -0
- package/dist/ui/elements/pinya-card/props.d.ts +10 -0
- package/dist/ui/elements/pinya-card/props.js +1 -0
- package/dist/ui/elements/pinya-combobox/PinyaCombobox.svelte +35 -0
- package/dist/ui/elements/pinya-combobox/PinyaCombobox.svelte.d.ts +18 -0
- package/dist/ui/elements/pinya-combobox/PinyaComboboxProps.d.ts +18 -0
- package/dist/ui/elements/pinya-combobox/PinyaComboboxProps.js +1 -0
- package/dist/ui/elements/text-chip/TextChip.svelte +15 -0
- package/dist/ui/elements/text-chip/TextChip.svelte.d.ts +4 -0
- package/dist/ui/elements/text-chip/TextChipProps.d.ts +4 -0
- package/dist/ui/elements/text-chip/TextChipProps.js +1 -0
- package/dist/ui/elements/text-chip/index.d.ts +2 -0
- package/dist/ui/elements/text-chip/index.js +2 -0
- package/dist/ui/modules/index.d.ts +2 -0
- package/dist/ui/modules/index.js +2 -0
- package/dist/ui/modules/modals/general-settings/GeneralSettingsModal.svelte +110 -0
- package/dist/ui/modules/modals/general-settings/GeneralSettingsModal.svelte.d.ts +4 -0
- package/dist/ui/modules/modals/general-settings/LanguagePicker.svelte +38 -0
- package/dist/ui/modules/modals/general-settings/LanguagePicker.svelte.d.ts +3 -0
- package/dist/ui/modules/projects/Hepcat.svelte +71 -0
- package/dist/ui/modules/projects/Hepcat.svelte.d.ts +22 -0
- package/dist/ui/modules/projects/Pengi.svelte +60 -0
- package/dist/ui/modules/projects/Pengi.svelte.d.ts +22 -0
- package/dist/ui/modules/projects/Soulwork.svelte +55 -0
- package/dist/ui/modules/projects/Soulwork.svelte.d.ts +22 -0
- package/dist/ui/modules/projects/ThisWebpage.svelte +62 -0
- package/dist/ui/modules/projects/ThisWebpage.svelte.d.ts +22 -0
- package/dist/ui/modules/projects/index.d.ts +4 -0
- package/dist/ui/modules/projects/index.js +4 -0
- package/dist/ui/modules/seaweed/ChumBucket.svelte +86 -0
- package/dist/ui/modules/seaweed/ChumBucket.svelte.d.ts +3 -0
- package/dist/ui/modules/seaweed/index.d.ts +3 -0
- package/dist/ui/modules/seaweed/index.js +4 -0
- package/dist/ui/templates/PinyaBase.svelte +48 -0
- package/dist/ui/templates/PinyaBase.svelte.d.ts +7 -0
- package/dist/ui/templates/confirmation-modal/component.svelte +47 -0
- package/dist/ui/templates/confirmation-modal/component.svelte.d.ts +4 -0
- package/dist/ui/templates/confirmation-modal/index.d.ts +2 -0
- package/dist/ui/templates/confirmation-modal/index.js +2 -0
- package/dist/ui/templates/confirmation-modal/props.d.ts +10 -0
- package/dist/ui/templates/confirmation-modal/props.js +1 -0
- package/dist/ui/templates/index.d.ts +4 -0
- package/dist/ui/templates/index.js +4 -0
- package/dist/ui/templates/pinya-page-layout/component.svelte +120 -0
- package/dist/ui/templates/pinya-page-layout/component.svelte.d.ts +9 -0
- package/dist/ui/templates/pinya-page-layout/index.d.ts +2 -0
- package/dist/ui/templates/pinya-page-layout/index.js +2 -0
- package/dist/ui/templates/pinya-page-layout/runes.svelte.d.ts +7 -0
- package/dist/ui/templates/pinya-page-layout/runes.svelte.js +3 -0
- package/dist/ui/templates/seaweed-layout/EntryGroup.svelte +89 -0
- package/dist/ui/templates/seaweed-layout/EntryGroup.svelte.d.ts +4 -0
- package/dist/ui/templates/seaweed-layout/EntryOrderConfig2.svelte +45 -0
- package/dist/ui/templates/seaweed-layout/EntryOrderConfig2.svelte.d.ts +9 -0
- package/dist/ui/templates/seaweed-layout/ProjectComponentProps.d.ts +4 -0
- package/dist/ui/templates/seaweed-layout/ProjectComponentProps.js +1 -0
- package/dist/ui/templates/seaweed-layout/ProjectGroupConfig.svelte +316 -0
- package/dist/ui/templates/seaweed-layout/ProjectGroupConfig.svelte.d.ts +14 -0
- package/dist/ui/templates/seaweed-layout/SeaweedLayout.md +4 -0
- package/dist/ui/templates/seaweed-layout/SeaweedLayout.svelte +196 -0
- package/dist/ui/templates/seaweed-layout/SeaweedLayout.svelte.d.ts +4 -0
- package/dist/ui/templates/seaweed-layout/index.d.ts +4 -0
- package/dist/ui/templates/seaweed-layout/index.js +4 -0
- package/dist/ui/templates/seaweed-layout/props.d.ts +25 -0
- package/dist/ui/templates/seaweed-layout/props.js +1 -0
- package/dist/util/util.d.ts +1 -0
- package/dist/util/util.js +9 -0
- package/package.json +37 -20
- package/src/lib/styles/app.css +144 -0
- package/src/lib/theme.css +114 -0
- package/dist/app.postcss +0 -212
- package/dist/components/SocialSection.svelte +0 -166
- package/dist/components/SocialSection.svelte.d.ts +0 -31
- package/dist/postcss.d.ts +0 -3
- package/dist/styles/DefaultGridContainer.css +0 -61
- package/dist/template/seaweed/ChumBucket.svelte +0 -87
- package/dist/template/seaweed/ChumBucket.svelte.d.ts +0 -14
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { scale } from 'svelte/transition';
|
|
3
|
+
import { elasticOut } from 'svelte/easing';
|
|
4
|
+
|
|
5
|
+
import type { ModalProps } from 'svelte-modals';
|
|
6
|
+
|
|
7
|
+
import { onMount, type Snippet } from 'svelte';
|
|
8
|
+
import { PinyaCard } from '../elements';
|
|
9
|
+
|
|
10
|
+
// https://svelte-modals.mattjennin.gs/modal-components/props/#typescript
|
|
11
|
+
interface ModalBaseProps extends ModalProps {
|
|
12
|
+
children: Snippet,
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
let {
|
|
16
|
+
children,
|
|
17
|
+
isOpen,
|
|
18
|
+
close
|
|
19
|
+
}: ModalBaseProps = $props();
|
|
20
|
+
|
|
21
|
+
let container: HTMLDivElement;
|
|
22
|
+
onMount(() => {
|
|
23
|
+
const focusableElement = container.querySelector('input, select, textarea, button, object, a, area[href], [tabindex]');
|
|
24
|
+
if (focusableElement) {
|
|
25
|
+
(focusableElement as HTMLElement).focus();
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
document.addEventListener('keydown', (e) => {
|
|
29
|
+
if (e.code === 'Escape') {
|
|
30
|
+
close();
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
</script>
|
|
35
|
+
|
|
36
|
+
{#if isOpen}
|
|
37
|
+
<dialog aria-modal="true" in:scale|global={{
|
|
38
|
+
start: 0.95,
|
|
39
|
+
duration: 750,
|
|
40
|
+
easing: elasticOut,
|
|
41
|
+
opacity: 0.9
|
|
42
|
+
}}>
|
|
43
|
+
<div class="interactable" bind:this={container}>
|
|
44
|
+
<PinyaCard
|
|
45
|
+
widthClass="max-w-xl2"
|
|
46
|
+
paddingClass="pl-8 pr-8 pt-4 pb-8"
|
|
47
|
+
>
|
|
48
|
+
{@render children?.()}
|
|
49
|
+
</PinyaCard>
|
|
50
|
+
</div>
|
|
51
|
+
</dialog>
|
|
52
|
+
{/if}
|
|
53
|
+
|
|
54
|
+
<style>
|
|
55
|
+
dialog {
|
|
56
|
+
padding: 0;
|
|
57
|
+
background-color: transparent;
|
|
58
|
+
border-color: transparent;
|
|
59
|
+
z-index: 20;
|
|
60
|
+
position: fixed;
|
|
61
|
+
top: 0;
|
|
62
|
+
width: 100%;
|
|
63
|
+
height: 100%;
|
|
64
|
+
display: flex;
|
|
65
|
+
justify-content: center;
|
|
66
|
+
align-items: center;
|
|
67
|
+
|
|
68
|
+
/* allow click-through to backdrop */
|
|
69
|
+
pointer-events: none;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.interactable {
|
|
73
|
+
pointer-events: auto;
|
|
74
|
+
}
|
|
75
|
+
</style>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ModalProps } from 'svelte-modals';
|
|
2
|
+
import { type Snippet } from 'svelte';
|
|
3
|
+
interface ModalBaseProps extends ModalProps {
|
|
4
|
+
children: Snippet;
|
|
5
|
+
}
|
|
6
|
+
declare const ModalBase: import("svelte").Component<ModalBaseProps, {}, "">;
|
|
7
|
+
type ModalBase = ReturnType<typeof ModalBase>;
|
|
8
|
+
export default ModalBase;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { onMount } from "svelte";
|
|
3
|
+
import { scale } from "svelte/transition";
|
|
4
|
+
|
|
5
|
+
import MailIcon from "../../assets/icons/mail.svg";
|
|
6
|
+
import GithubIcon from "../../assets/icons/github-mark.svg";
|
|
7
|
+
import LinkedinIcon from "../../assets/icons/linkedin.svg";
|
|
8
|
+
import { ButtonVariant, ImageIcon, PinyaButton } from "../elements/index";
|
|
9
|
+
import { ItchLogoHotLink } from "../../consts";
|
|
10
|
+
|
|
11
|
+
/** @type {{isSmallVersion?: boolean, email?: string, linkedinSlug?: string, isSlot?: boolean, allowLinkedIn?: boolean}} */
|
|
12
|
+
let {
|
|
13
|
+
isSmallVersion = false,
|
|
14
|
+
email = "turnipxenon@gmail.com",
|
|
15
|
+
linkedinSlug = "turnip-xenon",
|
|
16
|
+
isSlot = false,
|
|
17
|
+
allowLinkedIn = true
|
|
18
|
+
} = $props();
|
|
19
|
+
|
|
20
|
+
let shouldShowExtra = $state(false);
|
|
21
|
+
const style = `
|
|
22
|
+
--preferred-justify-content: ${isSlot ? "flex-start" : "center"};
|
|
23
|
+
--preferred-overall-margin-bottom: ${isSlot ? "0" : "0.75lh"};
|
|
24
|
+
`;
|
|
25
|
+
|
|
26
|
+
onMount(() => {
|
|
27
|
+
shouldShowExtra = window.screen.availWidth >= 440;
|
|
28
|
+
});
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<div class="socials" class:isSmall={isSmallVersion} style={style} data-nosnippet>
|
|
32
|
+
<PinyaButton
|
|
33
|
+
buttonVariant={ButtonVariant.SmallIcon}
|
|
34
|
+
title="https://github.com/TurnipXenon"
|
|
35
|
+
onclick={() => window.open("https://github.com/TurnipXenon")}>
|
|
36
|
+
<ImageIcon src={GithubIcon} alt="github icon" />
|
|
37
|
+
{#if (!isSmallVersion)}
|
|
38
|
+
<span>TurnipXenon</span>
|
|
39
|
+
{/if}
|
|
40
|
+
</PinyaButton>
|
|
41
|
+
{#if allowLinkedIn}
|
|
42
|
+
<PinyaButton
|
|
43
|
+
buttonVariant={ButtonVariant.SmallIcon}
|
|
44
|
+
title={`https://www.linkedin.com/in/${linkedinSlug}/`}
|
|
45
|
+
onclick={() => window.open(`https://www.linkedin.com/in/${linkedinSlug}/`)}>
|
|
46
|
+
<ImageIcon src={LinkedinIcon} alt="linkedin icon" />
|
|
47
|
+
{#if (!isSmallVersion)}
|
|
48
|
+
<span>{linkedinSlug}</span>
|
|
49
|
+
{/if}
|
|
50
|
+
</PinyaButton>
|
|
51
|
+
{/if}
|
|
52
|
+
<PinyaButton
|
|
53
|
+
buttonVariant={ButtonVariant.SmallIcon}
|
|
54
|
+
title={`mailto:${email}`}
|
|
55
|
+
onclick={() => window.open(`mailto:${email}`)}>
|
|
56
|
+
<ImageIcon src={MailIcon} alt="mail icon" />
|
|
57
|
+
{#if (!isSmallVersion)}
|
|
58
|
+
<span>{email}</span>
|
|
59
|
+
{/if}
|
|
60
|
+
</PinyaButton>
|
|
61
|
+
{#if (shouldShowExtra)}
|
|
62
|
+
<div transition:scale>
|
|
63
|
+
<PinyaButton
|
|
64
|
+
buttonVariant={ButtonVariant.SmallIcon}
|
|
65
|
+
title="https://turnipxenon.itch.io/"
|
|
66
|
+
onclick={() => window.open("https://turnipxenon.itch.io/")}>
|
|
67
|
+
<ImageIcon src={ItchLogoHotLink} alt="itch icon" />
|
|
68
|
+
{#if (!isSmallVersion)}
|
|
69
|
+
<span>TurnipXenon</span>
|
|
70
|
+
{/if}
|
|
71
|
+
</PinyaButton>
|
|
72
|
+
</div>
|
|
73
|
+
{/if}
|
|
74
|
+
</div>
|
|
75
|
+
|
|
76
|
+
<style>
|
|
77
|
+
span {
|
|
78
|
+
font-size: 0.8em;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.socials {
|
|
82
|
+
display: flex;
|
|
83
|
+
flex-wrap: wrap;
|
|
84
|
+
justify-content: var(--preferred-justify-content);
|
|
85
|
+
gap: 0.7rem;
|
|
86
|
+
}
|
|
87
|
+
</style>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare const SocialSection: import("svelte").Component<{
|
|
2
|
+
isSmallVersion?: boolean;
|
|
3
|
+
email?: string;
|
|
4
|
+
linkedinSlug?: string;
|
|
5
|
+
isSlot?: boolean;
|
|
6
|
+
allowLinkedIn?: boolean;
|
|
7
|
+
}, {}, "">;
|
|
8
|
+
type SocialSection = ReturnType<typeof SocialSection>;
|
|
9
|
+
export default SocialSection;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { fade } from 'svelte/transition';
|
|
3
|
+
|
|
4
|
+
import BgTiledAres from '../../../assets/bg_tiled/bg_tiled_ares.png';
|
|
5
|
+
import BgTiledCorn from '../../../assets/bg_tiled/bg_tiled_corn.png';
|
|
6
|
+
import BgTiledPineapple from '../../../assets/bg_tiled/bg_tiled_pineapple.png';
|
|
7
|
+
import BgTiledReinhard from '../../../assets/bg_tiled/bg_tiled_reinhard.png';
|
|
8
|
+
import BgTiledTomato from '../../../assets/bg_tiled/bg_tiled_tomato.png';
|
|
9
|
+
import BgTiledTurnip from '../../../assets/bg_tiled/bg_tiled_turnip.png';
|
|
10
|
+
import RandomizedImage from './RandomizedImage.svelte';
|
|
11
|
+
import { generatedDailySeed, mulberry32Generator } from '../../../util/util';
|
|
12
|
+
|
|
13
|
+
let { enabled }: {
|
|
14
|
+
enabled: boolean
|
|
15
|
+
} = $props();
|
|
16
|
+
|
|
17
|
+
const imageList = [BgTiledAres, BgTiledCorn, BgTiledPineapple, BgTiledReinhard, BgTiledTomato, BgTiledTurnip];
|
|
18
|
+
|
|
19
|
+
const seed = generatedDailySeed();
|
|
20
|
+
const rng = mulberry32Generator(seed);
|
|
21
|
+
|
|
22
|
+
const shuffle = <T>(array: T[]): T[] => {
|
|
23
|
+
// from: community wiki @ https://stackoverflow.com/a/2450976/17836168
|
|
24
|
+
let currentIndex = array.length,
|
|
25
|
+
randomIndex;
|
|
26
|
+
|
|
27
|
+
// While there remain elements to shuffle.
|
|
28
|
+
while (currentIndex != 0) {
|
|
29
|
+
// Pick a remaining element.
|
|
30
|
+
randomIndex = Math.floor(rng() * currentIndex);
|
|
31
|
+
currentIndex--;
|
|
32
|
+
|
|
33
|
+
// And swap it with the current element.
|
|
34
|
+
[array[currentIndex], array[randomIndex]] = [array[randomIndex], array[currentIndex]];
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return array;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
let generatedImageList: string[] = $state([]);
|
|
41
|
+
|
|
42
|
+
$effect(() => {
|
|
43
|
+
let gi: string[] = [];
|
|
44
|
+
for (let i = 0; i < 20; i++) {
|
|
45
|
+
shuffle(imageList);
|
|
46
|
+
gi = gi.concat(imageList);
|
|
47
|
+
}
|
|
48
|
+
generatedImageList = gi;
|
|
49
|
+
});
|
|
50
|
+
</script>
|
|
51
|
+
|
|
52
|
+
<svelte:head>
|
|
53
|
+
<!-- from: https://dev.to/khromov/preloading-images-in-svelte-465h -->
|
|
54
|
+
{#each imageList as image, idx (idx)}
|
|
55
|
+
<link rel="preload" as="image" href={image} />
|
|
56
|
+
{/each}
|
|
57
|
+
<link
|
|
58
|
+
as="video"
|
|
59
|
+
href="https://video.twimg.com/ext_tw_video/1318728494256410624/pu/vid/640x360/TMklz6hiTkQu3xhn.mp4"
|
|
60
|
+
rel="preload"
|
|
61
|
+
/>
|
|
62
|
+
</svelte:head>
|
|
63
|
+
|
|
64
|
+
<!--todo: add a letterbox beyond 1960px + 16 rem-->
|
|
65
|
+
{#if enabled && generatedImageList.length > 0}
|
|
66
|
+
<div class="default-background" aria-hidden="true" transition:fade>
|
|
67
|
+
{#each generatedImageList as imageItem, idx (idx)}
|
|
68
|
+
<RandomizedImage src={imageItem} {rng} />
|
|
69
|
+
{/each}
|
|
70
|
+
</div>
|
|
71
|
+
{/if}
|
|
72
|
+
|
|
73
|
+
<style>
|
|
74
|
+
.default-background {
|
|
75
|
+
position: fixed;
|
|
76
|
+
display: flex;
|
|
77
|
+
top: -8rem;
|
|
78
|
+
left: 50%;
|
|
79
|
+
transform: translate(-50%, 0);
|
|
80
|
+
width: calc(100vw + 16rem);
|
|
81
|
+
max-width: 1960px;
|
|
82
|
+
height: calc(100vh + 16rem);
|
|
83
|
+
flex-wrap: wrap;
|
|
84
|
+
overflow: hidden;
|
|
85
|
+
z-index: -10;
|
|
86
|
+
}
|
|
87
|
+
</style>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
let {
|
|
3
|
+
src,
|
|
4
|
+
rng
|
|
5
|
+
}: {
|
|
6
|
+
src: string,
|
|
7
|
+
rng: () => number
|
|
8
|
+
} = $props();
|
|
9
|
+
let rotateRandom = rng() * 90 - 45;
|
|
10
|
+
|
|
11
|
+
const paddingLeft = 1 + rng() * 5;
|
|
12
|
+
const paddingRight = 1 + rng() * 5;
|
|
13
|
+
const paddingTop = 1 + rng() * 7;
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<div
|
|
17
|
+
style="--paddingTop: {paddingTop}rem;
|
|
18
|
+
--paddingLeft: {paddingLeft}rem;
|
|
19
|
+
--paddingRight: {paddingRight}rem;">
|
|
20
|
+
<img {src} class="randomized-image"
|
|
21
|
+
aria-hidden="true"
|
|
22
|
+
style="--rotateRandom:{rotateRandom}deg;"
|
|
23
|
+
alt="" />
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<style>
|
|
27
|
+
div {
|
|
28
|
+
padding-top: var(--paddingTop);
|
|
29
|
+
padding-left: var(--paddingLeft);
|
|
30
|
+
padding-right: var(--paddingRight);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
img {
|
|
34
|
+
width: 8rem;
|
|
35
|
+
height: 8rem;
|
|
36
|
+
transform: rotate(var(--rotateRandom));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.randomized-image {
|
|
40
|
+
filter: var(--filter-randomized-image);
|
|
41
|
+
}
|
|
42
|
+
</style>
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<!-- @component Code Block based on: https://shiki.style/ and https://www.skeleton.dev/docs/integrations/code-block/svelte/ -->
|
|
2
|
+
|
|
3
|
+
<script module>
|
|
4
|
+
import { addCopyButton } from "shiki-transformer-copy-button";
|
|
5
|
+
import { createHighlighterCoreSync } from "shiki/core";
|
|
6
|
+
import { createJavaScriptRegexEngine } from "shiki/engine/javascript";
|
|
7
|
+
// Themes
|
|
8
|
+
// https://shiki.style/themes
|
|
9
|
+
import themeLight from "shiki/themes/catppuccin-latte.mjs";
|
|
10
|
+
import themeDark from "shiki/themes/catppuccin-frappe.mjs";
|
|
11
|
+
// Languages
|
|
12
|
+
// https://shiki.style/languages
|
|
13
|
+
import console from "shiki/langs/console.mjs";
|
|
14
|
+
import html from "shiki/langs/html.mjs";
|
|
15
|
+
import css from "shiki/langs/css.mjs";
|
|
16
|
+
import js from "shiki/langs/javascript.mjs";
|
|
17
|
+
import ts from "shiki/langs/typescript.mjs";
|
|
18
|
+
import markdown from "shiki/langs/markdown.mjs";
|
|
19
|
+
|
|
20
|
+
// https://shiki.style/guide/sync-usage
|
|
21
|
+
const shiki = createHighlighterCoreSync({
|
|
22
|
+
engine: createJavaScriptRegexEngine(),
|
|
23
|
+
// Implement your import theme.
|
|
24
|
+
themes: [themeLight, themeDark],
|
|
25
|
+
// Implement your imported and supported languages.
|
|
26
|
+
langs: [console, html, css, js, ts, markdown]
|
|
27
|
+
});
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<script lang="ts">
|
|
31
|
+
import type { CodeBlockProps } from "./CodeBlockProps";
|
|
32
|
+
|
|
33
|
+
let {
|
|
34
|
+
code = "",
|
|
35
|
+
lang = "console",
|
|
36
|
+
// Base Style Props
|
|
37
|
+
base = " overflow-hidden",
|
|
38
|
+
rounded = "rounded-container",
|
|
39
|
+
shadow = "",
|
|
40
|
+
classes = "",
|
|
41
|
+
// Pre Style Props
|
|
42
|
+
preBase = "",
|
|
43
|
+
prePadding = "[&>pre]:p-4",
|
|
44
|
+
preClasses = ""
|
|
45
|
+
}: CodeBlockProps = $props();
|
|
46
|
+
|
|
47
|
+
// Shiki convert to HTML
|
|
48
|
+
const generatedHtml = $derived(shiki.codeToHtml(code, {
|
|
49
|
+
lang,
|
|
50
|
+
themes: {
|
|
51
|
+
light: "catppuccin-latte",
|
|
52
|
+
dark: "catppuccin-frappe"
|
|
53
|
+
},
|
|
54
|
+
transformers: [
|
|
55
|
+
addCopyButton({ toggle: 2000 })
|
|
56
|
+
]
|
|
57
|
+
}));
|
|
58
|
+
</script>
|
|
59
|
+
|
|
60
|
+
<div
|
|
61
|
+
class="{base} {rounded} {shadow} {classes} {preBase} {prePadding} {preClasses}"
|
|
62
|
+
>
|
|
63
|
+
<!-- Output Shiki's Generated HTML -->
|
|
64
|
+
{@html generatedHtml}
|
|
65
|
+
</div>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { CodeBlockProps } from "./CodeBlockProps";
|
|
2
|
+
/** Code Block based on: https://shiki.style/ and https://www.skeleton.dev/docs/integrations/code-block/svelte/ */
|
|
3
|
+
declare const CodeBlock: import("svelte").Component<CodeBlockProps, {}, "">;
|
|
4
|
+
type CodeBlock = ReturnType<typeof CodeBlock>;
|
|
5
|
+
export default CodeBlock;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface CodeBlockProps {
|
|
2
|
+
code?: string;
|
|
3
|
+
lang?: 'console' | 'html' | 'css' | 'js' | 'ts' | 'markdown';
|
|
4
|
+
base?: string;
|
|
5
|
+
rounded?: string;
|
|
6
|
+
shadow?: string;
|
|
7
|
+
classes?: string;
|
|
8
|
+
preBase?: string;
|
|
9
|
+
prePadding?: string;
|
|
10
|
+
preClasses?: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export var ColorScheme;
|
|
2
|
+
(function (ColorScheme) {
|
|
3
|
+
ColorScheme[ColorScheme["Primary"] = 0] = "Primary";
|
|
4
|
+
ColorScheme[ColorScheme["Secondary"] = 1] = "Secondary";
|
|
5
|
+
ColorScheme[ColorScheme["Tertiary"] = 2] = "Tertiary";
|
|
6
|
+
ColorScheme[ColorScheme["Success"] = 3] = "Success";
|
|
7
|
+
ColorScheme[ColorScheme["Warning"] = 4] = "Warning";
|
|
8
|
+
ColorScheme[ColorScheme["Error"] = 5] = "Error";
|
|
9
|
+
ColorScheme[ColorScheme["Surface"] = 6] = "Surface";
|
|
10
|
+
ColorScheme[ColorScheme["Custom"] = 7] = "Custom";
|
|
11
|
+
})(ColorScheme || (ColorScheme = {}));
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ColorScheme } from './ColorScheme';
|
|
2
|
+
import type { OnBackground } from './OnBackground';
|
|
3
|
+
export interface GeneralUIProps {
|
|
4
|
+
/**
|
|
5
|
+
* Color scheme of the UI
|
|
6
|
+
*/
|
|
7
|
+
colorScheme?: ColorScheme;
|
|
8
|
+
/**
|
|
9
|
+
* Color scheme of the background the UI is on
|
|
10
|
+
*/
|
|
11
|
+
onBackground?: OnBackground;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLImgAttributes } from 'svelte/elements';
|
|
3
|
+
import type { GeneralUIProps } from './GeneralUIProps';
|
|
4
|
+
import { ColorScheme } from './ColorScheme';
|
|
5
|
+
|
|
6
|
+
type PinyaButtonProps = HTMLImgAttributes & GeneralUIProps;
|
|
7
|
+
|
|
8
|
+
const {
|
|
9
|
+
colorScheme = ColorScheme.Primary,
|
|
10
|
+
...props
|
|
11
|
+
}: PinyaButtonProps = $props();
|
|
12
|
+
|
|
13
|
+
const chooseTailwindClass = () => {
|
|
14
|
+
switch (colorScheme) {
|
|
15
|
+
case ColorScheme.Warning:
|
|
16
|
+
return 'btn preset-filled-warning-600-400 text-surface-100 hover:brightness-110';
|
|
17
|
+
case ColorScheme.Surface:
|
|
18
|
+
return 'btn preset-filled-surface-800-200 text-surface-100-900 hover:brightness-110';
|
|
19
|
+
default:
|
|
20
|
+
console.error('Unimplemented color scheme');
|
|
21
|
+
// eslint-disable-next-line no-fallthrough
|
|
22
|
+
case ColorScheme.Primary:
|
|
23
|
+
return 'icon-filter-on-primary-button';
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const tailwindClass = chooseTailwindClass();
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
<img
|
|
31
|
+
{...props}
|
|
32
|
+
class={`image-icon ${tailwindClass}`}>
|
|
33
|
+
|
|
34
|
+
<style>
|
|
35
|
+
:global(.image-icon) {
|
|
36
|
+
height: calc(var(--spacing) * 8);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:global(.small-icon-button .image-icon) {
|
|
40
|
+
height: calc(var(--spacing) * 6);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
:global(.icon-filter-on-primary-button) {
|
|
44
|
+
/* based on secondary-950 */
|
|
45
|
+
filter: brightness(0) saturate(100%) invert(18%) sepia(10%) saturate(4620%) hue-rotate(331deg) brightness(90%) contrast(88%);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@media (prefers-color-scheme: dark) {
|
|
49
|
+
:global(.icon-filter-on-primary-button) {
|
|
50
|
+
/* based on surface-0 */
|
|
51
|
+
filter: brightness(0) saturate(100%) invert(85%) sepia(3%) saturate(993%) hue-rotate(326deg) brightness(113%) contrast(105%);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
</style>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { HTMLImgAttributes } from 'svelte/elements';
|
|
2
|
+
import type { GeneralUIProps } from './GeneralUIProps';
|
|
3
|
+
type PinyaButtonProps = HTMLImgAttributes & GeneralUIProps;
|
|
4
|
+
declare const ImageIcon: import("svelte").Component<PinyaButtonProps, {}, "">;
|
|
5
|
+
type ImageIcon = ReturnType<typeof ImageIcon>;
|
|
6
|
+
export default ImageIcon;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Switch } from "@skeletonlabs/skeleton-svelte";
|
|
3
|
+
import type { Snippet } from "svelte";
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
checked?: boolean;
|
|
7
|
+
name: string;
|
|
8
|
+
onChange?: (() => void);
|
|
9
|
+
children?: Snippet;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
let {
|
|
13
|
+
checked = $bindable(false),
|
|
14
|
+
name,
|
|
15
|
+
onChange = undefined,
|
|
16
|
+
children = undefined
|
|
17
|
+
}: Props = $props();
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<Switch name={name}
|
|
21
|
+
controlActive="bg-secondary-400 dark:bg-secondary-500"
|
|
22
|
+
controlInactive="bg-surface-700 dark:bg-surface-800"
|
|
23
|
+
checked={checked}
|
|
24
|
+
onCheckedChange={(e) => {
|
|
25
|
+
checked = e.checked;
|
|
26
|
+
onChange?.();
|
|
27
|
+
}}>
|
|
28
|
+
{@render children?.()}
|
|
29
|
+
</Switch>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
|
+
interface Props {
|
|
3
|
+
checked?: boolean;
|
|
4
|
+
name: string;
|
|
5
|
+
onChange?: (() => void);
|
|
6
|
+
children?: Snippet;
|
|
7
|
+
}
|
|
8
|
+
declare const PineappleSwitch: import("svelte").Component<Props, {}, "checked">;
|
|
9
|
+
type PineappleSwitch = ReturnType<typeof PineappleSwitch>;
|
|
10
|
+
export default PineappleSwitch;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { type Snippet } from 'svelte';
|
|
3
|
+
|
|
4
|
+
let {
|
|
5
|
+
children,
|
|
6
|
+
href
|
|
7
|
+
}: { href: string, children: Snippet } = $props();
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<a
|
|
11
|
+
{href}
|
|
12
|
+
class="visited:text-surface-950 dark:visited:text-surface-400">
|
|
13
|
+
{@render children?.()}
|
|
14
|
+
</a>
|
|
15
|
+
|
|
16
|
+
<style>
|
|
17
|
+
</style>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { default as ImageIcon } from "./ImageIcon.svelte";
|
|
2
|
+
export { default as TextLink } from "./TextLink.svelte";
|
|
3
|
+
export * from "./ColorScheme";
|
|
4
|
+
export * from "./GeneralUIProps";
|
|
5
|
+
export * from "./OnBackground";
|
|
6
|
+
export * from "./pinya-card/index";
|
|
7
|
+
export * from "./WrapperProps";
|
|
8
|
+
export * from "./pinya-button/index";
|
|
9
|
+
export * from "./text-chip";
|
|
10
|
+
export * from "./CodeBlock";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { default as ImageIcon } from "./ImageIcon.svelte";
|
|
2
|
+
export { default as TextLink } from "./TextLink.svelte";
|
|
3
|
+
export * from "./ColorScheme";
|
|
4
|
+
export * from "./GeneralUIProps";
|
|
5
|
+
export * from "./OnBackground";
|
|
6
|
+
export * from "./pinya-card/index";
|
|
7
|
+
export * from "./WrapperProps";
|
|
8
|
+
export * from "./pinya-button/index";
|
|
9
|
+
export * from "./text-chip";
|
|
10
|
+
export * from "./CodeBlock";
|