Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
3656a4b
everything
Pato-desu Dec 18, 2025
09d0d8d
double linking elimination
Pato-desu Dec 18, 2025
2b329f4
Resolve merge conflict: moved volunteer vacancies to join page and de…
Pato-desu Dec 30, 2025
035ecf7
first draft
Pato-desu Jan 3, 2026
fbbdad9
removing redundancy
Pato-desu Jan 5, 2026
dbc2f81
wording and spaces
Pato-desu Jan 5, 2026
4437a30
adding mailersend
Pato-desu Jan 5, 2026
86aa026
reducing spaces more
Pato-desu Jan 5, 2026
4a17fac
rounding up stuff
Pato-desu Jan 5, 2026
7d91bad
link from /press
Pato-desu Jan 6, 2026
30cba2c
partnerships + linking back to /press
Pato-desu Jan 6, 2026
028e47e
Feedback
Pato-desu Jan 6, 2026
4d8bc7a
Merge branch 'main' into Contact-us-page
Pato-desu Jan 6, 2026
1806030
forcing netlify update?
Pato-desu Jan 6, 2026
31ed6ed
fix?
Pato-desu Jan 6, 2026
75363c1
fix? 2
Pato-desu Jan 6, 2026
fb909a6
fix 3
Pato-desu Jan 6, 2026
87ef9a6
changing recipients for testing purposes
Pato-desu Jan 6, 2026
7e7f027
data saving of fields
Pato-desu Jan 6, 2026
5ea47a0
change contact to contact us
Pato-desu Jan 6, 2026
469b271
fixing anon@pauseai.info
Pato-desu Jan 6, 2026
957dc0a
debugging sending errors
Pato-desu Jan 6, 2026
e2b8f3b
fetch
Pato-desu Jan 20, 2026
49b9831
Merge branch 'main' into Contact-us-page
Pato-desu Jan 20, 2026
3a79a4b
pnpm-lock fix?
Pato-desu Jan 20, 2026
f6d35d3
Remove unused mailersend dependency
Pato-desu Jan 20, 2026
42c1f6c
Configure separate email recipients for each contact form
Pato-desu Jan 20, 2026
73bd9fd
Merge branch 'main' of https://github.com/PauseAI/pauseai-website int…
Pato-desu Feb 2, 2026
65832f5
removed general tab
Pato-desu Feb 2, 2026
41dc0cc
added email auto responses
Pato-desu Feb 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/lib/redirects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ const REDIRECTS: Record<string, string> = {
'/contact': '/contact-us'
}

const OUR_XRISK_INTROS_YOUTUBE_PLAYLIST =
'https://www.youtube.com/watch?v=xBqU1QxCao8&list=PLI46NoubGtIJa0JVCBR-9CayxCOmU0EJt&index=1';
const OUR_XRISK_INTROS_YOUTUBE_PLAYLIST =
'https://www.youtube.com/watch?v=xBqU1QxCao8&list=PLI46NoubGtIJa0JVCBR-9CayxCOmU0EJt&index=1'
/** Temporary redirects (302) - for time-limited campaigns, A/B tests, etc. */
const TEMPORARY_REDIRECTS: Record<string, string> = {
'/see-why': OUR_XRISK_INTROS_YOUTUBE_PLAYLIST,
'/cy': OUR_XRISK_INTROS_YOUTUBE_PLAYLIST,
'/cy': OUR_XRISK_INTROS_YOUTUBE_PLAYLIST
}

