initial commit

This commit is contained in:
2025-08-02 10:49:24 +03:00
committed by jarno
commit 99032bf03c
30 changed files with 4754 additions and 0 deletions

337
frontend/src/pages/Home.css Normal file
View File

@@ -0,0 +1,337 @@
.home {
min-height: 100vh;
display: flex;
flex-direction: column;
}
.main-content {
flex: 1;
}
/* Hero Section */
.hero {
background: linear-gradient(rgba(109, 104, 117, 0.4), rgba(109, 104, 117, 0.4)), url('https://images.unsplash.com/photo-1429305336325-b84ace7eba3b?q=80&w=1770&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D');
background-size: cover;
background-position: center;
background-attachment: fixed;
color: white;
padding: 3rem 0;
text-align: center;
}
.hero-content {
max-width: 1000px;
margin: 0 auto;
padding: 0 2rem;
}
.hero-title {
font-size: 3.5rem;
font-weight: 800;
margin: 0 0 3rem 0;
line-height: 1.2;
}
.highlight {
background: linear-gradient(45deg, var(--color-primary), var(--color-secondary));
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}
/* Search Toolbar in Hero */
.search-toolbar {
background: rgba(255, 255, 255, 0.5);
backdrop-filter: blur(10px);
padding: 1.5rem;
border-radius: 16px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
border: 1px solid rgba(255, 255, 255, 0.2);
}
.toolbar-content {
display: flex;
flex-direction: column;
gap: 1.5rem;
}
/* Search Input Container */
.search-input-container {
display: flex;
gap: 1rem;
max-width: 600px;
margin: 0 auto;
background: white;
border-radius: 50px;
padding: 0.5rem;
box-shadow: 0 8px 32px var(--color-shadow-primary);
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.search-input-container:hover {
transform: translateY(-2px);
box-shadow: 0 12px 40px var(--color-shadow-primary);
}
.search-input {
flex: 1;
border: none;
outline: none;
padding: 1rem 1.5rem;
font-size: 1rem;
border-radius: 25px;
background: transparent;
color: var(--color-text-primary);
}
.search-input::placeholder {
color: var(--color-text-secondary);
opacity: 0.7;
}
.search-button {
background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-dark) 100%);
color: white;
border: none;
padding: 1rem 2rem;
border-radius: 25px;
font-size: 1rem;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
box-shadow: 0 4px 12px var(--color-shadow-secondary);
}
.search-button:hover {
transform: translateY(-2px);
box-shadow: 0 6px 20px var(--color-shadow-secondary);
}
.search-button:focus {
outline: 2px solid var(--color-focus);
outline-offset: 2px;
}
/* Filters Container */
.filters-container {
display: flex;
justify-content: center;
gap: 2rem;
flex-wrap: wrap;
max-width: 800px;
margin: 0 auto;
}
.filter-group {
display: flex;
align-items: center;
}
.filter-label {
display: flex;
align-items: center;
gap: 0.5rem;
cursor: pointer;
padding: 0.5rem 1rem;
background: rgba(255, 255, 255, 0.9);
border-radius: 25px;
transition: all 0.3s ease;
box-shadow: 0 4px 12px rgba(109, 104, 117, 0.1);
}
.filter-label:hover {
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(109, 104, 117, 0.15);
background: white;
}
.filter-checkbox {
width: 18px;
height: 18px;
accent-color: var(--color-secondary);
cursor: pointer;
}
.filter-text {
font-size: 0.9rem;
font-weight: 500;
color: var(--color-text-primary);
white-space: nowrap;
}
.filter-select {
border: none;
outline: none;
background: transparent;
font-size: 0.9rem;
color: var(--color-text-primary);
cursor: pointer;
padding: 0.25rem 0.5rem;
border-radius: 8px;
transition: background-color 0.3s ease;
}
.filter-select:hover {
background: rgba(229, 152, 155, 0.1);
}
.filter-select:focus {
background: rgba(229, 152, 155, 0.2);
}
/* Features Section */
.features {
padding: 5rem 0;
background: white;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 0 2rem;
}
.section-title {
text-align: center;
font-size: 2.5rem;
font-weight: 700;
margin: 0 0 3rem 0;
color: var(--color-text-primary);
}
.features-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
gap: 2rem;
}
/* Responsive Design */
@media (max-width: 768px) {
.hero {
padding: 4rem 0;
}
.hero-title {
font-size: 2.5rem;
}
.hero-subtitle {
font-size: 1.125rem;
}
.hero-buttons {
flex-direction: column;
align-items: center;
}
.toolbar-content {
gap: 1rem;
}
.search-input-container {
flex-direction: column;
border-radius: 16px;
padding: 1rem;
}
.search-input,
.search-button {
border-radius: 12px;
}
.filters-container {
gap: 1rem;
flex-direction: column;
align-items: center;
}
.filter-label {
min-width: 200px;
justify-content: center;
}
.features {
padding: 3rem 0;
}
.section-title {
font-size: 2rem;
}
.features-grid {
grid-template-columns: 1fr;
}
}
@media (max-width: 480px) {
.hero-title {
font-size: 2rem;
}
.hero-subtitle {
font-size: 1rem;
}
.container {
padding: 0 1rem;
}
.search-toolbar {
padding: 1rem;
}
.filter-label {
min-width: 180px;
padding: 0.75rem;
}
}
/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
.search-toolbar {
background: rgba(109, 104, 117, 0.95);
backdrop-filter: blur(10px);
}
.search-input-container {
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(10px);
}
.search-input {
color: var(--color-text-primary-light);
}
.search-input::placeholder {
color: rgba(255, 255, 255, 0.6);
}
.filter-label {
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(10px);
}
.filter-label:hover {
background: rgba(255, 255, 255, 0.15);
}
.filter-text {
color: var(--color-text-primary-light);
}
.filter-select {
color: var(--color-text-primary-light);
}
.filter-select:hover {
background: rgba(255, 255, 255, 0.1);
}
.filter-select:focus {
background: rgba(255, 255, 255, 0.2);
}
.features {
background: var(--color-bg-dark);
}
}

