Skip to content

Commit 4befaf6

Browse files
authored
Merge pull request #213 from Context-Engine-AI/feature/landing-page-banner-video
feat: Add launch banner with dynamic demo request flow
2 parents 79a487c + 6b5ba98 commit 4befaf6

File tree

2 files changed

+147
-4
lines changed

2 files changed

+147
-4
lines changed

src/routes/+layout.svelte

Lines changed: 128 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,152 @@
11
<script lang="ts">
22
import '../app.scss';
3+
import { Megaphone } from 'lucide-svelte';
4+
import { page } from '$app/stores';
5+
import { base } from '$app/paths';
36
47
let { children } = $props();
8+
9+
// Hide banner on contact page only when coming from demo request
10+
let hideBanner = $derived(
11+
$page.route.id === '/contact' && $page.url.searchParams.get('type') === 'demo'
12+
);
513
</script>
614

715
<div class="bg-gradient"></div>
816
<div class="bg-overlay"></div>
917

18+
{#if !hideBanner}
19+
<div class="launch-banner">
20+
<div class="banner-content">
21+
<div class="banner-text">
22+
<span class="banner-icon">
23+
<Megaphone size={18} />
24+
</span>
25+
<span class="banner-message">Context Engine is launching soon!</span>
26+
<a href="{base}/contact?type=demo" class="banner-cta">Request Demo</a>
27+
</div>
28+
</div>
29+
</div>
30+
{/if}
31+
1032
<div class="app">
1133
<main>
1234
{@render children()}
1335
</main>
1436
</div>
1537

1638
<style lang="scss">
39+
.launch-banner {
40+
position: sticky;
41+
top: 0;
42+
z-index: 1000;
43+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
44+
color: white;
45+
padding: 0.75rem 1rem;
46+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
47+
animation: slideDown 0.3s ease-out;
48+
}
49+
50+
.banner-content {
51+
display: flex;
52+
justify-content: space-between;
53+
align-items: center;
54+
max-width: 1200px;
55+
margin: 0 auto;
56+
}
57+
58+
.banner-text {
59+
display: flex;
60+
align-items: center;
61+
gap: 0.5rem;
62+
flex: 1;
63+
}
64+
65+
.banner-icon {
66+
color: rgba(255, 255, 255, 0.9);
67+
display: inline-flex;
68+
align-items: center;
69+
justify-content: center;
70+
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
71+
}
72+
73+
@keyframes iconPulse {
74+
0%,
75+
100% {
76+
opacity: 0.9;
77+
transform: scale(1);
78+
}
79+
50% {
80+
opacity: 1;
81+
transform: scale(1.1);
82+
}
83+
}
84+
85+
.banner-message {
86+
font-weight: 500;
87+
font-size: 0.95rem;
88+
}
89+
90+
.banner-cta {
91+
background: rgba(255, 255, 255, 0.9);
92+
color: #667eea;
93+
text-decoration: none;
94+
padding: 0.4rem 1rem;
95+
border-radius: 1.25rem;
96+
font-weight: 600;
97+
font-size: 0.875rem;
98+
margin-left: 1rem;
99+
white-space: nowrap;
100+
transition: all 0.2s ease;
101+
102+
&:hover {
103+
background: white;
104+
transform: translateY(-1px);
105+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
106+
}
107+
108+
&:active {
109+
transform: translateY(0);
110+
}
111+
}
112+
113+
@keyframes slideDown {
114+
from {
115+
transform: translateY(-100%);
116+
opacity: 0;
117+
}
118+
to {
119+
transform: translateY(0);
120+
opacity: 1;
121+
}
122+
}
123+
124+
@media (max-width: 768px) {
125+
.banner-message {
126+
font-size: 0.875rem;
127+
}
128+
129+
.banner-cta {
130+
font-size: 0.8rem;
131+
padding: 0.35rem 0.75rem;
132+
margin-left: 0.75rem;
133+
}
134+
135+
.banner-content {
136+
padding: 0 0.5rem;
137+
}
138+
139+
.banner-text {
140+
gap: 0.25rem;
141+
}
142+
}
143+
17144
.app {
18145
position: relative;
19146
z-index: 1;
20147
min-height: 100vh;
21148
}
22-
149+
23150
main {
24151
min-height: 100vh;
25152
width: 100%;

src/routes/contact/+page.svelte

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,18 @@
1111
} from 'lucide-svelte';
1212
// Import Discord icon from a custom SVG since it's not in lucide
1313
import { base } from '$app/paths';
14+
import { page } from '$app/stores';
15+
import { onMount } from 'svelte';
1416
1517
let formState: 'idle' | 'submitting' | 'success' | 'error' = $state('idle');
18+
19+
// Reactive to URL changes, works with SSR and client-side navigation
20+
let isDemo = $derived($page.url.searchParams.get('type') === 'demo');
21+
1622
let formData = $state({
1723
name: '',
1824
email: '',
19-
subject: '',
25+
subject: isDemo ? 'Request Demo' : '',
2026
message: ''
2127
});
2228
@@ -56,7 +62,7 @@
5662
<div class="contact-container" in:fade={{ duration: 300 }}>
5763
<div class="container">
5864
<header class="contact-header">
59-
<h1 class="hero-title">Get In Touch</h1>
65+
<h1 class="hero-title">{isDemo ? 'Request Demo' : 'Get In Touch'}</h1>
6066
<p class="hero-subtitle">
6167
Let's discuss your MCP integration <span class="divider">//</span> Questions about Context Engine?
6268
</p>
@@ -132,7 +138,10 @@
132138

133139
<form class="contact-form glass" onsubmit={handleSubmit}>
134140
<div class="form-header">
135-
<h2>Send a Message</h2>
141+
<h2>{isDemo ? 'Request Demo' : 'Send a Message'}</h2>
142+
{#if isDemo}
143+
<p class="demo-subtitle">Let's schedule a personalized demo of Context Engine</p>
144+
{/if}
136145
</div>
137146

138147
<div class="form-group">
@@ -440,6 +449,13 @@
440449
/* Form styling without sticky positioning */
441450
}
442451
452+
.demo-subtitle {
453+
color: var(--text-secondary);
454+
font-size: 1rem;
455+
margin: var(--spacing-xs) 0 0;
456+
font-weight: 400;
457+
}
458+
443459
.discord-icon {
444460
color: #5865f2; /* Discord brand color */
445461
}

0 commit comments

Comments
 (0)