diff --git a/app/views/landing/index.php b/app/views/landing/index.php index 8bd80432705a5d466d7c5adeea4a0e2869985546..a92e8757db3fd22dbaaa02d2b89b2200d9008309 100644 --- a/app/views/landing/index.php +++ b/app/views/landing/index.php @@ -1,5 +1,6 @@ <?php session_start(); + ?> <!DOCTYPE html> @@ -22,20 +23,27 @@ session_start(); <header> <div class="container"> <div class="logo"> - <img src="../../../public/img/logo.jpg" alt="Logo"> - <h3>Darmodar</h3> </div> <div class="links"> <ul> - <li><a href="#">Home</a></li> - <li><a href="#">About</a></li> - <li><a href="#">Flag</a></li> + <!-- <li><a href="#">Home</a></li> --> + <li><a id="openPopup" href="#">About</a></li> + <!-- <button id="openPopup">Open Popup</button> --> + <div id="popup" class="popup"> + <div class="popup-content"> + <h2 class="close" id="closePopup">×</h2> + <h2>About Us</h2> + <p>At Mahasiswa Leveling, we're on a mission to revolutionize the way you experience fitness. We understand that staying active and healthy can sometimes be a challenge, which is why we've turned it into an exciting adventure.</p> + </div> + </div> + <script src="../../../public/js/landing.js"></script> + <?php // Cek apakah sesi pengguna ada if (isset($_SESSION['username'])) { // Jika sesi username ada, tampilkan username sebagai teks tombol - echo '<li><a href="../dashboard" class = "btn">' . $_SESSION['username'] . '</a></li>'; + echo '<li><a href="../challenge" class = "btn">' . $_SESSION['username'] . '</a></li>'; } else { // Jika sesi username tidak ada, tampilkan tombol Sign In echo '<li><a href="../login/" class="btn">Sign in</a></li>'; @@ -49,22 +57,22 @@ session_start(); <div class="showcase-area"> <div class="container"> <div class="left"> + + + </div> + <div class="right"> + <!-- <img src="../../../public/img/desktop-wallpaper-weightlifting-background-gym-equipment-thumbnail.jpg" alt="Person image" class="person"> --> <div class="big-title"> - <h1>Hello there,</h1> - <h1>here is your flag:</h1> + <h1>Mahasiswa Leveling</h1> + </div> <p class="text"> - CTFITB{l34rn1n9_15_fun_y0u_kn0w?} - + Welcome to the Ultimate Fitness Quest + Join us on a fitness adventure like no other, where challenges and quests await to elevate your exercise experience. </p> - <div class="cta"> + <!-- <div class="cta"> <a href="#" class="btn">Get started</a> - </div> - - </div> - <div class="right"> - <img src="../../../public/img/desktop-wallpaper-weightlifting-background-gym-equipment-thumbnail.jpg" alt="Person image" class="person"> - + </div> --> </div> </div> @@ -74,16 +82,17 @@ session_start(); </div> </div> - <footer> + + <!-- <footer> <div class="container"> <div class="links2"> <ul> <img src="../../../public/img/logo.jpg" alt="Test"> - <a href="#" class="">© 2023 Darmodar. All rights reserved.</a> + <a href="#" class="">© 2023 Mahasiswa. All rights reserved.</a> - <svg class="Icontact" xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 512 512"><!--! Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M96 0C60.7 0 32 28.7 32 64V448c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V64c0-35.3-28.7-64-64-64H96zM208 288h64c44.2 0 80 35.8 80 80c0 8.8-7.2 16-16 16H144c-8.8 0-16-7.2-16-16c0-44.2 35.8-80 80-80zm-32-96a64 64 0 1 1 128 0 64 64 0 1 1 -128 0zM512 80c0-8.8-7.2-16-16-16s-16 7.2-16 16v64c0 8.8 7.2 16 16 16s16-7.2 16-16V80zM496 192c-8.8 0-16 7.2-16 16v64c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16zm16 144c0-8.8-7.2-16-16-16s-16 7.2-16 16v64c0 8.8 7.2 16 16 16s16-7.2 16-16V336z"/></svg> - <a href="#">Contact Us</a> + <svg class="Icontact" xmlns="http://www.w3.org/2000/svg" height="1em" viewBox="0 0 512 512">! Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc.<path d="M96 0C60.7 0 32 28.7 32 64V448c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V64c0-35.3-28.7-64-64-64H96zM208 288h64c44.2 0 80 35.8 80 80c0 8.8-7.2 16-16 16H144c-8.8 0-16-7.2-16-16c0-44.2 35.8-80 80-80zm-32-96a64 64 0 1 1 128 0 64 64 0 1 1 -128 0zM512 80c0-8.8-7.2-16-16-16s-16 7.2-16 16v64c0 8.8 7.2 16 16 16s16-7.2 16-16V80zM496 192c-8.8 0-16 7.2-16 16v64c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16zm16 144c0-8.8-7.2-16-16-16s-16 7.2-16 16v64c0 8.8 7.2 16 16 16s16-7.2 16-16V336z"/></svg> --> + <!-- <a href="#">Contact Us</a> <li><a href="#"></a></li> @@ -95,12 +104,12 @@ session_start(); </div> </div> - </footer> + </footer> --> </div> </main> </body> </html> - <!-- wow you found the 2nd flag :D --> + <!-- wow you found the flag :D --> <!-- <h3> Here is your flag CTFITB{S4n7a1_Du1u_g4k51h}</h3> --> diff --git a/public/css/Hall-of-Fame.css b/public/css/Hall-of-Fame.css index 41e96b82dd4dc6dee6a7344e6d53f3e2a89006a5..a030ca8b908ec8a3cb4f8015c37aee6e925c5511 100644 --- a/public/css/Hall-of-Fame.css +++ b/public/css/Hall-of-Fame.css @@ -99,6 +99,8 @@ table { margin-top: 20px; border: 1px solid #192e3a; border-top: 2px solid crimson; + position: relative; + left: 5%; } tr { diff --git a/public/css/landingPage.css b/public/css/landingPage.css index eae18545dff95a09d4bfe61af7e9a3b19a3159c0..333e141b12855c02593c72f959bd70845ee1034a 100644 --- a/public/css/landingPage.css +++ b/public/css/landingPage.css @@ -37,7 +37,9 @@ a { width: 100%; min-height: 100vh; overflow: hidden; - background-color: var(--backgroundColor); + /* background: linear-gradient(to bottom, #3a1919, #0c1b28); */ + background-image: url('../img/landingPage.jpg'); + background-size: cover; display: flex; flex-direction: column; justify-content: space-between; @@ -58,7 +60,7 @@ header .container{ display: flex; justify-content: space-between; align-items: center; - /* padding-bottom: 2rem; */ + } @@ -109,7 +111,7 @@ header .container{ display: inline-block; padding: 0.9rem 1.9rem; color: #fff !important; - background-color: var(--mainColor); + background-color: crimson; border-radius: 16px; text-transform: capitalize; transition: 0.3s; @@ -131,70 +133,102 @@ header .container{ justify-content: center; } -.person{ - width: 100%; - margin-top: 2rem; - transform: translate(0%, 25px); -} - -.big-title{ - font-size: 1.4rem; - color: var(--lightOne); - text-transform: capitalize; - line-height: 1.4; - -} -.text{ +.text { + height: 290px; color: var(--lightOne); font-size: 1.1rem; margin: 1.9rem 0 2.5rem; - max-width: 600px; + max-width: 500px; line-height: 1.4; + animation: textAnimation 4s linear infinite; Apply animation + z-index: 1; + } + + + @keyframes textAnimation { + 0% { + opacity: 0.3; + } + 50% { + opacity: 0.7; + } + 100% { + opacity: 0.3; + } + } + + .big-title { + font-size: 1.4rem; + color: var(--lightOne); + text-transform: capitalize; + line-height: 1.4; + animation: scaleIn 2s ease-in-out infinite; + } + + + + @keyframes scaleIn { + 0% { + transform: scale(1); + opacity: 0.7; + } + 50% { + transform: scale(1.05); + opacity: 1; + } + 100% { + transform: scale(1); + opacity: 0.7; + } + } + + +.popup { + display: none; + position: fixed; + top: 20%; + left: 50%; + border-radius: 20px; + transform: translate(-50%, -50%); + width: 400px; + height: 200px; + background-color: black; + color: white; + padding: 20px; + box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); + text-align: center; + animation: fadeIn 0.5s ease-in-out; + margin-right: 400px; + } + + @keyframes fadeIn { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } + } + + +.close { + position: absolute; + top: 10px; + right: 10px; + font-size: 20px; + cursor: pointer; } -/* footer */ -footer .container{ - display: flex; - justify-content: space-between; - align-items: center; - margin-top: 10rem; - background-color: var(--darkThree); - height: 80px; -} - -.links2 ul{ - display: flex; - list-style: none; - align-items: center; - -} - -.links2 a{ - position: relative; - color: var(--lightTwo); - margin-right: 4.5rem; - display: inline-block; - transition: 0.3s; - -} - -.links2 img{ - width: 40px; - margin-right: 0.6rem; -} - -.links2 svg{ - margin-right: 0.2rem; - width: 2.25%; - height: 2.25% - - -} - -.links2 a:hover{ - color: var(--mainColor); - transform: scale(1); +@media screen and (max-width: 768px){ + .popup { + position: fixed; + top:90%; + bottom: 0; + z-index: 10001; + background-color: black; + + } } - + diff --git a/public/js/landing.js b/public/js/landing.js new file mode 100644 index 0000000000000000000000000000000000000000..5c2277092ada7c69b283f3fc8c69c4acaade467e --- /dev/null +++ b/public/js/landing.js @@ -0,0 +1,25 @@ +const openPopupButton = document.getElementById("openPopup"); +const closePopupButton = document.getElementById("closePopup"); +const popup = document.getElementById("popup"); +const texts = document.getElementById("text"); + +function openPopup() { + popup.style.display = "block"; + texts.style.display = "none"; + +} + +// Function to close the popup +function closePopup() { + popup.style.display = "none"; + texts.style.display = "block"; +} + +openPopupButton.addEventListener("click", openPopup); +closePopupButton.addEventListener("click", closePopup); + +window.addEventListener("click", (e) => { + if (e.target === popup) { + closePopup(); + } +});