mirror of
https://github.com/LukeHagar/website.git
synced 2025-12-07 21:07:44 +00:00
fix
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import type { Snippet } from "svelte";
|
import type { Snippet } from 'svelte';
|
||||||
|
|
||||||
let carousel: HTMLElement;
|
let carousel: HTMLElement;
|
||||||
|
|
||||||
@@ -10,12 +10,7 @@
|
|||||||
children: Snippet;
|
children: Snippet;
|
||||||
}
|
}
|
||||||
|
|
||||||
let {
|
let { size = 'default', gap = 32, header, children }: Props = $props();
|
||||||
size = 'default',
|
|
||||||
gap = 32,
|
|
||||||
header,
|
|
||||||
children
|
|
||||||
}: Props = $props();
|
|
||||||
let scroll = 0;
|
let scroll = 0;
|
||||||
|
|
||||||
function calculateScrollAmount(prev = false) {
|
function calculateScrollAmount(prev = false) {
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
<!-- @migration-task Error while migrating Svelte code: Cannot use `export let` in runes mode — use `$props()` instead
|
||||||
|
https://svelte.dev/e/legacy_export_invalid -->
|
||||||
|
<!-- @migration-task Error while migrating Svelte code: Cannot use `export let` in runes mode — use `$props()` instead
|
||||||
|
https://svelte.dev/e/legacy_export_invalid -->
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Select, Tooltip } from '$lib/components';
|
import { Select, Tooltip } from '$lib/components';
|
||||||
import { getCodeHtml, type Language } from '$lib/utils/code';
|
import { getCodeHtml, type Language } from '$lib/utils/code';
|
||||||
@@ -29,7 +33,7 @@
|
|||||||
type CopyStatusType = keyof typeof CopyStatus;
|
type CopyStatusType = keyof typeof CopyStatus;
|
||||||
type CopyStatusValue = (typeof CopyStatus)[CopyStatusType];
|
type CopyStatusValue = (typeof CopyStatus)[CopyStatusType];
|
||||||
|
|
||||||
let copyText = $state<CopyStatusValue>(CopyStatus.Copy);
|
let copyText: CopyStatusValue = CopyStatus.Copy;
|
||||||
|
|
||||||
async function handleCopy() {
|
async function handleCopy() {
|
||||||
await copy(content);
|
await copy(content);
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
import type { Snippet } from 'svelte';
|
import type { Snippet } from 'svelte';
|
||||||
import type { HTMLInputAttributes } from 'svelte/elements';
|
import type { HTMLInputAttributes } from 'svelte/elements';
|
||||||
|
|
||||||
|
|
||||||
interface Props extends HTMLInputAttributes {
|
interface Props extends HTMLInputAttributes {
|
||||||
label?: string;
|
label?: string;
|
||||||
icon?: Snippet;
|
icon?: Snippet;
|
||||||
|
|||||||
@@ -62,8 +62,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
{#if data.nextPage}
|
{#if data.nextPage}
|
||||||
<button class="web-button is-secondary" onclick={loadMore}
|
<button class="web-button is-secondary" onclick={loadMore}>Load more</button
|
||||||
>Load more</button
|
|
||||||
>
|
>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -119,13 +119,14 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
// cleaned service description without Markdown links.
|
// cleaned service description without Markdown links.
|
||||||
let serviceDescription = $derived((data.service?.description ?? '').replace(
|
let serviceDescription = $derived(
|
||||||
/\[([^\]]+)]\([^)]+\)/g,
|
(data.service?.description ?? '').replace(/\[([^\]]+)]\([^)]+\)/g, '$1')
|
||||||
'$1'
|
);
|
||||||
));
|
|
||||||
|
|
||||||
// the service description up to the first full stop, providing sufficient information.
|
// the service description up to the first full stop, providing sufficient information.
|
||||||
let shortenedDescription = $derived(serviceDescription.substring(0, serviceDescription.indexOf('.') + 1));
|
let shortenedDescription = $derived(
|
||||||
|
serviceDescription.substring(0, serviceDescription.indexOf('.') + 1)
|
||||||
|
);
|
||||||
|
|
||||||
let platformBindingForSelect = $derived($page.params.platform as Platform);
|
let platformBindingForSelect = $derived($page.params.platform as Platform);
|
||||||
let platform = $derived(($preferredPlatform ?? $page.params.platform) as Platform);
|
let platform = $derived(($preferredPlatform ?? $page.params.platform) as Platform);
|
||||||
|
|||||||
@@ -21,14 +21,16 @@
|
|||||||
let customizing = $state(false);
|
let customizing = $state(false);
|
||||||
let variant: TicketVariant = $state(data.ticket.variant ?? 'default');
|
let variant: TicketVariant = $state(data.ticket.variant ?? 'default');
|
||||||
|
|
||||||
let modified = $derived(!dequal(
|
let modified = $derived(
|
||||||
{
|
!dequal(
|
||||||
name: data.ticket?.name,
|
{
|
||||||
tribe: data.ticket?.tribe,
|
name: data.ticket?.name,
|
||||||
showGitHub: data.ticket?.show_contributions
|
tribe: data.ticket?.tribe,
|
||||||
},
|
showGitHub: data.ticket?.show_contributions
|
||||||
{ name, tribe, showGitHub }
|
},
|
||||||
));
|
{ name, tribe, showGitHub }
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
async function saveTicket() {
|
async function saveTicket() {
|
||||||
const ticketId = data.ticket?.$id;
|
const ticketId = data.ticket?.$id;
|
||||||
@@ -57,13 +59,15 @@
|
|||||||
|
|
||||||
const ticketUrl = `${$page.url.origin}/init-0/tickets/${data.ticket.$id}`;
|
const ticketUrl = `${$page.url.origin}/init-0/tickets/${data.ticket.$id}`;
|
||||||
const { copied, copy } = createCopy(ticketUrl);
|
const { copied, copy } = createCopy(ticketUrl);
|
||||||
let twitterText = $derived(encodeURIComponent(
|
let twitterText = $derived(
|
||||||
[
|
encodeURIComponent(
|
||||||
`Join Init and celebrate everything new with @appwrite`,
|
[
|
||||||
``,
|
`Join Init and celebrate everything new with @appwrite`,
|
||||||
`Claim your ticket. ${ticketUrl}`
|
``,
|
||||||
].join('\n')
|
`Claim your ticket. ${ticketUrl}`
|
||||||
));
|
].join('\n')
|
||||||
|
)
|
||||||
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
|
|||||||
@@ -22,14 +22,16 @@
|
|||||||
let customizing = $state(false);
|
let customizing = $state(false);
|
||||||
let saving = $state(false);
|
let saving = $state(false);
|
||||||
|
|
||||||
let modified = $derived(!dequal(
|
let modified = $derived(
|
||||||
{
|
!dequal(
|
||||||
name: originalName,
|
{
|
||||||
title: originalTitle,
|
name: originalName,
|
||||||
showGitHub: originalShowGitHub
|
title: originalTitle,
|
||||||
},
|
showGitHub: originalShowGitHub
|
||||||
{ name, title, showGitHub }
|
},
|
||||||
));
|
{ name, title, showGitHub }
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
async function saveTicket() {
|
async function saveTicket() {
|
||||||
if (!modified) return;
|
if (!modified) return;
|
||||||
|
|||||||
@@ -74,7 +74,7 @@
|
|||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
<!-- binding for fuse -->
|
<!-- binding for fuse -->
|
||||||
<Fuse list={data.list} options={fuseOptions} bind:query={query} bind:result />
|
<Fuse list={data.list} options={fuseOptions} bind:query bind:result />
|
||||||
<Main>
|
<Main>
|
||||||
<header class="web-u-sep-block-end web-u-padding-block-end-0 relative overflow-hidden pb-0">
|
<header class="web-u-sep-block-end web-u-padding-block-end-0 relative overflow-hidden pb-0">
|
||||||
<div class="hero web-u-padding-block-end-0 relative container">
|
<div class="hero web-u-padding-block-end-0 relative container">
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
type CopyStatusType = keyof typeof CopyStatus;
|
type CopyStatusType = keyof typeof CopyStatus;
|
||||||
type CopyStatusValue = (typeof CopyStatus)[CopyStatusType];
|
type CopyStatusValue = (typeof CopyStatus)[CopyStatusType];
|
||||||
|
|
||||||
let copyText = $state<CopyStatusValue>(CopyStatus.Copy);
|
let copyText: CopyStatusValue = CopyStatus.Copy;
|
||||||
async function handleCopy() {
|
async function handleCopy() {
|
||||||
await copy(content);
|
await copy(content);
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
type CopyStatusType = keyof typeof CopyStatus;
|
type CopyStatusType = keyof typeof CopyStatus;
|
||||||
type CopyStatusValue = (typeof CopyStatus)[CopyStatusType];
|
type CopyStatusValue = (typeof CopyStatus)[CopyStatusType];
|
||||||
|
|
||||||
let copyText = $state<CopyStatusValue>(CopyStatus.Copy);
|
let copyText: CopyStatusValue = CopyStatus.Copy;
|
||||||
async function handleCopy() {
|
async function handleCopy() {
|
||||||
await copy(content);
|
await copy(content);
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
type CopyStatusType = keyof typeof CopyStatus;
|
type CopyStatusType = keyof typeof CopyStatus;
|
||||||
type CopyStatusValue = (typeof CopyStatus)[CopyStatusType];
|
type CopyStatusValue = (typeof CopyStatus)[CopyStatusType];
|
||||||
|
|
||||||
let copyText = $state<CopyStatusValue>(CopyStatus.Copy);
|
let copyText: CopyStatusValue = CopyStatus.Copy;
|
||||||
async function handleCopy() {
|
async function handleCopy() {
|
||||||
await copy(content);
|
await copy(content);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user