Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 스타카토 웹 메인 페이지 생성 #576 #577

Merged
merged 8 commits into from
Jan 15, 2025
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
1 change: 1 addition & 0 deletions backend/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ dependencies {
implementation 'software.amazon.awssdk:s3:2.26.21'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'io.micrometer:micrometer-registry-prometheus'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'

compileOnly 'org.projectlombok:lombok'
runtimeOnly 'com.h2database:h2'
Expand Down
13 changes: 13 additions & 0 deletions backend/src/main/java/com/staccato/web/HomeController.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.staccato.web;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

@Controller
public class HomeController {

@GetMapping("/")
public String index() {
return "index";
Copy link
Contributor

Choose a reason for hiding this comment

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

옛날 기억이 새록새록하네요....🙃

Copy link
Contributor

Choose a reason for hiding this comment

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

록새록새..

}
}
90 changes: 90 additions & 0 deletions backend/src/main/resources/static/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
/* Reset and Basic Styling */
body {
margin: 0;
font-family: 'Arial', sans-serif;
color: #ffffff;
line-height: 1.6;
}

h1, h2, p {
margin: 0;
}

/* Features Section */
.features {
display: flex;
flex-direction: column; /* 세로 정렬 */
align-items: center;
gap: 15rem; /* 각 아이템 간의 간격 */
padding: 0;
background-color: #ffffff;
}

.feature {
width: 80%; /* 부모 컨테이너 전체 너비 */
height: auto; /* 화면 높이만큼 채우기 */
position: relative; /* 내부 이미지 정렬을 위한 상대 위치 설정 */
overflow: hidden; /* 넘치는 이미지 잘라내기 */
display: flex; /* 내부 이미지 중앙 정렬 */
align-items: center;
justify-content: center;
}

.feature-start {
width: 100%;
}

.feature-end {
width: 90%;
}

.feature img {
width: 100%; /* 부모 컨테이너의 가로 크기에 맞추기 */
object-fit: contain; /* 비율을 유지하며 잘리지 않도록 설정 */
}

.feature .background-image {
width: 100%;
object-fit: contain;
}

.feature .overlay-image {
position: absolute; /* 부모를 기준으로 절대 위치 */
top: 13%; /* 세로 중앙 정렬 */
left: 65%; /* 가로 중앙 정렬 */
width: 28%; /* 덮어씌울 이미지의 크기 */
object-fit: contain;
}

/* Footer 기본 스타일 */
footer {
text-align: center;
padding: 2rem; /* 기본 패딩 */
background: #E3C7FF;
color: #222222;
font-size: 1.5rem; /* 기본 글씨 크기 */
}

/* 1024px 이하 화면 */
@media (max-width: 1024px) {
footer {
padding: 2rem; /* 패딩 줄이기 */
font-size: 1.25rem; /* 글씨 크기 줄이기 */
}
}

/* 768px 이하 화면 */
@media (max-width: 768px) {
footer {
padding: 1.5rem; /* 더 작은 패딩 */
font-size: 1rem; /* 더 작은 글씨 크기 */
}
}

/* 480px 이하 화면 */
@media (max-width: 480px) {
footer {
padding: 1rem; /* 최소 패딩 */
font-size: 0.875rem; /* 가장 작은 글씨 크기 */
}
}
53 changes: 53 additions & 0 deletions backend/src/main/resources/templates/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Staccato</title>
<!-- AOS CSS -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/aos.css" rel="stylesheet">
<!-- Custom CSS -->
<link rel="stylesheet" href="/index.css">
</head>
<body>

<!-- Features Section -->
<section class="features">
<div class="feature feature-start" data-aos="fade-up">
<img th:src="${'https://image.staccato.kr/web/index/feature-01.png'}" alt="Feature 1">
</div>
<div class="feature" data-aos="fade-up">
<img th:src="${'https://image.staccato.kr/web/index/feature-02.png'}" alt="Feature 2">
</div>
<div class="feature" data-aos="fade-up">
<img th:src="${'https://image.staccato.kr/web/index/feature-03.png'}" alt="Feature 3">
</div>
<div class="feature" data-aos="fade-up">
<img th:src="${'https://image.staccato.kr/web/index/feature-04.png'}" alt="Feature 4">
</div>
<div class="feature" data-aos="fade-up">
<img th:src="${'https://image.staccato.kr/web/index/feature-05.png'}" alt="Feature 5">
</div>
<div class="feature" data-aos="fade-up">
<img th:src="${'https://image.staccato.kr/web/index/feature-06.png'}" alt="Feature 6">
</div>
<div class="feature feature-end" data-aos="fade-up">
<img th:src="${'https://image.staccato.kr/web/index/feature-07.png'}" alt="Feature 7" class="background-image">
<a href="https://play.google.com/store/apps/details?id=com.on.staccato&pcampaignid=web_share" target="_blank">
<img th:src="${'https://image.staccato.kr/web/index/google-play-badge.png'}" alt="Google Play Badge" class="overlay-image">
</a>
</div>
</section>

<!-- Footer -->
<footer>
<p>&copy; 2025 Staccato. All rights reserved.</p>
Copy link
Contributor

Choose a reason for hiding this comment

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

이 부분 뭔가 멋있네요. ㅋㅋㅋㅋ🤣

Copy link
Contributor Author

Choose a reason for hiding this comment

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

footer 국룰 멘트더라구요 따라해봤습니다 ㅋㅋㅋㅋ

</footer>

<!-- AOS JavaScript -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/aos.js"></script>
<script>
AOS.init();
</script>
</body>
</html>
Loading