Merge pull request 'feature/landing-page' (#4) from feature/landing-page into main
Reviewed-on: #4
This commit is contained in:
commit
f8cba9cfcf
12
index.html
12
index.html
@ -1,12 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Document</title>
|
||||
<link rel="stylesheet" href="stylesheet.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
36
javascript.js
Normal file
36
javascript.js
Normal file
@ -0,0 +1,36 @@
|
||||
const prevBtn = document.querySelector('.arrow--prev');
|
||||
const nextBtn = document.querySelector('.arrow--next');
|
||||
const items = Array.from(document.querySelectorAll('.gallery__item'));
|
||||
let activeIndex = 0;
|
||||
|
||||
function updateGallery() {
|
||||
items.forEach((item, i) => {
|
||||
item.style.opacity = i === activeIndex ? '1' : '0.35';
|
||||
item.style.transform = i === activeIndex ? 'scale(1)' : 'scale(0.95)';
|
||||
});
|
||||
}
|
||||
|
||||
function showNext() {
|
||||
activeIndex = (activeIndex + 1) % items.length;
|
||||
updateGallery();
|
||||
}
|
||||
|
||||
function showPrev() {
|
||||
activeIndex = (activeIndex - 1 + items.length) % items.length;
|
||||
updateGallery();
|
||||
}
|
||||
|
||||
nextBtn.addEventListener('click', showNext);
|
||||
prevBtn.addEventListener('click', showPrev);
|
||||
|
||||
// keyboard support
|
||||
document.addEventListener('keydown', (event) => {
|
||||
if (event.key === 'ArrowRight') {
|
||||
showNext();
|
||||
}
|
||||
if (event.key === 'ArrowLeft') {
|
||||
showPrev();
|
||||
}
|
||||
});
|
||||
|
||||
updateGallery();
|
||||
65
landing-page.html
Normal file
65
landing-page.html
Normal file
@ -0,0 +1,65 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Social Cooking Wireframe</title>
|
||||
<link rel="stylesheet" href="stylesheet.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-wrapper">
|
||||
<header class="header">
|
||||
<div class="header__brand">LOGO</div>
|
||||
<nav class="nav">
|
||||
<a class="nav__link" href="#">Event finden</a>
|
||||
</nav>
|
||||
<button class="btn btn--outline" type="button">Login</button>
|
||||
</header>
|
||||
|
||||
<main class="main-content">
|
||||
<section class="hero">
|
||||
<div class="hero__left">
|
||||
<h1 class="hero__title">Zu Tisch mit Fremden – bereit für die nächste kulinarische Begegnung?</h1>
|
||||
<p class="hero__description">Dein Ort um neue Leute kennen zu lernen! Erstelle eigene Events und lade Gäste zu dir nach Hause ein.</p>
|
||||
<button class="btn btn--primary" type="button">Anmelden</button>
|
||||
</div>
|
||||
|
||||
<div class="hero__right">
|
||||
<div class="image-card">
|
||||
<div class="image-card__placeholder"></div>
|
||||
<div class="social-badge">
|
||||
<span class="social-badge__dot"></span>
|
||||
<span class="social-badge__dot"></span>
|
||||
<span class="social-badge__dot"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="gallery">
|
||||
<div class="gallery__controls">
|
||||
<button class="arrow"><</button>
|
||||
<button class="arrow">></button>
|
||||
</div>
|
||||
|
||||
<div class="gallery__track">
|
||||
<article class="gallery__item">
|
||||
<div class="placeholder"></div>
|
||||
</article>
|
||||
<article class="gallery__item">
|
||||
<div class="placeholder"></div>
|
||||
</article>
|
||||
<article class="gallery__item">
|
||||
<div class="placeholder"></div>
|
||||
</article>
|
||||
</div>
|
||||
|
||||
<div class="gallery__info">
|
||||
<div class="profile-badge"></div>
|
||||
<div class="gallery__handle">@social_cooking</div>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
70
stylesheet.css
Normal file
70
stylesheet.css
Normal file
@ -0,0 +1,70 @@
|
||||
* { box-sizing: border-box; }
|
||||
|
||||
:root {
|
||||
--black: #000000;
|
||||
--white: #ffffff;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: 'Inter', sans-serif;
|
||||
background: #f5f5f5; /* Light grey background to see the white page-wrapper */
|
||||
}
|
||||
|
||||
.page-wrapper {
|
||||
max-width: 1440px;
|
||||
margin: 0 auto;
|
||||
background: var(--white);
|
||||
padding: 40px;
|
||||
border: 1px solid var(--black);
|
||||
}
|
||||
|
||||
/* Layout logic */
|
||||
.header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; }
|
||||
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom: 60px; }
|
||||
.gallery__track { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
|
||||
|
||||
/* The "X" Box Logic - IMPORTANT */
|
||||
.image-card__placeholder, .placeholder {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
min-height: 250px; /* Ensures the box has height */
|
||||
position: relative; /* REQUIRED for the X lines to stay inside */
|
||||
border: 1px solid var(--black);
|
||||
background: var(--white);
|
||||
}
|
||||
|
||||
/* Creating the diagonal lines */
|
||||
.image-card__placeholder::before, .image-card__placeholder::after,
|
||||
.placeholder::before, .placeholder::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0; left: 0; right: 0; bottom: 0;
|
||||
}
|
||||
|
||||
.image-card__placeholder::before, .placeholder::before {
|
||||
background: linear-gradient(to top left, transparent 49.5%, var(--black) 49.5%, var(--black) 50.5%, transparent 50.5%);
|
||||
}
|
||||
|
||||
.image-card__placeholder::after, .placeholder::after {
|
||||
background: linear-gradient(to top right, transparent 49.5%, var(--black) 49.5%, var(--black) 50.5%, transparent 50.5%);
|
||||
}
|
||||
|
||||
/* Badges and Buttons */
|
||||
.social-badge {
|
||||
position: absolute;
|
||||
bottom: 10px; right: 10px;
|
||||
background: var(--white);
|
||||
border: 1px solid var(--black);
|
||||
padding: 5px;
|
||||
display: flex; gap: 5px;
|
||||
}
|
||||
|
||||
.social-badge__dot { width: 12px; height: 12px; background: var(--black); border-radius: 50%; }
|
||||
|
||||
.profile-badge {
|
||||
width: 60px; height: 60px;
|
||||
border-radius: 50%;
|
||||
border: 1px solid var(--black);
|
||||
margin-top: 20px;
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user