mirror of
https://github.com/LukeHagar/website.git
synced 2025-12-06 04:22:07 +00:00
Merge branch 'main' into blog-layout-shift
This commit is contained in:
@@ -36,6 +36,7 @@
|
|||||||
"@appwrite.io/pink": "~0.26.0",
|
"@appwrite.io/pink": "~0.26.0",
|
||||||
"@appwrite.io/pink-icons": "~0.26.0",
|
"@appwrite.io/pink-icons": "~0.26.0",
|
||||||
"@appwrite.io/repo": "github:appwrite/appwrite#1.6.x",
|
"@appwrite.io/repo": "github:appwrite/appwrite#1.6.x",
|
||||||
|
"@eslint/js": "^9.21.0",
|
||||||
"@fingerprintjs/fingerprintjs": "^4.5.1",
|
"@fingerprintjs/fingerprintjs": "^4.5.1",
|
||||||
"@internationalized/date": "3.5.0",
|
"@internationalized/date": "3.5.0",
|
||||||
"@melt-ui/pp": "^0.3.2",
|
"@melt-ui/pp": "^0.3.2",
|
||||||
|
|||||||
9
pnpm-lock.yaml
generated
9
pnpm-lock.yaml
generated
@@ -36,6 +36,9 @@ importers:
|
|||||||
'@appwrite.io/repo':
|
'@appwrite.io/repo':
|
||||||
specifier: github:appwrite/appwrite#1.6.x
|
specifier: github:appwrite/appwrite#1.6.x
|
||||||
version: https://codeload.github.com/appwrite/appwrite/tar.gz/a65b0bb32cf6c75deb16e69fa0a2e4961e08b489
|
version: https://codeload.github.com/appwrite/appwrite/tar.gz/a65b0bb32cf6c75deb16e69fa0a2e4961e08b489
|
||||||
|
'@eslint/js':
|
||||||
|
specifier: ^9.21.0
|
||||||
|
version: 9.21.0
|
||||||
'@fingerprintjs/fingerprintjs':
|
'@fingerprintjs/fingerprintjs':
|
||||||
specifier: ^4.5.1
|
specifier: ^4.5.1
|
||||||
version: 4.5.1
|
version: 4.5.1
|
||||||
@@ -485,6 +488,10 @@ packages:
|
|||||||
resolution: {integrity: sha512-rbq9/g38qjfqFLOVPvwjIvFFdNziEC5S65jmjPw5r6A//QH+W91akh9irMwjDN8zKUTak6W9EsAv4m/7Wnw0UQ==}
|
resolution: {integrity: sha512-rbq9/g38qjfqFLOVPvwjIvFFdNziEC5S65jmjPw5r6A//QH+W91akh9irMwjDN8zKUTak6W9EsAv4m/7Wnw0UQ==}
|
||||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||||
|
|
||||||
|
'@eslint/js@9.21.0':
|
||||||
|
resolution: {integrity: sha512-BqStZ3HX8Yz6LvsF5ByXYrtigrV5AXADWLAGc7PH/1SxOb7/FIYYMszZZWiUou/GB9P2lXWk2SV4d+Z8h0nknw==}
|
||||||
|
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||||
|
|
||||||
'@eslint/object-schema@2.1.5':
|
'@eslint/object-schema@2.1.5':
|
||||||
resolution: {integrity: sha512-o0bhxnL89h5Bae5T318nFoFzGy+YE5i/gGkoPAgkmTVdRKTiv3p8JHevPiPaMwoloKfEiiaHlawCqaZMqRm+XQ==}
|
resolution: {integrity: sha512-o0bhxnL89h5Bae5T318nFoFzGy+YE5i/gGkoPAgkmTVdRKTiv3p8JHevPiPaMwoloKfEiiaHlawCqaZMqRm+XQ==}
|
||||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||||
@@ -4725,6 +4732,8 @@ snapshots:
|
|||||||
|
|
||||||
'@eslint/js@9.19.0': {}
|
'@eslint/js@9.19.0': {}
|
||||||
|
|
||||||
|
'@eslint/js@9.21.0': {}
|
||||||
|
|
||||||
'@eslint/object-schema@2.1.5': {}
|
'@eslint/object-schema@2.1.5': {}
|
||||||
|
|
||||||
'@eslint/plugin-kit@0.2.5':
|
'@eslint/plugin-kit@0.2.5':
|
||||||
|
|||||||
@@ -95,6 +95,14 @@
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<svelte:head>
|
||||||
|
{#if prevStep}
|
||||||
|
<link rel="prev" href={prevStep.href} />
|
||||||
|
{/if}
|
||||||
|
{#if nextStep}
|
||||||
|
<link rel="next" href={nextStep.href} />
|
||||||
|
{/if}
|
||||||
|
</svelte:head>
|
||||||
<main class="contents" id="main">
|
<main class="contents" id="main">
|
||||||
<article class="web-article contents">
|
<article class="web-article contents">
|
||||||
<header class="web-article-header">
|
<header class="web-article-header">
|
||||||
|
|||||||
@@ -53,6 +53,7 @@
|
|||||||
import { onMount } from 'svelte';
|
import { onMount } from 'svelte';
|
||||||
import { createSource, loggedIn } from '$lib/utils/console';
|
import { createSource, loggedIn } from '$lib/utils/console';
|
||||||
import { beforeNavigate } from '$app/navigation';
|
import { beforeNavigate } from '$app/navigation';
|
||||||
|
import { trackEvent } from '$lib/actions/analytics';
|
||||||
|
|
||||||
function applyTheme(theme: Theme) {
|
function applyTheme(theme: Theme) {
|
||||||
const resolvedTheme = theme === 'system' ? getSystemTheme() : theme;
|
const resolvedTheme = theme === 'system' ? getSystemTheme() : theme;
|
||||||
@@ -61,6 +62,9 @@
|
|||||||
document.body.classList.add(className);
|
document.body.classList.add(className);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const thresholds = [0.25, 0.5, 0.75];
|
||||||
|
const tracked = new Set();
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
const urlParams = $page.url.searchParams;
|
const urlParams = $page.url.searchParams;
|
||||||
const ref = urlParams.get('ref');
|
const ref = urlParams.get('ref');
|
||||||
@@ -106,6 +110,9 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
beforeNavigate(({ willUnload, to }) => {
|
beforeNavigate(({ willUnload, to }) => {
|
||||||
|
if (window) {
|
||||||
|
tracked.clear();
|
||||||
|
}
|
||||||
if ($updated && !willUnload && to?.url) {
|
if ($updated && !willUnload && to?.url) {
|
||||||
location.href = to.url.href;
|
location.href = to.url.href;
|
||||||
}
|
}
|
||||||
@@ -118,8 +125,31 @@
|
|||||||
|
|
||||||
$: canonicalUrl =
|
$: canonicalUrl =
|
||||||
$page.url.origin.replace(/^https?:\/\/www\./, 'https://') + $page.url.pathname;
|
$page.url.origin.replace(/^https?:\/\/www\./, 'https://') + $page.url.pathname;
|
||||||
|
|
||||||
|
function handleScroll() {
|
||||||
|
const scrollY = window.scrollY;
|
||||||
|
const docHeight = document.documentElement.scrollHeight - window.innerHeight;
|
||||||
|
const scrollPercentage = scrollY / docHeight;
|
||||||
|
|
||||||
|
thresholds.forEach((threshold) => {
|
||||||
|
if (scrollPercentage >= threshold && !tracked.has(threshold)) {
|
||||||
|
const pageName =
|
||||||
|
$page.url.pathname.slice(1) === ''
|
||||||
|
? 'home'
|
||||||
|
: $page.url.pathname.slice(1).replace(/\//g, '-');
|
||||||
|
|
||||||
|
const eventName = `${pageName}_scroll-depth_${threshold * 100}prct_scroll`;
|
||||||
|
tracked.add(threshold);
|
||||||
|
trackEvent({
|
||||||
|
plausible: { name: eventName },
|
||||||
|
posthog: { name: eventName }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<svelte:window on:scroll={handleScroll} />
|
||||||
<svelte:head>
|
<svelte:head>
|
||||||
{#if !dev}
|
{#if !dev}
|
||||||
<!--suppress JSUnresolvedLibraryURL -->
|
<!--suppress JSUnresolvedLibraryURL -->
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
import Faq from './faq.svelte';
|
import Faq from './faq.svelte';
|
||||||
import { getReferrerAndUtmSource } from '$lib/utils/utm';
|
import { getReferrerAndUtmSource } from '$lib/utils/utm';
|
||||||
import CommunitySupportChat from '$lib/components/CommunitySupportChat.svelte';
|
import CommunitySupportChat from '$lib/components/CommunitySupportChat.svelte';
|
||||||
|
import { trackEvent } from '$lib/actions/analytics';
|
||||||
|
|
||||||
const title = 'Startups' + TITLE_SUFFIX;
|
const title = 'Startups' + TITLE_SUFFIX;
|
||||||
const description =
|
const description =
|
||||||
@@ -59,6 +60,11 @@
|
|||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
|
trackEvent({
|
||||||
|
plausible: { name: 'startups-form_submit' },
|
||||||
|
posthog: { name: 'startups-form_submit' }
|
||||||
|
});
|
||||||
|
|
||||||
submitting = false;
|
submitting = false;
|
||||||
|
|
||||||
if (response.status >= 400) {
|
if (response.status >= 400) {
|
||||||
|
|||||||
Reference in New Issue
Block a user