Skip to content
Snippets Groups Projects
Commit 4768f20a authored by Muhammad Haidar Akita Tresnadi's avatar Muhammad Haidar Akita Tresnadi
Browse files

Merge branch 'Haidar' into 'main'

feat: edit landing page design

See merge request if3110-2023-01-j/if-3110-2023-01-j!52
parents 7a7c31d8 e0703358
Branches
Tags
No related merge requests found
<?php <?php
session_start(); session_start();
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
...@@ -22,20 +23,27 @@ session_start(); ...@@ -22,20 +23,27 @@ session_start();
<header> <header>
<div class="container"> <div class="container">
<div class="logo"> <div class="logo">
<img src="../../../public/img/logo.jpg" alt="Logo">
<h3>Darmodar</h3>
</div> </div>
<div class="links"> <div class="links">
<ul> <ul>
<li><a href="#">Home</a></li> <!-- <li><a href="#">Home</a></li> -->
<li><a href="#">About</a></li> <li><a id="openPopup" href="#">About</a></li>
<li><a href="#">Flag</a></li> <!-- <button id="openPopup">Open Popup</button> -->
<div id="popup" class="popup">
<div class="popup-content">
<h2 class="close" id="closePopup">&times;</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 <?php
// Cek apakah sesi pengguna ada // Cek apakah sesi pengguna ada
if (isset($_SESSION['username'])) { if (isset($_SESSION['username'])) {
// Jika sesi username ada, tampilkan username sebagai teks tombol // 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 { } else {
// Jika sesi username tidak ada, tampilkan tombol Sign In // Jika sesi username tidak ada, tampilkan tombol Sign In
echo '<li><a href="../login/" class="btn">Sign in</a></li>'; echo '<li><a href="../login/" class="btn">Sign in</a></li>';
...@@ -49,22 +57,22 @@ session_start(); ...@@ -49,22 +57,22 @@ session_start();
<div class="showcase-area"> <div class="showcase-area">
<div class="container"> <div class="container">
<div class="left"> <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"> <div class="big-title">
<h1>Hello there,</h1> <h1>Mahasiswa Leveling</h1>
<h1>here is your flag:</h1>
</div> </div>
<p class="text"> <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> </p>
<div class="cta"> <!-- <div class="cta">
<a href="#" class="btn">Get started</a> <a href="#" class="btn">Get started</a>
</div> </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> </div>
...@@ -74,16 +82,17 @@ session_start(); ...@@ -74,16 +82,17 @@ session_start();
</div> </div>
</div> </div>
<footer>
<!-- <footer>
<div class="container"> <div class="container">
<div class="links2"> <div class="links2">
<ul> <ul>
<img src="../../../public/img/logo.jpg" alt="Test"> <img src="../../../public/img/logo.jpg" alt="Test">
<a href="#" class="">&copy; 2023 Darmodar. All rights reserved.</a> <a href="#" class="">&copy; 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> <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> <!-- <a href="#">Contact Us</a>
<li><a href="#"></a></li> <li><a href="#"></a></li>
...@@ -95,12 +104,12 @@ session_start(); ...@@ -95,12 +104,12 @@ session_start();
</div> </div>
</div> </div>
</footer> </footer> -->
</div> </div>
</main> </main>
</body> </body>
</html> </html>
<!-- wow you found the 2nd flag :D --> <!-- wow you found the flag :D -->
<!-- <h3> Here is your flag CTFITB{S4n7a1_Du1u_g4k51h}</h3> --> <!-- <h3> Here is your flag CTFITB{S4n7a1_Du1u_g4k51h}</h3> -->
...@@ -99,6 +99,8 @@ table { ...@@ -99,6 +99,8 @@ table {
margin-top: 20px; margin-top: 20px;
border: 1px solid #192e3a; border: 1px solid #192e3a;
border-top: 2px solid crimson; border-top: 2px solid crimson;
position: relative;
left: 5%;
} }
tr { tr {
......
...@@ -37,7 +37,9 @@ a { ...@@ -37,7 +37,9 @@ a {
width: 100%; width: 100%;
min-height: 100vh; min-height: 100vh;
overflow: hidden; overflow: hidden;
background-color: var(--backgroundColor); /* background: linear-gradient(to bottom, #3a1919, #0c1b28); */
background-image: url('../img/landingPage.jpg');
background-size: cover;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
...@@ -58,7 +60,7 @@ header .container{ ...@@ -58,7 +60,7 @@ header .container{
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
/* padding-bottom: 2rem; */
} }
...@@ -109,7 +111,7 @@ header .container{ ...@@ -109,7 +111,7 @@ header .container{
display: inline-block; display: inline-block;
padding: 0.9rem 1.9rem; padding: 0.9rem 1.9rem;
color: #fff !important; color: #fff !important;
background-color: var(--mainColor); background-color: crimson;
border-radius: 16px; border-radius: 16px;
text-transform: capitalize; text-transform: capitalize;
transition: 0.3s; transition: 0.3s;
...@@ -131,70 +133,102 @@ header .container{ ...@@ -131,70 +133,102 @@ header .container{
justify-content: center; justify-content: center;
} }
.person{ .text {
width: 100%; height: 290px;
margin-top: 2rem;
transform: translate(0%, 25px);
}
.big-title{
font-size: 1.4rem;
color: var(--lightOne);
text-transform: capitalize;
line-height: 1.4;
}
.text{
color: var(--lightOne); color: var(--lightOne);
font-size: 1.1rem; font-size: 1.1rem;
margin: 1.9rem 0 2.5rem; margin: 1.9rem 0 2.5rem;
max-width: 600px; max-width: 500px;
line-height: 1.4; 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 */ @media screen and (max-width: 768px){
footer .container{ .popup {
display: flex; position: fixed;
justify-content: space-between; top:90%;
align-items: center; bottom: 0;
margin-top: 10rem; z-index: 10001;
background-color: var(--darkThree); background-color: black;
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);
} }
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();
}
});
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment