Skip to content

Commit

Permalink
feat: 스타카토 웹 메인 페이지 생성 #576 (#577)
Browse files Browse the repository at this point in the history
* build: thymeleaf 의존성 추가

* feat: index 페이지 생성

* refactor: GetMapping 경로에서 index 삭제

* refactor: 마지막 사진 홍보용 사진으로 변경

* refactor: 첫번째 사진 삭제

* refactor: 이미지 정리

* refactor: 사진 S3로 이동

* refactor: 사진 간격 수정
  • Loading branch information
BurningFalls authored Jan 15, 2025
1 parent b0bceed commit 180ac94
Show file tree
Hide file tree
Showing 4 changed files with 157 additions and 0 deletions.
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";
}
}
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>
</footer>

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

0 comments on commit 180ac94

Please sign in to comment.