Skip to content

Commit

Permalink
Merge branch 'main' into add-video-to-homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
ItzNotABug authored Dec 14, 2024
2 parents 1025e64 + 579a714 commit 86297d8
Show file tree
Hide file tree
Showing 71 changed files with 994 additions and 302 deletions.
3 changes: 3 additions & 0 deletions markdoc.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
"type": "esm",
"property": "default",
"watch": true
},
"partials": {
"auth-security.md": "./src/partials/auth-security.md"
}
}
]
20 changes: 17 additions & 3 deletions src/lib/components/Feedback.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<script lang="ts">
import { page } from '$app/stores';
import { fade } from 'svelte/transition';
import { loggedIn, user } from '$lib/utils/console';
import { PUBLIC_GROWTH_ENDPOINT } from '$env/static/public';
export let date: string | undefined = undefined;
Expand All @@ -14,6 +16,9 @@
async function handleSubmit() {
submitting = true;
error = undefined;
const userId = loggedIn && $user?.$id ? $user.$id : undefined;
const response = await fetch(`${PUBLIC_GROWTH_ENDPOINT}/feedback/docs`, {
method: 'POST',
headers: {
Expand All @@ -23,7 +28,10 @@
email,
type: feedbackType,
route: $page.route.id,
comment
comment,
metaFields: {
userId
}
})
});
submitting = false;
Expand All @@ -33,6 +41,7 @@
}
comment = email = '';
submitted = true;
setTimeout(() => (showFeedback = false), 500);
}
function reset() {
Expand All @@ -45,6 +54,10 @@
$: if (!showFeedback) {
reset();
}
$: if (showFeedback && loggedIn && $user?.email) {
email = $user?.email;
}
</script>

<section class="web-content-footer">
Expand All @@ -60,7 +73,7 @@
class="web-radio-button"
aria-label="helpful"
on:click={() => {
showFeedback = feedbackType === 'positive' ? false : true;
showFeedback = feedbackType !== 'positive';
feedbackType = 'positive';
}}
>
Expand All @@ -70,7 +83,7 @@
class="web-radio-button"
aria-label="unhelpful"
on:click={() => {
showFeedback = feedbackType === 'negative' ? false : true;
showFeedback = feedbackType !== 'negative';
feedbackType = 'negative';
}}
>
Expand Down Expand Up @@ -104,6 +117,7 @@
on:submit|preventDefault={handleSubmit}
class="web-card is-normal"
style="--card-padding:1rem"
out:fade={{ duration: 450 }}
>
<div class="flex flex-col gap-2">
<label for="message">
Expand Down
6 changes: 3 additions & 3 deletions src/lib/components/FooterNav.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@
{ label: 'Solid', href: '/docs/quick-starts/solid' }
],
Products: [
{ label: 'Auth', href: '/docs/products/auth' },
{ label: 'Auth', href: '/products/auth' },
{ label: 'Databases', href: '/docs/products/databases' },
{ label: 'Functions', href: '/docs/products/functions' },
{ label: 'Functions', href: '/products/functions' },
{ label: 'Messaging', href: '/products/messaging' },
{ label: 'Storage', href: '/docs/products/storage' },
{ label: 'Storage', href: '/products/storage' },
{ label: 'Realtime', href: '/docs/apis/realtime' }
],
Learn: [
Expand Down
7 changes: 7 additions & 0 deletions src/lib/components/MainFooter.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,13 @@
display: grid;
}
@media #{devices.$break1} {
.status {
height: 55px;
margin-bottom: 6px; /* balancing due to style:margin-top="-4px" & the `iframe` has some spacings too I think */
}
}
.e-main-footer {
display: flex;
@media #{devices.$break1} {
Expand Down
28 changes: 14 additions & 14 deletions src/lib/components/Newsletter.svelte
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<script context="module" lang="ts">
import { PUBLIC_GROWTH_ENDPOINT } from '$env/static/public';
import { PUBLIC_GROWTH_ENDPOINT } from '$env/static/public';
export async function newsletter(name: string, email: string) {
const response = await fetch(`${PUBLIC_GROWTH_ENDPOINT}/newsletter/subscribe`, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
name,
email
})
});
return response;
}
export async function newsletter(name: string, email: string) {
const response = await fetch(`${PUBLIC_GROWTH_ENDPOINT}/newsletter/subscribe`, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
name,
email
})
});
return response;
}
</script>

<script lang="ts">
Expand Down
8 changes: 7 additions & 1 deletion src/lib/components/PreFooter.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
import { trackEvent } from '$lib/actions/analytics';
</script>

<img src="/images/bgs/pre-footer.png" alt="" class="web-pre-footer-bg" loading="lazy" style="z-index:-1" />
<img
src="/images/bgs/pre-footer.png"
alt=""
class="web-pre-footer-bg"
loading="lazy"
style="z-index:-1"
/>

<div class="web-u-row-gap-80 relative grid gap-8 md:grid-cols-2">
<section class="web-hero flex items-center justify-center gap-y-8">
Expand Down
2 changes: 1 addition & 1 deletion src/lib/components/ProductsSubmenu.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
icon: '/images/icons/illustrated/dark/auth.png'
},
{
name: 'Database',
name: 'Databases',
href: '/docs/products/databases',
description: 'Scalable and robust databases.',
icon: '/images/icons/illustrated/dark/databases.png'
Expand Down
Loading

0 comments on commit 86297d8

Please sign in to comment.