Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
38 changes: 35 additions & 3 deletions app/style/landing.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import url('https://fonts.googleapis.com/css2?family=Gabarito:wght@400..900&display=swap');

/*could be optimizied*/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how? any reference?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran the file through multiple css validators before pushing and there seem to be redundancies in different classes that lead to the same result in the page, I want to take a closer look at some point and make sure the page stays the same before removing lines

:root {
--ecogreen: #1F3A26;
--eggshell: #FFF8F3;
Expand Down Expand Up @@ -96,7 +96,7 @@ body{
.header_a--github {
display: flex;
align-items: center;
opacity: 0.85;
opacity: .85;
}

.header_a--github svg{
Expand All @@ -108,7 +108,7 @@ body{
display: inline-block;
align-items: center;
gap: 8px;
opacity: 0.85;
opacity: .85;
}

.header_a--linkedin svg{
Expand Down Expand Up @@ -262,6 +262,38 @@ button:active {
border-radius: 40px;
}

.textwithbackground {
display: inline-block;
padding: 2px 15px;
border-radius: 20px;
transition: all 0.5s ease-in-out;
background-size: cover;
background-position: center;
color: var(--ecogreen);
position: relative;
z-index: 1;
min-width: 120px;
text-align: center;
}

.textwithbackground.has-bg{
color: var(--eggshell);
}

.textwithbackground.has-bg::before {
content: '';
position: absolute;
inset: 0;
background: rgba(0, 0, 0, 0.2);
border-radius: 20px;
z-index: -1;
}

.fade-out {
opacity: 0;
transform: translateY(10px);
}

@media only screen and (max-width: 1250px){
.image {
width: 0;
Expand Down
157 changes: 89 additions & 68 deletions app/view/landing.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<!DOCTYPE html>

<html lang="en">

<head>
<meta charset="UTF-8" />
<title>Tidy Together</title>
Expand All @@ -11,92 +9,115 @@

<body>

<div class="text-half">
<header class="header">
<h1 class="header_branding">
<img src="public/logo.png" alt="TidyTogether" class="header_logo">
<span class="header_text">TidyTogether</span>
</h1>
<div class="text-half">
<header class="header">
<h1 class="header_branding">
<img src="public/logo.png" alt="TidyTogether" class="header_logo">
<span class="header_text">TidyTogether</span>
</h1>

<nav class="header_nav">
<ul class="header_ul">
<li class="header_li">
<a href="https://github.com/lefcos/TidyTogether" target="_blank" class="header_a header_a--github">
<?php require 'view/components/svg/githubSvg.php'; ?>
</a></li>
<li class="header_li">
<button id="open">
<span class="header_a header_a--linkedin">
<?php require 'view/components/svg/linkedinSvg.php'; ?>
</span>
</button>
<nav class="header_nav">
<ul class="header_ul">
<li class="header_li">
<a href="https://github.com/lefcos/TidyTogether" target="_blank" class="header_a header_a--github">
<?php require 'view/components/svg/githubSvg.php'; ?>
</a></li>

<div class="modal-container" id = "modal_container">
<div class="linkedin-modal">
<span>Connect with us:</span>
<ul class="linkedin-profiles">
<li class="linkedin-profile">
<a href="https://www.linkedin.com/in/petrubraha/" target="_blank" class="linkedin-link">Brahă Petru</a>
</li>
<li class="linkedin-profile">
<a href="https://www.linkedin.com/in/leftercosmin/" target="_blank" class="linkedin-link">Lefter Cosmin</a>
</li>
</ul>
<li class="header_li">
<button id="open">
<span class="header_a header_a--linkedin">
<?php require 'view/components/svg/linkedinSvg.php'; ?>
</span>
</button>

<div class="modal-container" id = "modal_container">
<div class="linkedin-modal">
<span>Connect with us:</span>
<ul class="linkedin-profiles">
<li class="linkedin-profile">
<a href="https://www.linkedin.com/in/petrubraha/" target="_blank" class="linkedin-link">Brahă Petru</a>
</li>
<li class="linkedin-profile">
<a href="https://www.linkedin.com/in/leftercosmin/" target="_blank" class="linkedin-link">Lefter Cosmin</a>
</li>
</ul>
</div>
</div>
</div>
</li>
</ul>
</nav>
</header>
</li>
</ul>
</nav>
</header>

<main class="landingpage">
<div class="content">
<h1 class="content_title">
Caring for
<span class="textwithbackground"> your city</span><br>
Uniting the community
</h1>
<main class="landingpage">
<div class="content">
<h1 class="content_title">
Caring for
<span id="cityslideshow" class="textwithbackground"> your city</span><br>
Uniting the community
</h1>

<div class="content-bottom">
<div class="description">
<p class="description-line">A web application that helps you find recycling spots</p>
<p class="description-line">and streamlines collaboration between citizens and official waste managers.</p>
<div class="content-bottom">
<div class="description">
<p class="description-line">A web application that helps you find recycling spots</p>
<p class="description-line">and streamlines collaboration between citizens and official waste managers.</p>
</div>
<form method="POST" action="index.php" class="content-buttons">
<button type="submit" name="whatPage" value="Signup" class="body-buttons">Sign up</button>
<button type="submit" name="whatPage" value="Login" class="body-buttons">Log In</button>
</form>
</div>
<form method="POST" action="index.php" class="content-buttons">
<button type="submit" name="whatPage" value="Signup" class="body-buttons">Sign up</button>
<button type="submit" name="whatPage" value="Login" class="body-buttons">Log In</button>
</form>
</div>

</div>
</main>
</div>
</main>
</div>
<div class="image-half">
<img src="public/building.jpg" alt="CITY+GREEN">
</div>

</body>

</html>
<div class="image-half">
<img src="public/building.jpg" alt="CITY+GREEN">
</div>

<script>
//this is for the modal
const open = document.getElementById("open");
const modalcontainer = document.getElementById("modal_container");

open.addEventListener('click', () => {
modalcontainer.classList.toggle('show');
})

// open.addEventListener('click', () => {
// if (open.contains(e.target) && modalcontainer.contains(e.target)) {
// modalcontainer.classList.remove('show');
// }
// })

window.addEventListener('click', (e) => {
if (!open.contains(e.target) && !modalcontainer.contains(e.target)) {
modalcontainer.classList.remove('show');
}
});

</script>
//this is for the slideshow (not optimized but works)
let currentIndex = 0;
const citySlot = document.getElementById('cityslideshow');
const cities = [
{ name: "Iași", img: "https://images.unsplash.com/photo-1699359104149-8a959a1c348c?q=80&w=1170&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D"},
{ name: "Cluj", img: "https://images.unsplash.com/photo-1583751636643-94790958040a?q=80&w=1182&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D"},
{ name: "Bucharest", img: "https://images.unsplash.com/photo-1574616979112-f9f52d3747f8?q=80&w=687&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D"},
{ name: "Timișoara", img: "https://images.unsplash.com/photo-1687696162729-a75f9ddc004d?q=80&w=1170&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D"},
{ name: "Galați", img: "https://images.unsplash.com/photo-1664912879009-fcf1fb932009?q=80&w=1032&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D"}
];

function updateCity() {
citySlot.classList.add('fade-out');
setTimeout(() => {
currentIndex = (currentIndex + 1) % cities.length;
const city = cities[currentIndex];
citySlot.textContent = city.name;
if (city.img) {
citySlot.style.backgroundImage = `url('${city.img}')`;
citySlot.classList.add('has-bg');
} else {
citySlot.style.backgroundImage = 'none';
citySlot.classList.remove('has-bg');
}
citySlot.classList.remove('fade-out');
}, 300);
}
setInterval(updateCity, 4000);
</script>
</body>
</html>