From ebe88002e4c07028c69bdcc768a4938fca8e6ac3 Mon Sep 17 00:00:00 2001 From: Aditya Gupta Date: Mon, 21 Oct 2024 18:23:03 +0530 Subject: [PATCH] add new html page for planting a tree and add more images for goals sections --- assets/css/style.css | 5 +- index.html | 54 ++++++++++++++++- planttree.html | 135 +++++++++++++++++++++++++++++++++++++++++++ scripts/index.js | 47 +++++++++------ 4 files changed, 219 insertions(+), 22 deletions(-) create mode 100644 planttree.html diff --git a/assets/css/style.css b/assets/css/style.css index 5a4e914..6bfba8d 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -493,7 +493,7 @@ nav .nav_buttons { .Goals { width: 80vw; margin: 0px auto; - margin-bottom: 2em; + margin-bottom: 10px; display: flex; flex-wrap: wrap; justify-content: center; @@ -526,7 +526,7 @@ nav .nav_buttons { flex-direction: column; justify-content: center; max-width: 300px; - margin: 5px 10px; + margin-top: 30px; padding: 10px 5px; gap: 4%; font-size: 14px; @@ -536,6 +536,7 @@ nav .nav_buttons { .Goals .images:hover { box-shadow: 0px 4px 5px rgba(24, 186, 12, 0.377); transform: scale(1.05); + cursor: pointer; } .Goals .images img { diff --git a/index.html b/index.html index 699aaf8..08fc645 100644 --- a/index.html +++ b/index.html @@ -105,7 +105,7 @@
-
+
+ SingaporeSingapore +
+
+ ChinaChina +
Malaysia
+
+ AustraliaAustralia +
+
+
+ +
+ AFFORESTATION

Afforestation is the development of forest by planting trees on waste land. The main objective of afforestation is to control deforestation and prevent soil erosion. +
+
+
+ +
+ HEALTH BENEFITS

Trees + can improve physical and mental health, reduce stress, and encourage outdoor activities. +
+
+
+ +
+ SOCIAL AND ECONOMIC BENEFITS

Trees can reduce crime rates, + strengthen community ties, and increase physical activity. + They can also raise house prices and reduce green-space maintenance costs. +
+
diff --git a/planttree.html b/planttree.html new file mode 100644 index 0000000..577abe8 --- /dev/null +++ b/planttree.html @@ -0,0 +1,135 @@ + + + + + + Plant a tree + + + + + + + + + diff --git a/scripts/index.js b/scripts/index.js index 13200d5..ce51ec6 100644 --- a/scripts/index.js +++ b/scripts/index.js @@ -1,4 +1,5 @@ - const showPopupButtons = document.querySelectorAll(".showPopupButton"); + // const showPopupButtons = document.querySelectorAll(".showPopupButton"); + const plant= document.getElementById('plant'); const closePopupButton = document.querySelector(".closePopupButton"); const popup = document.querySelector(".popup"); const overlay = document.getElementById("overlay"); @@ -6,25 +7,31 @@ // popup.style.display = "block"; // overlay.style.display = "block"; // }); - showPopupButtons.forEach((button) => { - button.addEventListener("click", function () { - // Determine which button was clicked and show the popup accordingly - const trigger = button.getAttribute("data-popup-trigger"); - if ( - trigger === "donate" || - trigger === "cover-page" || - trigger === "navbar" - ) { - popup.style.display = "block"; - overlay.style.display = "block"; - } - }); - }); + // showPopupButtons.forEach((button) => { + // button.addEventListener("click", function () { + // // Determine which button was clicked and show the popup accordingly + // const trigger = button.getAttribute("data-popup-trigger"); + // if ( + // trigger === "donate" || + // trigger === "cover-page" || + // trigger === "navbar" + // ) { + // popup.style.display = "block"; + // overlay.style.display = "block"; + // } + // }); + // }); - closePopupButton.addEventListener("click", function () { - popup.style.display = "none"; - overlay.style.display = "none"; - }); + // closePopupButton.addEventListener("click", function () { + // popup.style.display = "none"; + // overlay.style.display = "none"; + // }); + + + + plant.addEventListener("click",function(){ + window.location.href="/Tree2Hope/planttree.html"; + }) document.getElementById("openMenu").addEventListener("click", function () { @@ -91,3 +98,5 @@ window.addEventListener('scroll', handleScroll); + +