feat: add templated homepage

This commit is contained in:
Cipher Vance 2025-08-27 18:49:27 -05:00
parent 3862c3c3fe
commit 752faff486
2 changed files with 867 additions and 0 deletions

View file

@ -0,0 +1,513 @@
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.homepage {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 50%, #16213e 100%);
color: #ffffff;
overflow-x: hidden;
min-height: 100vh;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 20px;
}
/* Navigation */
.navbar {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 100;
backdrop-filter: blur(20px);
background: rgba(12, 12, 12, 0.8);
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
transition: all 0.3s ease;
}
.nav-content {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem 2rem;
max-width: 1200px;
margin: 0 auto;
}
.logo {
font-size: 1.8rem;
font-weight: 800;
color: #ffffff;
cursor: pointer;
text-decoration: none;
}
.logo-accent {
background: linear-gradient(45deg, #00d4ff, #7c3aed);
background-clip: text;
-webkit-background-clip: text;
color: transparent;
}
.nav-links {
display: flex;
list-style: none;
gap: 2rem;
}
.nav-links a {
color: #ffffff;
text-decoration: none;
font-weight: 500;
transition: all 0.3s ease;
position: relative;
}
.nav-links a:hover {
color: #00d4ff;
}
.nav-links a::after {
content: '';
position: absolute;
bottom: -5px;
left: 0;
width: 0;
height: 2px;
background: linear-gradient(45deg, #00d4ff, #7c3aed);
transition: width 0.3s ease;
}
.nav-links a:hover::after {
width: 100%;
}
/* Hero Section */
.hero {
min-height: 100vh;
display: flex;
align-items: center;
position: relative;
overflow: hidden;
}
.hero-bg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: radial-gradient(circle at 30% 70%, rgba(0, 212, 255, 0.1) 0%, transparent 50%),
radial-gradient(circle at 80% 20%, rgba(124, 58, 237, 0.1) 0%, transparent 50%);
}
.floating-elements {
position: absolute;
width: 100%;
height: 100%;
pointer-events: none;
}
.floating-element {
position: absolute;
width: 4px;
height: 4px;
background: linear-gradient(45deg, #00d4ff, #7c3aed);
border-radius: 50%;
animation: float 6s ease-in-out infinite;
}
@keyframes float {
0%, 100% {
transform: translateY(0px) rotate(0deg);
opacity: 0.5;
}
50% {
transform: translateY(-20px) rotate(180deg);
opacity: 1;
}
}
.hero-container {
max-width: 1200px;
margin: 0 auto;
padding: 0 2rem;
display: grid;
grid-template-columns: 1fr 1fr;
gap: 4rem;
align-items: center;
position: relative;
z-index: 2;
}
.hero-content {
max-width: 600px;
}
.hero-title {
font-size: 3.5rem;
font-weight: 900;
line-height: 1.1;
margin-bottom: 1.5rem;
background: linear-gradient(135deg, #ffffff 0%, #00d4ff 50%, #7c3aed 100%);
background-clip: text;
-webkit-background-clip: text;
color: transparent;
animation: slideInUp 1s ease-out;
}
.hero-subtitle {
font-size: 1.25rem;
color: #a0a0a0;
margin-bottom: 2rem;
line-height: 1.6;
animation: slideInUp 1s ease-out 0.2s both;
}
.cta-section {
animation: slideInUp 1s ease-out 0.4s both;
}
.cta-section h3 {
font-size: 1.5rem;
margin-bottom: 0.5rem;
color: #00d4ff;
}
.cta-section p {
color: #a0a0a0;
margin-bottom: 1.5rem;
}
.email-form {
display: flex;
gap: 1rem;
max-width: 400px;
}
.email-input {
flex: 1;
padding: 1rem;
border: 2px solid rgba(255, 255, 255, 0.1);
border-radius: 12px;
background: rgba(255, 255, 255, 0.05);
color: #ffffff;
font-size: 1rem;
backdrop-filter: blur(10px);
transition: all 0.3s ease;
}
.email-input:focus {
outline: none;
border-color: #00d4ff;
box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}
.email-input::placeholder {
color: #888;
}
.notify-btn {
padding: 1rem 1.5rem;
background: linear-gradient(45deg, #00d4ff, #7c3aed);
color: white;
border: none;
border-radius: 12px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
white-space: nowrap;
}
.notify-btn:hover:not(:disabled) {
transform: translateY(-2px);
box-shadow: 0 10px 30px rgba(0, 212, 255, 0.4);
}
.notify-btn:disabled {
opacity: 0.5;
cursor: not-allowed;
}
/* Phone Mockup */
.hero-visual {
display: flex;
justify-content: center;
align-items: center;
}
.phone-mockup {
width: 280px;
height: 560px;
background: linear-gradient(145deg, #2a2a3e, #1a1a2e);
border-radius: 35px;
padding: 15px;
position: relative;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.phone-mockup::before {
content: '';
position: absolute;
top: 20px;
left: 50%;
transform: translateX(-50%);
width: 120px;
height: 4px;
background: #444;
border-radius: 2px;
}
.screen {
width: 100%;
height: 100%;
background: linear-gradient(135deg, #0c0c0c, #1a1a2e);
border-radius: 25px;
padding: 30px 20px;
position: relative;
overflow: hidden;
}
.app-interface {
height: 100%;
display: flex;
flex-direction: column;
}
.app-logo {
text-align: center;
font-size: 1.5rem;
font-weight: 800;
background: linear-gradient(45deg, #00d4ff, #7c3aed);
background-clip: text;
-webkit-background-clip: text;
color: transparent;
margin-bottom: 2rem;
}
.stats-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 1rem;
flex: 1;
}
.stat-card {
background: rgba(255, 255, 255, 0.05);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 15px;
padding: 1.5rem 1rem;
text-align: center;
transition: all 0.3s ease;
}
.stat-card.active {
background: rgba(0, 212, 255, 0.1);
border-color: rgba(0, 212, 255, 0.3);
transform: scale(1.05);
}
.stat-number {
font-size: 1.8rem;
font-weight: 800;
color: #00d4ff;
margin-bottom: 0.5rem;
}
.stat-label {
font-size: 0.75rem;
color: #888;
font-weight: 600;
letter-spacing: 0.5px;
}
/* Features Section */
.features {
padding: 8rem 0;
position: relative;
}
.section-header {
text-align: center;
margin-bottom: 4rem;
max-width: 800px;
margin-left: auto;
margin-right: auto;
}
.section-title {
font-size: 3rem;
font-weight: 800;
margin-bottom: 1rem;
background: linear-gradient(135deg, #ffffff, #00d4ff);
background-clip: text;
-webkit-background-clip: text;
color: transparent;
}
.section-subtitle {
font-size: 1.2rem;
color: #a0a0a0;
line-height: 1.6;
}
.features-container {
max-width: 1200px;
margin: 0 auto;
padding: 0 2rem;
}
.features-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
gap: 2rem;
}
.feature-card {
background: rgba(255, 255, 255, 0.05);
backdrop-filter: blur(20px);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 20px;
padding: 2.5rem;
transition: all 0.3s ease;
cursor: pointer;
}
.feature-card:hover {
border-color: rgba(0, 212, 255, 0.3);
box-shadow: 0 20px 60px rgba(0, 212, 255, 0.1);
}
.feature-icon {
width: 60px;
height: 60px;
background: linear-gradient(45deg, #00d4ff, #7c3aed);
border-radius: 15px;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 1.5rem;
font-size: 1.5rem;
color: white;
}
.feature-title {
font-size: 1.5rem;
font-weight: 700;
margin-bottom: 1.5rem;
color: #ffffff;
}
.feature-list {
list-style: none;
margin: 0;
padding: 0;
}
.feature-list li {
margin-bottom: 1rem;
color: #a0a0a0;
line-height: 1.6;
}
.feature-list li:last-child {
margin-bottom: 0;
}
.feature-list strong {
color: #00d4ff;
}
/* Stats Section */
.stats {
padding: 6rem 0;
background: rgba(255, 255, 255, 0.03);
backdrop-filter: blur(20px);
}
.stats-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 3rem;
text-align: center;
}
.stat-number {
font-size: 3.5rem;
font-weight: 900;
background: linear-gradient(45deg, #00d4ff, #7c3aed);
background-clip: text;
-webkit-background-clip: text;
color: transparent;
margin-bottom: 0.5rem;
}
.stat-label {
font-size: 1.1rem;
color: #a0a0a0;
font-weight: 500;
}
/* Footer */
.footer {
padding: 4rem 0 2rem;
border-top: 1px solid rgba(255, 255, 255, 0.1);
text-align: center;
}
.footer-content {
color: #a0a0a0;
}
/* Animations */
@keyframes slideInUp {
from {
opacity: 0;
transform: translateY(50px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
/* Responsive */
@media (max-width: 968px) {
.hero-container {
grid-template-columns: 1fr;
text-align: center;
}
.hero-title {
font-size: 2.5rem;
}
.features-grid {
grid-template-columns: 1fr;
}
}
@media (max-width: 768px) {
.nav-links {
display: none;
}
.email-form {
flex-direction: column;
}
.phone-mockup {
width: 240px;
height: 480px;
}
.hero-container {
padding: 0 1rem;
}
}

354
src/components/Home.vue Normal file
View file

@ -0,0 +1,354 @@
<template>
<div class="homepage">
<!-- Navigation -->
<nav class="navbar">
<div class="nav-content">
<div class="logo" @click="scrollTo('hero')">
Ride<span class="logo-accent">Aware</span>
</div>
<ul class="nav-links">
<li><a href="#" @click.prevent="scrollTo('features')">Features</a></li>
<li><a href="/newsletters" @click.prevent="goToNewsletters">Newsletters</a></li>
</ul>
</div>
</nav>
<!-- Hero Section -->
<section id="hero" class="hero">
<div class="hero-bg"></div>
<div class="floating-elements">
<div
v-for="(element, index) in floatingElements"
:key="index"
class="floating-element"
:style="element.style">
</div>
</div>
<div class="hero-container">
<div class="hero-content">
<h1 class="hero-title">{{ heroTitle }}</h1>
<p class="hero-subtitle">{{ heroSubtitle }}</p>
<div class="cta-section">
<h3>Coming soon!</h3>
<p>Join us while waiting for launch</p>
<div class="email-form">
<input
type="email"
class="email-input"
v-model="emailInput"
placeholder="Enter your email address"
required
@keypress.enter="handleNotifyMe">
<button class="notify-btn" @click="handleNotifyMe" :disabled="!isValidEmail">
Notify Me
</button>
</div>
</div>
</div>
<div class="hero-visual">
<div class="phone-mockup">
<div class="screen">
<div class="app-interface">
<div class="app-logo">RideAware</div>
<div class="stats-grid">
<div
v-for="stat in mockupStats"
:key="stat.id"
class="stat-card"
:class="{ 'active': stat.id === activeStat }"
@mouseenter="activeStat = stat.id"
@mouseleave="activeStat = null">
<div class="stat-number">{{ stat.value }}</div>
<div class="stat-label">{{ stat.label }}</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Features Section -->
<section id="features" class="features">
<div class="section-header">
<h2 class="section-title">{{ featuresTitle }}</h2>
<p class="section-subtitle">{{ featuresSubtitle }}</p>
</div>
<div class="features-container">
<div class="features-grid">
<div
v-for="feature in features"
:key="feature.id"
class="feature-card"
@mouseenter="animateCard($event)"
@mouseleave="resetCard($event)">
<div class="feature-icon">
<i :class="feature.icon"></i>
</div>
<h3 class="feature-title">{{ feature.title }}</h3>
<ul class="feature-list">
<li v-for="item in feature.items" :key="item.title">
<strong>{{ item.title }}:</strong> {{ item.description }}
</li>
</ul>
</div>
</div>
</div>
</section>
<!-- Stats Section -->
<section class="stats">
<div class="container">
<div class="stats-grid">
<div v-for="stat in platformStats" :key="stat.id" class="stat-item">
<div class="stat-number">{{ animatedStats[stat.id] || 0 }}{{ stat.suffix }}</div>
<div class="stat-label">{{ stat.label }}</div>
</div>
</div>
</div>
</section>
<!-- Footer -->
<footer class="footer">
<div class="container">
<div class="footer-content">
<p>&copy; {{ currentYear }} RideAware. All rights reserved.</p>
</div>
</div>
</footer>
</div>
</template>
<script>
import { ref, reactive, computed, onMounted } from 'vue'
import '@/assets/css/components/homepage.css';
export default {
name: 'Homepage',
setup() {
const heroTitle = ref("Elevate Your Cycling Journey")
const heroSubtitle = ref("The ultimate smart training platform for cyclists who demand excellence in every ride.")
const featuresTitle = ref("Powerful Features for Every Cyclist")
const featuresSubtitle = ref("From beginners to professionals, RideAware provides comprehensive tools to optimize your training and performance.")
const currentYear = ref(new Date().getFullYear())
const emailInput = ref('')
const activeStat = ref(null)
const isValidEmail = computed(() => {
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/
return emailRegex.test(emailInput.value)
})
const mockupStats = reactive([
{ id: 'speed', value: '24.5', label: 'KM/H AVG' },
{ id: 'time', value: '45', label: 'MINUTES' },
{ id: 'calories', value: '285', label: 'CALORIES' },
{ id: 'distance', value: '18.2', label: 'DISTANCE' }
])
const features = reactive([
{
id: 1,
icon: "fas fa-calendar-alt",
title: "Smart Training Plans",
items: [
{ title: "AI-Powered Planning", description: "Customized training plans based on your goals and fitness level" },
{ title: "Adaptive Scheduling", description: "Smart workout scheduling with automated reminders" },
{ title: "Goal Tracking", description: "Set and monitor your cycling objectives in real-time" }
]
},
{
id: 2,
icon: "fas fa-chart-line",
title: "Advanced Analytics",
items: [
{ title: "Detailed Logging", description: "Track exercises, sets, reps, and performance metrics" },
{ title: "Data Visualization", description: "Interactive charts, graphs, and progress statistics" },
{ title: "Progress Insights", description: "Monitor your improvement over time with AI analysis" }
]
},
{
id: 3,
icon: "fas fa-bicycle",
title: "Virtual Training",
items: [
{ title: "Expert Coaching", description: "Professional guidance to achieve your cycling goals" },
{ title: "Immersive Rides", description: "Virtual training experiences to boost performance" },
{ title: "Structured Workouts", description: "Designed programs for fitness and performance gains" }
]
},
{
id: 4,
icon: "fas fa-heart",
title: "Health & Recovery",
items: [
{ title: "Nutrition Tracking", description: "Plan and monitor your dietary intake for optimal performance" },
{ title: "Recovery Optimization", description: "Tools and resources for effective rest and recovery" },
{ title: "Injury Prevention", description: "Proactive measures to prevent and manage injuries" }
]
},
{
id: 5,
icon: "fas fa-users",
title: "Community & Social",
items: [
{ title: "Social Sharing", description: "Share achievements and progress on social platforms" },
{ title: "Active Community", description: "Connect with fellow cyclists and share experiences" },
{ title: "Competitive Leaderboards", description: "Challenge yourself against the community" }
]
},
{
id: 6,
icon: "fas fa-sync-alt",
title: "Smart Integration",
items: [
{ title: "Wearable Sync", description: "Connect with fitness trackers and smart devices" },
{ title: "Music Integration", description: "Seamlessly sync with your favorite music services" },
{ title: "Data Portability", description: "Easy import/export to other cycling platforms" }
]
}
])
const platformStats = reactive([
{ id: 'users', number: 50000, suffix: '+', label: 'Active Cyclists' },
{ id: 'rides', number: 1000000, suffix: '+', label: 'Rides Tracked' },
{ id: 'distance', number: 25000000, suffix: 'km', label: 'Total Distance' },
{ id: 'rating', number: 4.8, suffix: '/5', label: 'App Rating' }
])
const animatedStats = reactive({})
const floatingElements = reactive([])
// Generate floating elements
const generateFloatingElements = () => {
for (let i = 0; i < 15; i++) {
floatingElements.push({
style: {
left: Math.random() * 100 + '%',
top: Math.random() * 100 + '%',
animationDelay: Math.random() * 6 + 's',
animationDuration: (6 + Math.random() * 4) + 's'
}
})
}
}
// Animate stats on scroll
const animateStats = () => {
platformStats.forEach(stat => {
let current = 0
const increment = stat.number / 100
const timer = setInterval(() => {
current += increment
if (current >= stat.number) {
animatedStats[stat.id] = stat.number
clearInterval(timer)
} else {
animatedStats[stat.id] = Math.floor(current)
}
}, 20)
})
}
const scrollTo = (elementId) => {
const element = document.getElementById(elementId)
if (element) {
element.scrollIntoView({ behavior: 'smooth' })
}
}
const goToNewsletters = () => {
// Handle navigation to newsletters page
// This could be a router push in a real Vue app
window.location.href = '/newsletters'
}
const handleNotifyMe = () => {
if (isValidEmail.value) {
// Here you would typically send the email to your backend
alert(`Thanks! We'll notify you at ${emailInput.value} when RideAware launches.`)
emailInput.value = ''
} else {
alert('Please enter a valid email address.')
}
}
const animateCard = (event) => {
const card = event.currentTarget
card.style.transform = 'translateY(-10px) rotateX(2deg)'
card.style.transition = 'all 0.3s cubic-bezier(0.4, 0, 0.2, 1)'
}
const resetCard = (event) => {
const card = event.currentTarget
card.style.transform = 'translateY(0) rotateX(0)'
}
onMounted(() => {
generateFloatingElements()
// Intersection Observer for stats animation
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
animateStats()
observer.unobserve(entry.target)
}
})
})
const statsSection = document.querySelector('.stats')
if (statsSection) {
observer.observe(statsSection)
}
// Parallax effect for hero background
window.addEventListener('scroll', () => {
const scrolled = window.pageYOffset
const parallax = document.querySelector('.hero-bg')
if (parallax) {
const speed = scrolled * 0.3
parallax.style.transform = `translateY(${speed}px)`
}
})
// Animate mockup stats
let statIndex = 0
setInterval(() => {
activeStat.value = mockupStats[statIndex].id
statIndex = (statIndex + 1) % mockupStats.length
setTimeout(() => {
activeStat.value = null
}, 1000)
}, 3000)
})
return {
heroTitle,
heroSubtitle,
featuresTitle,
featuresSubtitle,
currentYear,
emailInput,
isValidEmail,
activeStat,
mockupStats,
features,
platformStats,
animatedStats,
floatingElements,
scrollTo,
goToNewsletters,
handleNotifyMe,
animateCard,
resetCard
}
}
}
</script>