150
frontend/src/pages/Home.jsx Normal file
View File

@@ -0,0 +1,150 @@
import React, { useState } from 'react';
import { Header, Footer, Button, Card } from '../components';
import { useLanguage } from '../contexts/LanguageContext';
import './Home.css';
const Home = () => {
const { t } = useLanguage();
const [searchQuery, setSearchQuery] = useState('');
const [filters, setFilters] = useState({
dogFriendly: false,
accessible: false,
familyFriendly: false,
peopleCount: '',
priceRange: ''
});
const handleGetStarted = () => {
alert('Get Started button clicked!');
};
const handleLearnMore = () => {
alert('Learn More button clicked!');
};
const handleFilterChange = (filterName, value) => {
setFilters(prev => ({
...prev,
[filterName]: value
}));
};
const handleSearch = () => {
// Handle search logic here
console.log('Search query:', searchQuery);
console.log('Filters:', filters);
};
return (
<div className="home">
<Header />
<main className="main-content">
{/* Hero Section */}
<section className="hero">
<div className="hero-content">
{/* Search Toolbar */}
<div className="search-toolbar">
<div className="toolbar-content">
{/* Search Input */}
<div className="search-input-container">
<input
type="text"
className="search-input"
placeholder={t('searchPlaceholder')}
value={searchQuery}
onChange={(e) => setSearchQuery(e.target.value)}
onKeyPress={(e) => e.key === 'Enter' && handleSearch()}
/>
<button className="search-button" onClick={handleSearch}>
{t('searchButton')}
</button>
</div>
{/* Filters */}
<div className="filters-container">
<div className="filter-group">
<label className="filter-label">
<input
type="checkbox"
className="filter-checkbox"
checked={filters.dogFriendly}
onChange={(e) => handleFilterChange('dogFriendly', e.target.checked)}
/>
<span className="filter-text">{t('dogFriendly')}</span>
</label>
</div>
<div className="filter-group">
<label className="filter-label">
<input
type="checkbox"
className="filter-checkbox"
checked={filters.accessible}
onChange={(e) => handleFilterChange('accessible', e.target.checked)}
/>
<span className="filter-text">{t('accessible')}</span>
</label>
</div>
<div className="filter-group">
<label className="filter-label">
<input
type="checkbox"
className="filter-checkbox"
checked={filters.familyFriendly}
onChange={(e) => handleFilterChange('familyFriendly', e.target.checked)}
/>
<span className="filter-text">{t('familyFriendly')}</span>
</label>
</div>
<div className="filter-group">
<label className="filter-label">
<span className="filter-text">{t('peopleCount')}:</span>
<select
className="filter-select"
value={filters.peopleCount}
onChange={(e) => handleFilterChange('peopleCount', e.target.value)}
>
<option value="">{t('any')}</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5+">5+</option>
</select>
</label>
</div>
<div className="filter-group">
<label className="filter-label">
<span className="filter-text">{t('priceRange')}:</span>
<select
className="filter-select"
value={filters.priceRange}
onChange={(e) => handleFilterChange('priceRange', e.target.value)}
>
<option value="">{t('any')}</option>
<option value="€"></option>
<option value="€€"></option>
<option value="€€€"></option>
<option value="€€€€"></option>
</select>
</label>
</div>
</div>
</div>
</div>
</div>
</section>
</main>
<Footer />
</div>
);
};
export default Home;