From d761a10bf7352f0fc46a94bb268cb63dd9497cad Mon Sep 17 00:00:00 2001 From: skidoodle Date: Wed, 13 Mar 2024 00:30:45 +0100 Subject: [PATCH] init --- hooks.client.ts | 22 + lib/badges.ts | 85 +++ lib/colors.js | 113 +++ lib/components/bio/UserPanel.svelte | 49 ++ lib/components/bio/elements/Banner.svelte | 12 + .../bio/elements/BannerContainer.svelte | 40 ++ .../bio/elements/InteractivePanel.svelte | 40 ++ lib/components/bio/elements/Panel.svelte | 36 + .../bio/elements/WidgetRenderContainer.svelte | 13 + lib/components/bio/profile/Avatar.svelte | 52 ++ lib/components/bio/profile/Badge.svelte | 25 + lib/components/bio/profile/Badges.svelte | 11 + lib/components/bio/profile/Description.svelte | 7 + lib/components/bio/profile/Extra.svelte | 22 + lib/components/bio/profile/ExtraItem.svelte | 12 + lib/components/bio/profile/Footer.svelte | 11 + lib/components/bio/profile/Name.svelte | 72 ++ lib/components/bio/profile/SocialLink.svelte | 31 + lib/components/bio/profile/SocialText.svelte | 15 + lib/components/bio/profile/Socials.svelte | 92 +++ .../bio/widgets/Discord/Status.svelte | 19 + lib/components/bio/widgets/DiscordUser.svelte | 40 ++ .../bio/widgets/ExternalSite.svelte | 15 + .../bio/widgets/InstagramPost.svelte | 17 + lib/components/bio/widgets/Markdown.svelte | 23 + .../bio/widgets/PinterestPin.svelte | 17 + .../bio/widgets/SoundCloudTrack.svelte | 17 + .../bio/widgets/SpotifyNowPlaying.svelte | 5 + lib/components/bio/widgets/Title.svelte | 13 + lib/components/bio/widgets/TwitchLive.svelte | 17 + lib/components/bio/widgets/TwitterPost.svelte | 17 + .../bio/widgets/YouTubeVideo.svelte | 17 + .../bio/widgets/types/GenericSite.svelte | 15 + lib/components/bio/widgets/types/Track.svelte | 15 + lib/components/common/Tooltip.svelte | 23 + lib/components/dashboard/editor/Handle.svelte | 15 + .../dashboard/editor/HandleDot.svelte | 1 + lib/components/dashboard/editor/List.svelte | 3 + .../dashboard/editor/ListElement.svelte | 7 + lib/components/dashboard/editor/Toggle.svelte | 26 + .../editor/WidgetPreviewContainer.svelte | 32 + .../dashboard/editor/types/DiscordUser.svelte | 8 + .../editor/types/ExternalSite.svelte | 27 + .../editor/types/InstagramPost.svelte | 18 + .../dashboard/editor/types/Markdown.svelte | 19 + .../editor/types/PinterestPin.svelte | 18 + .../editor/types/SoundCloudTrack.svelte | 18 + .../editor/types/SpotifyNowPlaying.svelte | 3 + .../dashboard/editor/types/Title.svelte | 18 + .../dashboard/editor/types/TwitchLive.svelte | 18 + .../dashboard/editor/types/TwitterPost.svelte | 18 + .../editor/types/YouTubeVideo.svelte | 18 + .../dashboard/elements/Button.svelte | 83 +++ .../dashboard/elements/InputGroup.svelte | 40 ++ .../elements/MultilineTextInput.svelte | 19 + .../dashboard/elements/Spinner.svelte | 17 + .../dashboard/elements/TextInput.svelte | 23 + .../dashboard/elements/Toggle.svelte | 20 + .../dashboard/modal/Category.svelte | 8 + .../dashboard/modal/Container.svelte | 55 ++ lib/components/dashboard/modal/Mount.svelte | 26 + .../dashboard/modal/NavbarModal.svelte | 57 ++ lib/components/dashboard/modal/Panel.svelte | 38 + .../dashboard/modal/types/Account.svelte | 53 ++ .../modal/types/ChangePassword.svelte | 63 ++ .../modal/types/Customization.svelte | 70 ++ .../dashboard/modal/types/DeleteWidget.svelte | 23 + .../modal/types/DiscardChanges.svelte | 24 + .../dashboard/modal/types/EditWidget.svelte | 134 ++++ .../dashboard/modal/types/Home.svelte | 8 + .../dashboard/modal/types/NewWidget.svelte | 63 ++ .../dashboard/modal/types/NsfwWarning.svelte | 24 + .../dashboard/modal/types/User.svelte | 37 + .../dashboard/modal/types/UserPanel.svelte | 667 ++++++++++++++++++ .../types/elements/ConfirmationDialog.svelte | 16 + .../types/elements/SocialsTextInput.svelte | 33 + .../dashboard/statistics/Greeter.svelte | 9 + lib/components/screens/Landing.svelte | 121 ++++ lib/components/screens/NoSuchUser.svelte | 37 + lib/config/index.ts | 16 + lib/constraints.ts | 112 +++ lib/discord-statuses.ts | 25 + lib/models/mime.ts | 12 + lib/models/modal.ts | 113 +++ lib/models/socials.ts | 239 +++++++ lib/models/widget.ts | 229 ++++++ lib/socials.ts | 20 + lib/stores/editor.ts | 452 ++++++++++++ lib/stores/modal.ts | 39 + lib/utils.ts | 10 + routes/+error.svelte | 37 + routes/+layout.svelte | 39 + routes/+page.svelte | 51 ++ routes/dashboard/+layout.svelte | 111 +++ routes/dashboard/+layout.ts | 1 + routes/dashboard/login/+page.svelte | 42 ++ routes/dashboard/login/+page.ts | 8 + routes/dashboard/login/recovery/+page.svelte | 30 + routes/dashboard/register/+page.svelte | 62 ++ routes/dashboard/register/+page.ts | 8 + routes/privacy/+page.svelte | 20 + routes/terms/+page.svelte | 20 + 102 files changed, 4761 insertions(+) create mode 100644 hooks.client.ts create mode 100644 lib/badges.ts create mode 100644 lib/colors.js create mode 100644 lib/components/bio/UserPanel.svelte create mode 100644 lib/components/bio/elements/Banner.svelte create mode 100644 lib/components/bio/elements/BannerContainer.svelte create mode 100644 lib/components/bio/elements/InteractivePanel.svelte create mode 100644 lib/components/bio/elements/Panel.svelte create mode 100644 lib/components/bio/elements/WidgetRenderContainer.svelte create mode 100644 lib/components/bio/profile/Avatar.svelte create mode 100644 lib/components/bio/profile/Badge.svelte create mode 100644 lib/components/bio/profile/Badges.svelte create mode 100644 lib/components/bio/profile/Description.svelte create mode 100644 lib/components/bio/profile/Extra.svelte create mode 100644 lib/components/bio/profile/ExtraItem.svelte create mode 100644 lib/components/bio/profile/Footer.svelte create mode 100644 lib/components/bio/profile/Name.svelte create mode 100644 lib/components/bio/profile/SocialLink.svelte create mode 100644 lib/components/bio/profile/SocialText.svelte create mode 100644 lib/components/bio/profile/Socials.svelte create mode 100644 lib/components/bio/widgets/Discord/Status.svelte create mode 100644 lib/components/bio/widgets/DiscordUser.svelte create mode 100644 lib/components/bio/widgets/ExternalSite.svelte create mode 100644 lib/components/bio/widgets/InstagramPost.svelte create mode 100644 lib/components/bio/widgets/Markdown.svelte create mode 100644 lib/components/bio/widgets/PinterestPin.svelte create mode 100644 lib/components/bio/widgets/SoundCloudTrack.svelte create mode 100644 lib/components/bio/widgets/SpotifyNowPlaying.svelte create mode 100644 lib/components/bio/widgets/Title.svelte create mode 100644 lib/components/bio/widgets/TwitchLive.svelte create mode 100644 lib/components/bio/widgets/TwitterPost.svelte create mode 100644 lib/components/bio/widgets/YouTubeVideo.svelte create mode 100644 lib/components/bio/widgets/types/GenericSite.svelte create mode 100644 lib/components/bio/widgets/types/Track.svelte create mode 100644 lib/components/common/Tooltip.svelte create mode 100644 lib/components/dashboard/editor/Handle.svelte create mode 100644 lib/components/dashboard/editor/HandleDot.svelte create mode 100644 lib/components/dashboard/editor/List.svelte create mode 100644 lib/components/dashboard/editor/ListElement.svelte create mode 100644 lib/components/dashboard/editor/Toggle.svelte create mode 100644 lib/components/dashboard/editor/WidgetPreviewContainer.svelte create mode 100644 lib/components/dashboard/editor/types/DiscordUser.svelte create mode 100644 lib/components/dashboard/editor/types/ExternalSite.svelte create mode 100644 lib/components/dashboard/editor/types/InstagramPost.svelte create mode 100644 lib/components/dashboard/editor/types/Markdown.svelte create mode 100644 lib/components/dashboard/editor/types/PinterestPin.svelte create mode 100644 lib/components/dashboard/editor/types/SoundCloudTrack.svelte create mode 100644 lib/components/dashboard/editor/types/SpotifyNowPlaying.svelte create mode 100644 lib/components/dashboard/editor/types/Title.svelte create mode 100644 lib/components/dashboard/editor/types/TwitchLive.svelte create mode 100644 lib/components/dashboard/editor/types/TwitterPost.svelte create mode 100644 lib/components/dashboard/editor/types/YouTubeVideo.svelte create mode 100644 lib/components/dashboard/elements/Button.svelte create mode 100644 lib/components/dashboard/elements/InputGroup.svelte create mode 100644 lib/components/dashboard/elements/MultilineTextInput.svelte create mode 100644 lib/components/dashboard/elements/Spinner.svelte create mode 100644 lib/components/dashboard/elements/TextInput.svelte create mode 100644 lib/components/dashboard/elements/Toggle.svelte create mode 100644 lib/components/dashboard/modal/Category.svelte create mode 100644 lib/components/dashboard/modal/Container.svelte create mode 100644 lib/components/dashboard/modal/Mount.svelte create mode 100644 lib/components/dashboard/modal/NavbarModal.svelte create mode 100644 lib/components/dashboard/modal/Panel.svelte create mode 100644 lib/components/dashboard/modal/types/Account.svelte create mode 100644 lib/components/dashboard/modal/types/ChangePassword.svelte create mode 100644 lib/components/dashboard/modal/types/Customization.svelte create mode 100644 lib/components/dashboard/modal/types/DeleteWidget.svelte create mode 100644 lib/components/dashboard/modal/types/DiscardChanges.svelte create mode 100644 lib/components/dashboard/modal/types/EditWidget.svelte create mode 100644 lib/components/dashboard/modal/types/Home.svelte create mode 100644 lib/components/dashboard/modal/types/NewWidget.svelte create mode 100644 lib/components/dashboard/modal/types/NsfwWarning.svelte create mode 100644 lib/components/dashboard/modal/types/User.svelte create mode 100644 lib/components/dashboard/modal/types/UserPanel.svelte create mode 100644 lib/components/dashboard/modal/types/elements/ConfirmationDialog.svelte create mode 100644 lib/components/dashboard/modal/types/elements/SocialsTextInput.svelte create mode 100644 lib/components/dashboard/statistics/Greeter.svelte create mode 100644 lib/components/screens/Landing.svelte create mode 100644 lib/components/screens/NoSuchUser.svelte create mode 100644 lib/config/index.ts create mode 100644 lib/constraints.ts create mode 100644 lib/discord-statuses.ts create mode 100644 lib/models/mime.ts create mode 100644 lib/models/modal.ts create mode 100644 lib/models/socials.ts create mode 100644 lib/models/widget.ts create mode 100644 lib/socials.ts create mode 100644 lib/stores/editor.ts create mode 100644 lib/stores/modal.ts create mode 100644 lib/utils.ts create mode 100644 routes/+error.svelte create mode 100644 routes/+layout.svelte create mode 100644 routes/+page.svelte create mode 100644 routes/dashboard/+layout.svelte create mode 100644 routes/dashboard/+layout.ts create mode 100644 routes/dashboard/login/+page.svelte create mode 100644 routes/dashboard/login/+page.ts create mode 100644 routes/dashboard/login/recovery/+page.svelte create mode 100644 routes/dashboard/register/+page.svelte create mode 100644 routes/dashboard/register/+page.ts create mode 100644 routes/privacy/+page.svelte create mode 100644 routes/terms/+page.svelte diff --git a/hooks.client.ts b/hooks.client.ts new file mode 100644 index 0000000..762cf35 --- /dev/null +++ b/hooks.client.ts @@ -0,0 +1,22 @@ +import { handleErrorWithSentry, Replay } from "@sentry/sveltekit"; +import * as Sentry from '@sentry/sveltekit'; +import config from "$lib/config"; + +Sentry.init({ + dsn: config.sentryDsn, + tracesSampleRate: 1.0, + + // This sets the sample rate to be 10%. You may want this to be 100% while + // in development and sample at a lower rate in production + replaysSessionSampleRate: 0.1, + + // If the entire session is not sampled, use the below sample rate to sample + // sessions when an error occurs. + replaysOnErrorSampleRate: 1.0, + + // If you don't want to use Session Replay, just remove the line below: + integrations: [new Replay()], +}); + +// If you have a custom error handler, pass it to `handleErrorWithSentry` +export const handleError = handleErrorWithSentry(); \ No newline at end of file diff --git a/lib/badges.ts b/lib/badges.ts new file mode 100644 index 0000000..fab0709 --- /dev/null +++ b/lib/badges.ts @@ -0,0 +1,85 @@ +export const badges: Badge[] = [ + { + id: 'SYSTEM', + name: 'System', + icon: '/assets/badges/system.svg', + }, + { + id: 'STAFF', + name: 'YourSitee Staff', + icon: '/assets/badges/staff.svg', + }, + { + id: 'VERIFIED_PARTNER', + name: 'Partnered & Verified', + icon: '/assets/badges/verified.svg', + }, + { + id: 'VERIFIED', + name: 'Verified Person', + icon: '/assets/badges/verified.svg', + }, + { + id: 'VERIFIED_ORG', + name: 'Verified Organization', + icon: '/assets/badges/verified_org.svg', + }, + { + id: 'VERIFIED_GOV', + name: 'Political Figure', + icon: '/assets/badges/verified_gov.svg', + }, + { + id: 'VERIFIED_DEV', + name: 'Verified Developer', + icon: '/assets/badges/verified.svg', + }, + { + id: 'VERIFIED_PREMIUM', + name: 'Verified by Premium', + icon: '/assets/badges/verified.svg', + }, + { + id: 'DONATER', + name: 'Donator', + icon: '/assets/badges/donator.svg', + }, + { + id: 'PREMIUM_BUSINESS', + name: 'Business', + icon: '/assets/badges/premium.svg', + }, + { + id: 'PREMIUM_PRO', + name: 'Premium', + icon: '/assets/badges/premium.svg', + }, + { + id: 'PREMIUM_BASIC', + name: 'Basic', + icon: '/assets/badges/premium.svg', + }, + { + id: 'EARLY_SUPPORTER', + name: 'Early Supporter', + icon: '/assets/badges/early_supporter.svg', + }, + { + id: 'BUG_HUNTER', + name: 'Bug Hunter', + icon: '/assets/badges/bug_hunter.svg', + }, + { + id: 'SOFT_LAUNCH', + name: 'Soft-Launch', + icon: '/assets/badges/soft_launch.svg', + }, + { + id: 'CANARY', + name: 'Beta Function', + icon: '/assets/badges/canary.svg', + }, + ]; + + export default badges; + \ No newline at end of file diff --git a/lib/colors.js b/lib/colors.js new file mode 100644 index 0000000..0ae803c --- /dev/null +++ b/lib/colors.js @@ -0,0 +1,113 @@ +// https://www.radix-ui.com/colors/docs/palette-composition/understanding-the-scale + +const light = { + step1: '#fbfdff', // Step 1: App background + step2: '#f9f9f9', // Step 2: Subtle background + step3: '#f1f1f1', // Step 3: UI element background + step4: '#ebebeb', // Step 4: Hovered UI element background + step5: '#e4e4e4', // Step 5: Active / Selected UI element background + step6: '#ddd', // Step 6: Subtle borders and separators + step7: '#d4d4d4', // Step 7: UI element border and focus rings + step8: '#bbb', // Step 8: Hovered UI element border + step9: '#8d8d8d', // Step 9: Solid backgrounds + step10: '#808080', // Step 10: Hovered solid backgrounds + step11: '#646464', // Step 11: Low-contrast text + step12: '#202020', // Step 12: High-contrast text + }; + + const dark = { + step1: '#090a0b', // Step 1: App background + step2: '#151515', // Step 2: Subtle background + step3: '#18181b', // Step 3: UI element background + step4: '#303030', // Step 4: Hovered UI element background + step5: '#373737', // Step 5: Active / Selected UI element background + step6: '#201c1c', // Step 6: Subtle borders and separators + step7: '#4a4a4a', // Step 7: UI element border and focus rings + step8: '#606060', // Step 8: Hovered UI element border + step9: '#6e6e6e', // Step 9: Solid backgrounds + step10: '#818181', // Step 10: Hovered solid backgrounds + step11: '#b1b1b1', // Step 11: Low-contrast text + step12: '#eee', // Step 12: High-contrast text + }; + + const lightColors = { + 'light-app-bg': light.step1, + 'light-subtle-bg': light.step2, + 'light-ui-element-bg': light.step3, + 'light-hover-ui-element-bg': light.step4, + 'light-active-ui-element-bg': light.step5, + 'light-subtle-separator': light.step6, + 'light-ui-element-separator': light.step7, + 'light-hover-ui-element-separator': light.step8, + 'light-solid-bg': light.step9, + 'light-hover-solid-bg': light.step10, + 'light-low-contrast-txt': light.step11, + 'light-high-contrast-txt': light.step12, + }; + + const darkColors = { + 'dark-app-bg': dark.step1, + 'dark-subtle-bg': dark.step2, + 'dark-ui-element-bg': dark.step3, + 'dark-hover-ui-element-bg': dark.step4, + 'dark-active-ui-element-bg': dark.step5, + 'dark-subtle-separator': dark.step6, + 'dark-ui-element-separator': dark.step7, + 'dark-hover-ui-element-separator': dark.step8, + 'dark-solid-bg': dark.step9, + 'dark-hover-solid-bg': dark.step10, + 'dark-low-contrast-txt': dark.step11, + 'dark-high-contrast-txt': dark.step12, + }; + + const theme = { + accent: '#4F81FE', + field: '#1E2023', + item: '#141719', + background: '#090A0B', + + 'widget-fill': '#0C0D0E99', + 'widget-stroke': '#292C3180', + 'widget-placeholder': '#292C3180', + + 'button-disabled': '#292A2A', + 'button-secondary-active': '#1E212480', + 'button-secondary-selected': '#343841', + 'button-secondary-active-solid': '#2F3138', + 'button-dark-transparent-fill': '#141719B3', + 'button-dark-stroke-from': '#181B1E', + 'button-dark-stroke-to': '#141719', + 'button-dark-fill': '#141719', + + 'icon-inactive': '#677283', + 'icon-active': '#fff', + 'icon-disabled': '#2F343F', + + 'text-header': '#F4F6F6', + 'text-primary': '#D1D6DB', + 'text-secondary': '#768698', + 'text-teritary': '#424C56', + 'text-typeable': '#8B9299', + 'text-clickable': '#637B96', + 'text-disabled': '#404242', + + 'menu-border-from': '#6A748917', + 'menu-border-to': '#12141957', + 'menu-fill': '#161717CC', + 'menu-transparent-fill': '#16171766', + }; + + const extras = { + 'accent-hover': '#729AFE', + 'accent-active': '#95B3FE', + }; + + const colors = { + ...lightColors, + ...darkColors, + ...extras, + ...theme, + }; + + export default colors; + \ No newline at end of file diff --git a/lib/components/bio/UserPanel.svelte b/lib/components/bio/UserPanel.svelte new file mode 100644 index 0000000..07dd330 --- /dev/null +++ b/lib/components/bio/UserPanel.svelte @@ -0,0 +1,49 @@ + + + +
+ + + + + + + + + + + + +
+
+
diff --git a/lib/components/bio/elements/Banner.svelte b/lib/components/bio/elements/Banner.svelte new file mode 100644 index 0000000..38ccf98 --- /dev/null +++ b/lib/components/bio/elements/Banner.svelte @@ -0,0 +1,12 @@ + + +
+ + diff --git a/lib/components/bio/elements/BannerContainer.svelte b/lib/components/bio/elements/BannerContainer.svelte new file mode 100644 index 0000000..65b7df9 --- /dev/null +++ b/lib/components/bio/elements/BannerContainer.svelte @@ -0,0 +1,40 @@ + + +
+ {#if !simple} +
+ +
+ {/if} +
+ +
+
+ + diff --git a/lib/components/bio/elements/InteractivePanel.svelte b/lib/components/bio/elements/InteractivePanel.svelte new file mode 100644 index 0000000..6525e14 --- /dev/null +++ b/lib/components/bio/elements/InteractivePanel.svelte @@ -0,0 +1,40 @@ + + + + +
+
+ +
+
+ {#if title} +

{title}

+ {/if} + +
+
+
+
+ + diff --git a/lib/components/bio/elements/Panel.svelte b/lib/components/bio/elements/Panel.svelte new file mode 100644 index 0000000..3d0ed72 --- /dev/null +++ b/lib/components/bio/elements/Panel.svelte @@ -0,0 +1,36 @@ + + +
+ {#if hasHandle} + + {/if} +
+ +
+
+ + diff --git a/lib/components/bio/elements/WidgetRenderContainer.svelte b/lib/components/bio/elements/WidgetRenderContainer.svelte new file mode 100644 index 0000000..cae07db --- /dev/null +++ b/lib/components/bio/elements/WidgetRenderContainer.svelte @@ -0,0 +1,13 @@ + + +{#if hasPreview} + +{:else} +
+ +
+{/if} diff --git a/lib/components/bio/profile/Avatar.svelte b/lib/components/bio/profile/Avatar.svelte new file mode 100644 index 0000000..7cfef4d --- /dev/null +++ b/lib/components/bio/profile/Avatar.svelte @@ -0,0 +1,52 @@ + + +
+ + diff --git a/lib/components/bio/profile/Badge.svelte b/lib/components/bio/profile/Badge.svelte new file mode 100644 index 0000000..a99375f --- /dev/null +++ b/lib/components/bio/profile/Badge.svelte @@ -0,0 +1,25 @@ + + +{#if badgeObject} + +
+ + +{/if} + + diff --git a/lib/components/bio/profile/Badges.svelte b/lib/components/bio/profile/Badges.svelte new file mode 100644 index 0000000..dfa00bb --- /dev/null +++ b/lib/components/bio/profile/Badges.svelte @@ -0,0 +1,11 @@ + + +
+ {#each badges as badge} + + {/each} +
diff --git a/lib/components/bio/profile/Description.svelte b/lib/components/bio/profile/Description.svelte new file mode 100644 index 0000000..568b2b5 --- /dev/null +++ b/lib/components/bio/profile/Description.svelte @@ -0,0 +1,7 @@ + + +{#if description} +

{description.trim()}

+{/if} diff --git a/lib/components/bio/profile/Extra.svelte b/lib/components/bio/profile/Extra.svelte new file mode 100644 index 0000000..6f730e0 --- /dev/null +++ b/lib/components/bio/profile/Extra.svelte @@ -0,0 +1,22 @@ + + +{#if location || school || workplace} +
+ {#if location} + + {/if} + {#if school} + + {/if} + {#if workplace} + + {/if} +
+{/if} diff --git a/lib/components/bio/profile/ExtraItem.svelte b/lib/components/bio/profile/ExtraItem.svelte new file mode 100644 index 0000000..6dd0753 --- /dev/null +++ b/lib/components/bio/profile/ExtraItem.svelte @@ -0,0 +1,12 @@ + + +
+ +

{text}

+
diff --git a/lib/components/bio/profile/Footer.svelte b/lib/components/bio/profile/Footer.svelte new file mode 100644 index 0000000..8f81c83 --- /dev/null +++ b/lib/components/bio/profile/Footer.svelte @@ -0,0 +1,11 @@ + + +{#if (uid || views) && uid !== -1} +
+ {#if uid}

UID: {uid === -2 ? '??' : uid}

{/if} + {#if views}

VIEWS: {views}

{/if} +
+{/if} diff --git a/lib/components/bio/profile/Name.svelte b/lib/components/bio/profile/Name.svelte new file mode 100644 index 0000000..28495d7 --- /dev/null +++ b/lib/components/bio/profile/Name.svelte @@ -0,0 +1,72 @@ + + +
+
+

{(identifier ?? secondaryIdentifier ?? 'Unknown').trim()}

+ {#if placeholder} +
+ {/if} + {#if badges.length > 0 && !placeholder} + + {/if} +
+
+

{(!identifier ? '' : secondaryIdentifier || '').trim()}

+ {#if placeholder} +
+ {/if} +
+
+ + diff --git a/lib/components/bio/profile/SocialLink.svelte b/lib/components/bio/profile/SocialLink.svelte new file mode 100644 index 0000000..a96d038 --- /dev/null +++ b/lib/components/bio/profile/SocialLink.svelte @@ -0,0 +1,31 @@ + + +{#if site} + +
+ Icon +
+
+{/if} + + + + diff --git a/lib/components/bio/profile/SocialText.svelte b/lib/components/bio/profile/SocialText.svelte new file mode 100644 index 0000000..5ba1d76 --- /dev/null +++ b/lib/components/bio/profile/SocialText.svelte @@ -0,0 +1,15 @@ + + + diff --git a/lib/components/bio/profile/Socials.svelte b/lib/components/bio/profile/Socials.svelte new file mode 100644 index 0000000..2550f00 --- /dev/null +++ b/lib/components/bio/profile/Socials.svelte @@ -0,0 +1,92 @@ + + +{#key socials} + {#if socials} + {#key socialLinks} + {#if socialLinks.length > 0} +
+ {#each socialLinks as link} + + {/each} +
+ {/if} + {/key} + {#if browser} + {#key socialTexts} + {#if socialTexts.length > 0} +
+ {#each socialTexts as text} + + {/each} +
+ {/if} + {/key} + {/if} + {/if} +{/key} + + diff --git a/lib/components/bio/widgets/Discord/Status.svelte b/lib/components/bio/widgets/Discord/Status.svelte new file mode 100644 index 0000000..e65bc75 --- /dev/null +++ b/lib/components/bio/widgets/Discord/Status.svelte @@ -0,0 +1,19 @@ + + +{#if statusObject} + + {statusObject.text} + + {#if activity} + and + {/if} +{/if} diff --git a/lib/components/bio/widgets/DiscordUser.svelte b/lib/components/bio/widgets/DiscordUser.svelte new file mode 100644 index 0000000..c6a0d7e --- /dev/null +++ b/lib/components/bio/widgets/DiscordUser.svelte @@ -0,0 +1,40 @@ + + + +
+
+
+
+

@{data.username}

+
+
+ +
+
+ {#if data.activity || data.status} +

+ Currently + {#if data.activity} + playing {data.activity}. + {/if} +

+ {/if} +
+ + + diff --git a/lib/components/bio/widgets/ExternalSite.svelte b/lib/components/bio/widgets/ExternalSite.svelte new file mode 100644 index 0000000..060660f --- /dev/null +++ b/lib/components/bio/widgets/ExternalSite.svelte @@ -0,0 +1,15 @@ + + + +
+

{data.title || data.url}

+ {#if data.title}

{data.url}

{/if} +
+
diff --git a/lib/components/bio/widgets/InstagramPost.svelte b/lib/components/bio/widgets/InstagramPost.svelte new file mode 100644 index 0000000..5792a3c --- /dev/null +++ b/lib/components/bio/widgets/InstagramPost.svelte @@ -0,0 +1,17 @@ + + + + + + + diff --git a/lib/components/bio/widgets/Markdown.svelte b/lib/components/bio/widgets/Markdown.svelte new file mode 100644 index 0000000..b82ea0a --- /dev/null +++ b/lib/components/bio/widgets/Markdown.svelte @@ -0,0 +1,23 @@ + + + +
+ {#key data} + {#key preview} + {#if preview} + + {@html preview.html} + {:else} +

{data.content.trim()}

+ {/if} + {/key} + {/key} +
+
diff --git a/lib/components/bio/widgets/PinterestPin.svelte b/lib/components/bio/widgets/PinterestPin.svelte new file mode 100644 index 0000000..fb3de40 --- /dev/null +++ b/lib/components/bio/widgets/PinterestPin.svelte @@ -0,0 +1,17 @@ + + + + + + + diff --git a/lib/components/bio/widgets/SoundCloudTrack.svelte b/lib/components/bio/widgets/SoundCloudTrack.svelte new file mode 100644 index 0000000..0d1d11f --- /dev/null +++ b/lib/components/bio/widgets/SoundCloudTrack.svelte @@ -0,0 +1,17 @@ + + + + + + + diff --git a/lib/components/bio/widgets/SpotifyNowPlaying.svelte b/lib/components/bio/widgets/SpotifyNowPlaying.svelte new file mode 100644 index 0000000..5be11d1 --- /dev/null +++ b/lib/components/bio/widgets/SpotifyNowPlaying.svelte @@ -0,0 +1,5 @@ + diff --git a/lib/components/bio/widgets/Title.svelte b/lib/components/bio/widgets/Title.svelte new file mode 100644 index 0000000..185682e --- /dev/null +++ b/lib/components/bio/widgets/Title.svelte @@ -0,0 +1,13 @@ + + + +
+

{data.content}

+
+
diff --git a/lib/components/bio/widgets/TwitchLive.svelte b/lib/components/bio/widgets/TwitchLive.svelte new file mode 100644 index 0000000..72377e1 --- /dev/null +++ b/lib/components/bio/widgets/TwitchLive.svelte @@ -0,0 +1,17 @@ + + + + + + + diff --git a/lib/components/bio/widgets/TwitterPost.svelte b/lib/components/bio/widgets/TwitterPost.svelte new file mode 100644 index 0000000..405cee0 --- /dev/null +++ b/lib/components/bio/widgets/TwitterPost.svelte @@ -0,0 +1,17 @@ + + + + + + + diff --git a/lib/components/bio/widgets/YouTubeVideo.svelte b/lib/components/bio/widgets/YouTubeVideo.svelte new file mode 100644 index 0000000..e09c310 --- /dev/null +++ b/lib/components/bio/widgets/YouTubeVideo.svelte @@ -0,0 +1,17 @@ + + + + + + + diff --git a/lib/components/bio/widgets/types/GenericSite.svelte b/lib/components/bio/widgets/types/GenericSite.svelte new file mode 100644 index 0000000..a2ec39d --- /dev/null +++ b/lib/components/bio/widgets/types/GenericSite.svelte @@ -0,0 +1,15 @@ + + +
+ {#if thumbnail} + Thumbnail + {/if} +
+

{title}

+

{description}

+
+
diff --git a/lib/components/bio/widgets/types/Track.svelte b/lib/components/bio/widgets/types/Track.svelte new file mode 100644 index 0000000..5a18078 --- /dev/null +++ b/lib/components/bio/widgets/types/Track.svelte @@ -0,0 +1,15 @@ + + +
+ {#if thumbnail} + Thumbnail + {/if} +
+

{title}

+

{artist}

+
+
diff --git a/lib/components/common/Tooltip.svelte b/lib/components/common/Tooltip.svelte new file mode 100644 index 0000000..03ada63 --- /dev/null +++ b/lib/components/common/Tooltip.svelte @@ -0,0 +1,23 @@ + +
+
+ +
+
+
+ + diff --git a/lib/components/dashboard/editor/Handle.svelte b/lib/components/dashboard/editor/Handle.svelte new file mode 100644 index 0000000..60da2ff --- /dev/null +++ b/lib/components/dashboard/editor/Handle.svelte @@ -0,0 +1,15 @@ + + +
+ {#each Array(2) as _} +
+ {#each Array(3) as _} + + {/each} +
+ {/each} +
diff --git a/lib/components/dashboard/editor/HandleDot.svelte b/lib/components/dashboard/editor/HandleDot.svelte new file mode 100644 index 0000000..7c9c5f1 --- /dev/null +++ b/lib/components/dashboard/editor/HandleDot.svelte @@ -0,0 +1 @@ +
diff --git a/lib/components/dashboard/editor/List.svelte b/lib/components/dashboard/editor/List.svelte new file mode 100644 index 0000000..dca5a56 --- /dev/null +++ b/lib/components/dashboard/editor/List.svelte @@ -0,0 +1,3 @@ +
+ +
diff --git a/lib/components/dashboard/editor/ListElement.svelte b/lib/components/dashboard/editor/ListElement.svelte new file mode 100644 index 0000000..e18cdba --- /dev/null +++ b/lib/components/dashboard/editor/ListElement.svelte @@ -0,0 +1,7 @@ + + +
+ +
diff --git a/lib/components/dashboard/editor/Toggle.svelte b/lib/components/dashboard/editor/Toggle.svelte new file mode 100644 index 0000000..9a34b81 --- /dev/null +++ b/lib/components/dashboard/editor/Toggle.svelte @@ -0,0 +1,26 @@ + + +
+
+
+ {#if title} +

+ {title} +

+ {/if} +
+ {#if subtitle} +

{subtitle}

+ {/if} + +
+ +
diff --git a/lib/components/dashboard/editor/WidgetPreviewContainer.svelte b/lib/components/dashboard/editor/WidgetPreviewContainer.svelte new file mode 100644 index 0000000..43f0c3f --- /dev/null +++ b/lib/components/dashboard/editor/WidgetPreviewContainer.svelte @@ -0,0 +1,32 @@ + + +
+
+
+ +
+
+
+
+ +
+
+
+ + diff --git a/lib/components/dashboard/editor/types/DiscordUser.svelte b/lib/components/dashboard/editor/types/DiscordUser.svelte new file mode 100644 index 0000000..abc1cb9 --- /dev/null +++ b/lib/components/dashboard/editor/types/DiscordUser.svelte @@ -0,0 +1,8 @@ + + + + + diff --git a/lib/components/dashboard/editor/types/ExternalSite.svelte b/lib/components/dashboard/editor/types/ExternalSite.svelte new file mode 100644 index 0000000..59d7d42 --- /dev/null +++ b/lib/components/dashboard/editor/types/ExternalSite.svelte @@ -0,0 +1,27 @@ + + + + + + + + + diff --git a/lib/components/dashboard/editor/types/InstagramPost.svelte b/lib/components/dashboard/editor/types/InstagramPost.svelte new file mode 100644 index 0000000..2ab8fae --- /dev/null +++ b/lib/components/dashboard/editor/types/InstagramPost.svelte @@ -0,0 +1,18 @@ + + + + + diff --git a/lib/components/dashboard/editor/types/Markdown.svelte b/lib/components/dashboard/editor/types/Markdown.svelte new file mode 100644 index 0000000..22a710d --- /dev/null +++ b/lib/components/dashboard/editor/types/Markdown.svelte @@ -0,0 +1,19 @@ + + + + + diff --git a/lib/components/dashboard/editor/types/PinterestPin.svelte b/lib/components/dashboard/editor/types/PinterestPin.svelte new file mode 100644 index 0000000..9d487e4 --- /dev/null +++ b/lib/components/dashboard/editor/types/PinterestPin.svelte @@ -0,0 +1,18 @@ + + + + + diff --git a/lib/components/dashboard/editor/types/SoundCloudTrack.svelte b/lib/components/dashboard/editor/types/SoundCloudTrack.svelte new file mode 100644 index 0000000..ce6e63d --- /dev/null +++ b/lib/components/dashboard/editor/types/SoundCloudTrack.svelte @@ -0,0 +1,18 @@ + + + + + diff --git a/lib/components/dashboard/editor/types/SpotifyNowPlaying.svelte b/lib/components/dashboard/editor/types/SpotifyNowPlaying.svelte new file mode 100644 index 0000000..ed38318 --- /dev/null +++ b/lib/components/dashboard/editor/types/SpotifyNowPlaying.svelte @@ -0,0 +1,3 @@ + diff --git a/lib/components/dashboard/editor/types/Title.svelte b/lib/components/dashboard/editor/types/Title.svelte new file mode 100644 index 0000000..1077331 --- /dev/null +++ b/lib/components/dashboard/editor/types/Title.svelte @@ -0,0 +1,18 @@ + + + + + diff --git a/lib/components/dashboard/editor/types/TwitchLive.svelte b/lib/components/dashboard/editor/types/TwitchLive.svelte new file mode 100644 index 0000000..8940f21 --- /dev/null +++ b/lib/components/dashboard/editor/types/TwitchLive.svelte @@ -0,0 +1,18 @@ + + + + + diff --git a/lib/components/dashboard/editor/types/TwitterPost.svelte b/lib/components/dashboard/editor/types/TwitterPost.svelte new file mode 100644 index 0000000..0dbb981 --- /dev/null +++ b/lib/components/dashboard/editor/types/TwitterPost.svelte @@ -0,0 +1,18 @@ + + + + + diff --git a/lib/components/dashboard/editor/types/YouTubeVideo.svelte b/lib/components/dashboard/editor/types/YouTubeVideo.svelte new file mode 100644 index 0000000..d1bb42f --- /dev/null +++ b/lib/components/dashboard/editor/types/YouTubeVideo.svelte @@ -0,0 +1,18 @@ + + + + + diff --git a/lib/components/dashboard/elements/Button.svelte b/lib/components/dashboard/elements/Button.svelte new file mode 100644 index 0000000..70530e6 --- /dev/null +++ b/lib/components/dashboard/elements/Button.svelte @@ -0,0 +1,83 @@ + + + + + diff --git a/lib/components/dashboard/elements/InputGroup.svelte b/lib/components/dashboard/elements/InputGroup.svelte new file mode 100644 index 0000000..b496156 --- /dev/null +++ b/lib/components/dashboard/elements/InputGroup.svelte @@ -0,0 +1,40 @@ + + +
+
+

+ {title || ''}{#if required}*{/if} +

+ {#if link} + {link.text} + {/if} +
+ {#if subtitle} +

{subtitle}

+ {/if} + +
+ + diff --git a/lib/components/dashboard/elements/MultilineTextInput.svelte b/lib/components/dashboard/elements/MultilineTextInput.svelte new file mode 100644 index 0000000..341521b --- /dev/null +++ b/lib/components/dashboard/elements/MultilineTextInput.svelte @@ -0,0 +1,19 @@ + + +