export function handleRedirects(path: string) {
Expand Down
62 changes: 62 additions & 0 deletions src/routes/contact-us/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,58 @@ async function sendContactEmail(data: {
}
}

async function sendConfirmationEmail(data: {
name: string
email: string
type: keyof typeof CONTACT_RECIPIENTS
}) {
if (!env.MAILERSEND_API_KEY || !data.email) return

const teamEmail = CONTACT_RECIPIENTS[data.type]

const emailBody = {
from: {
email: teamEmail,
name: 'PauseAI Team'
},
reply_to: {
email: teamEmail,
name: 'PauseAI Team'
},
to: [
{
email: data.email,
name: data.name
}
],
subject: 'Thank you for contacting PauseAI',
html: `
<p>Hello,</p>
<p>Thank you for your interest — we appreciate you reaching out.</p>
<p>We’ve received your inquiry, and a member of our team will respond promptly.</p>
<p>We are a small team, therefore we aim to get back to you within 3 – 4 business days.</p>
<p>Thanks again for your patience and interest.</p>
<br>
<p>Best regards,</p>
<p>Pause AI team</p>
`,
text: `Hello,\n\nThank you for your interest — we appreciate you reaching out.\n\nWe’ve received your inquiry, and a member of our team will respond promptly.\n\nWe are a small team, therefore we aim to get back to you within 3 – 4 business days.\n\nThanks again for your patience and interest.\n\n\nBest regards,\n\nPause AI team`
}

try {
await fetch('https://api.mailersend.com/v1/email', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${env.MAILERSEND_API_KEY}`
},
body: JSON.stringify(emailBody)
})
} catch (error) {
console.error('Failed to send confirmation email:', error)
}
}

export const actions: Actions = {
standard: async ({ request }) => {
const data = await request.formData()
Expand All @@ -135,6 +187,8 @@ export const actions: Actions = {
return fail(500, { message: result.message })
}

await sendConfirmationEmail({ name, email, type: 'Standard' })

return { success: true }
},
media: async ({ request }) => {
Expand Down Expand Up @@ -162,6 +216,8 @@ export const actions: Actions = {
return fail(500, { message: result.message })
}

await sendConfirmationEmail({ name, email, type: 'Media' })

return { success: true }
},
partnerships: async ({ request }) => {
Expand Down Expand Up @@ -189,6 +245,8 @@ export const actions: Actions = {
return fail(500, { message: result.message })
}

await sendConfirmationEmail({ name, email, type: 'Partnerships' })

return { success: true }
},
feedback: async ({ request }) => {
Expand All @@ -214,6 +272,10 @@ export const actions: Actions = {
return fail(500, { message: result.message })
}

if (email) {
await sendConfirmationEmail({ name, email, type: 'Feedback' })
}

return { success: true }
}
}
130 changes: 34 additions & 96 deletions src/routes/contact-us/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@

const { title, description } = meta

let activeTab: 'standard' | 'media' | 'partnerships' | 'feedback' = 'standard'
let activeTab: 'media' | 'partnerships' | 'feedback' = 'partnerships'
let loading = false

let formData = {
standard: { name: '', email: '', subject: '', message: '' },
media: { name: '', email: '', subject: '', organization: '', details: '' },
partnerships: { name: '', email: '', organization: '', subject: '', message: '' },
feedback: { name: '', email: '', subject: '', message: '' }
Expand Down Expand Up @@ -57,14 +56,10 @@
}) => {
loading = false
if (result.type === 'success') {
toast.success(
"Thank you! We've received your message. We'll get back to you as soon as possible, usually within 3 to 4 working days."
)
toast.success("Thank you! We've received your message.")

// Clear the data for the successfully submitted tab
if (activeTab === 'standard') {
formData.standard = { name: '', email: '', subject: '', message: '' }
} else if (activeTab === 'media') {
if (activeTab === 'media') {
formData.media = { name: '', email: '', subject: '', organization: '', details: '' }
} else if (activeTab === 'partnerships') {
formData.partnerships = {
Expand Down Expand Up @@ -94,18 +89,15 @@

<div class="contact-page">
<h1>{title}</h1>
<p class="intro">
Get in touch with the PauseAI team. As we are a small team, please allow 3 to 4 working days for
a response.
</p>
<p class="intro">Get in touch with the PauseAI team.</p>

<div class="tabs">
<button
class="tab-button"
class:active={activeTab === 'standard'}
on:click={() => (activeTab = 'standard')}
class:active={activeTab === 'partnerships'}
on:click={() => (activeTab = 'partnerships')}
>
General Inquiries
Partnerships
</button>
<button
class="tab-button"
Expand All @@ -114,13 +106,6 @@
>
Press & Media
</button>
<button
class="tab-button"
class:active={activeTab === 'partnerships'}
on:click={() => (activeTab = 'partnerships')}
>
Partnerships
</button>
<button
class="tab-button"
class:active={activeTab === 'feedback'}
Expand All @@ -131,46 +116,61 @@
</div>

<div class="form-container">
{#if activeTab === 'standard'}
<section id="standard-contact">
<form method="POST" action="?/standard" use:enhance={handleEnhance}>
{#if activeTab === 'partnerships'}
<section id="partnerships-contact">
<p class="tab-intro">
Interested in collaborating? Read about our <Link href="/partnerships"
>partnership opportunities</Link
>.
</p>
<form method="POST" action="?/partnerships" use:enhance={handleEnhance}>
<div class="field">
<input
type="text"
id="std-name"
id="part-name"
name="name"
required
placeholder="Full Name"
bind:value={formData.standard.name}
bind:value={formData.partnerships.name}
/>
</div>
<div class="field">
<input
type="email"
id="std-email"
id="part-email"
name="email"
required
placeholder="Email"
bind:value={formData.standard.email}
bind:value={formData.partnerships.email}
/>
</div>
<div class="field">
<input
type="text"
id="std-subject"
id="part-org"
name="organization"
required
placeholder="Organization"
bind:value={formData.partnerships.organization}
/>
</div>
<div class="field">
<input
type="text"
id="part-subject"
name="subject"
required
placeholder="Subject"
bind:value={formData.standard.subject}
bind:value={formData.partnerships.subject}
/>
</div>
<div class="field">
<textarea
id="std-message"
id="part-message"
name="message"
required
placeholder="Message"
bind:value={formData.standard.message}
placeholder="How would you like to partner with us?"
bind:value={formData.partnerships.message}
></textarea>
</div>
<button type="submit" disabled={loading}>
Expand Down Expand Up @@ -240,68 +240,6 @@
</button>
</form>
</section>
{:else if activeTab === 'partnerships'}
<section id="partnerships-contact">
<p class="tab-intro">
Interested in collaborating? Read about our <Link href="/partnerships"
>partnership opportunities</Link
>.
</p>
<form method="POST" action="?/partnerships" use:enhance={handleEnhance}>
<div class="field">
<input
type="text"
id="part-name"
name="name"
required
placeholder="Full Name"
bind:value={formData.partnerships.name}
/>
</div>
<div class="field">
<input
type="email"
id="part-email"
name="email"
required
placeholder="Email"
bind:value={formData.partnerships.email}
/>
</div>
<div class="field">
<input
type="text"
id="part-org"
name="organization"
required
placeholder="Organization"
bind:value={formData.partnerships.organization}
/>
</div>
<div class="field">
<input
type="text"
id="part-subject"
name="subject"
required
placeholder="Subject"
bind:value={formData.partnerships.subject}
/>
</div>
<div class="field">
<textarea
id="part-message"
name="message"
required
placeholder="How would you like to partner with us?"
bind:value={formData.partnerships.message}
></textarea>
</div>
<button type="submit" disabled={loading}>
{loading ? 'Sending...' : 'Send Message'}
</button>
</form>
</section>
{:else if activeTab === 'feedback'}
<section id="feedback-contact">
<p class="tab-intro">
Expand Down
Loading