Skip to content
Open
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
105 changes: 105 additions & 0 deletions src/main/resources/templates/Main_Page.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
body {
margin: 0;
padding: 0;
font-family: Arial, sans-serif;
background-color: #F8FAFD;
height: 100vh;
display: flex;
flex-direction: column;
}

.main-container {
display: flex;
justify-content: space-between;
align-items: center;
height: 100%;
padding: 0 50px;
box-sizing: border-box;
}

.left-section {
display: flex;
flex-direction: column;
justify-content: center;
align-items: flex-start;
flex: 1;
padding-left: 50px;
}

.main-image-container {
margin-bottom: 20px;
}

.main-image {
width: 200px;
height: auto;
animation: bounce 1.5s infinite;
}

@keyframes bounce {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-10px); }
}

header #main-title {
font-size: 3rem;
font-weight: bold;
color: #333;
margin-top: 10px;
opacity: 0;
animation: fadeIn 2s forwards;
}

.user-welcome {
font-size: 1.5rem;
color: #555;
margin: 0;
font-weight: bold;
}

@keyframes fadeIn {
from { opacity: 0; transform: scale(0.8); }
to { opacity: 1; transform: scale(1); }
}

.right-section {
display: flex;
justify-content: center;
align-items: center;
flex: 1;
}

.button-container {
display: grid;
grid-template-rows: repeat(4, 1fr);
gap: 30px;
width: 300px;
}

.button-container button {
background-color: #6FD1C5;
color: white;
border: none;
border-radius: 15px;
padding: 28px 33px;
font-size: 1.2rem;
font-weight: bold;
cursor: pointer;
text-align: center;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
transition: all 0.3s ease;
}

.button-container button:hover {
background-color: navajowhite;
transform: scale(1.05);
}

footer p {
font-size: 0.9rem;
color: #666;
position: absolute;
bottom: 10px;
right: 20px;
margin: 0;
}
44 changes: 44 additions & 0 deletions src/main/resources/templates/Main_Page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Time-To-Do Main</title>
<link rel="stylesheet" href="Main_Page.css">
</head>
<body>
<div class="main-container">
<div class="left-section">
<div class="main-image-container">
<img th:src="@{/images/main-image.png}" alt="Time-To-Do Logo" class="main-image">
</div>
<header>
<p id="user-welcome" class="user-welcome">Hi, Guest!</p>
<h1 id="main-title" class="fade-in">Welcome to "Time-To-Do!"</h1>
</header>
</div>

<div class="right-section">
<div class="button-container">
<button th:onclick="|window.location.href='@{/todo}'|">To-Do Mode βœ”οΈ</button>
<button th:onclick="|window.location.href='@{/challenge}'|">Challenge Mode 🎯</button>
<button th:onclick="|window.location.href='@{/calendar}'|">Calendar πŸ“†</button>
<button th:onclick="|window.location.href='@{/performance}'|">Performance Analysis πŸ“Š</button>
</div>
</div>
</div>

<footer>
<p>Developers: Lee Ji Won, Hong Min Ji, Song Seo Ha, Lee So Dam, Lee Ye Eun, Kim Ha Jin</p>
</footer>

<script>
document.addEventListener("DOMContentLoaded", () => {
const user = JSON.parse(localStorage.getItem("user")) || { id: "guest", nickname: "Guest" };

const userWelcomeElement = document.getElementById("user-welcome");
userWelcomeElement.textContent = `Hi, ${user.nickname}!`;
});
</script>
</body>
</html>
5 changes: 5 additions & 0 deletions src/main/resources/templates/Main_Page.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const user = { id: "user123", nickname: "John" };
localStorage.setItem("user", JSON.stringify(user));

const userData = JSON.parse(localStorage.getItem("user"));
console.log(userData.nickname); // "John"