Skip to content

Commit 053cbb7

Browse files
Merge pull request #74 from pirogramming/feat-chan
Feat chan
2 parents dc40c14 + de1221b commit 053cbb7

8 files changed

Lines changed: 264 additions & 150 deletions

File tree

backend-core/staticfiles/missions/css/mission_list.css

Lines changed: 40 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -134,23 +134,59 @@
134134
animation: pulse-pin 2s infinite;
135135
}
136136

137-
/* 미션 마커 (노란색) */
137+
/* 미션 마커 - 색상은 JS(CATEGORY_COLORS)에서 inline style로 주입됨 */
138138
.mission-marker {
139-
background: #FFC107;
140139
z-index: 50;
140+
/* background 는 map_manager.js 의 CATEGORY_COLORS 에서 결정 */
141141
}
142142

143143
.mission-marker:hover {
144144
transform: translate(-50%, -100%) rotate(-45deg) scale(1.1);
145145
z-index: 101;
146146
}
147147

148+
/* 매칭 완료된 미션 마커는 약간 흐리게 처리 */
149+
.mission-marker.status-matched,
150+
.mission-marker.status-completed {
151+
opacity: 0.5;
152+
}
153+
148154
@keyframes pulse-pin {
149155
0% { transform: scale(1); opacity: 0.8; }
150156
100% { transform: scale(2.5); opacity: 0; }
151157
}
152158

153-
/* ==================== 4. 헤더 & 필터 UI ==================== */
159+
/* ==================== 4. 지도 범례 ==================== */
160+
.map-legend {
161+
position: absolute;
162+
left: 12px;
163+
bottom: 12px;
164+
z-index: 10;
165+
background: white;
166+
border-radius: 10px;
167+
padding: 8px 12px;
168+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
169+
font-size: 11px;
170+
color: #374151;
171+
pointer-events: none; /* 지도 클릭 방해 안 하도록 */
172+
}
173+
174+
.map-legend-item {
175+
display: flex;
176+
align-items: center;
177+
gap: 6px;
178+
margin: 3px 0;
179+
line-height: 1;
180+
}
181+
182+
.map-legend-dot {
183+
width: 10px;
184+
height: 10px;
185+
border-radius: 50%;
186+
flex-shrink: 0;
187+
}
188+
189+
/* ==================== 5. 헤더 & 필터 UI ==================== */
154190
.mission-header {
155191
height: 70px;
156192
max-width: 450px;
@@ -205,10 +241,6 @@
205241
}
206242

207243

208-
209-
210-
211-
212244
/* 필터 버튼 활성화 상태 */
213245
.filter-btn {
214246
width: 40px;
@@ -240,7 +272,7 @@
240272
stroke: white;
241273
}
242274

243-
/* ==================== 5. 기타 UI 요소 (툴바, 패널 등) ==================== */
275+
/* ==================== 6. 기타 UI 요소 (툴바, 패널 등) ==================== */
244276
.mission-toolbar {
245277
display: flex;
246278
flex-direction: column;
@@ -430,9 +462,6 @@
430462
}
431463

432464

433-
434-
435-
436465
/* 전체화면 지도 컨테이너 */
437466
#fullscreen-map-container {
438467
position: fixed;

backend-core/staticfiles/missions/js/map_manager.js

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,32 @@
1414
*
1515
* 수정 사항:
1616
* - getUserLocation(): 3단계 폴백 전략
17-
* - 커스텀 마커: CSS 스타일 사용 (파란색 핀/노란색 핀)
17+
* - 커스텀 마커: CSS 스타일 사용 (파란색 핀/카테고리별 색상 핀)
18+
* - CATEGORY_COLORS: 카테고리별 색상 단일 소스 관리
1819
*/
1920

21+
// ==================== 카테고리 색상 단일 소스 ====================
22+
23+
const CATEGORY_COLORS = {
24+
ERRAND: '#3679E3', // 심부름 - 파랑
25+
STUDY: '#27C27B', // 학업 - 초록
26+
RENTAL: '#FFB800', // 대여 - 노랑
27+
RECRUIT: '#8B5CF6', // 구인 - 보라
28+
LIFE: '#FF6B9A', // 생활 - 핑크
29+
OTHER: '#94A3B8', // 기타 - 회색
30+
};
31+
32+
const CATEGORY_LABELS = {
33+
ERRAND: '심부름',
34+
STUDY: '학업',
35+
RENTAL: '대여',
36+
RECRUIT: '구인',
37+
LIFE: '생활',
38+
OTHER: '기타',
39+
};
40+
41+
const CATEGORY_COLOR_DEFAULT = '#94A3B8'; // fallback
42+
2043
class KakaoMapManager {
2144
constructor(containerId, options = {}) {
2245
this.containerId = containerId;
@@ -177,10 +200,10 @@ class KakaoMapManager {
177200
}
178201

179202
/**
180-
* 커스텀 마커 추가 (CSS 스타일 사용 - 노란색 핀)
203+
* 커스텀 마커 추가 (카테고리별 색상 적용)
181204
* @param {number} lat
182205
* @param {number} lng
183-
* @param {object} options { status: 'WAITING'|'MATCHED'|'COMPLETED', onClick: fn }
206+
* @param {object} options { category: 'ERRAND'|'STUDY'|..., status: 'WAITING'|..., onClick: fn }
184207
* @returns {kakao.maps.CustomOverlay}
185208
*/
186209
addCustomMarker(lat, lng, options = {}) {
@@ -191,13 +214,17 @@ class KakaoMapManager {
191214

192215
const position = new kakao.maps.LatLng(lat, lng);
193216

194-
// CSS 마커 DOM 생성
217+
// 카테고리 색상 결정 (단일 소스: CATEGORY_COLORS)
218+
const color = CATEGORY_COLORS[options.category] ?? CATEGORY_COLOR_DEFAULT;
219+
220+
// CSS 마커 DOM 생성 (색상은 inline style로 주입)
195221
const markerEl = document.createElement('div');
196222
markerEl.className = 'mission-marker';
197-
198-
// 상태별 클래스 추가
223+
markerEl.style.background = color;
224+
225+
// 상태별 클래스 추가 (흐리게 처리 등 상태 UI에 활용)
199226
if (options.status) {
200-
markerEl.classList.add(options.status.toLowerCase());
227+
markerEl.classList.add(`status-${options.status.toLowerCase()}`);
201228
}
202229

203230
// CustomOverlay 생성
@@ -404,6 +431,8 @@ function waitForKakaoMaps() {
404431
// ==================== 전역 노출 ====================
405432

406433
window.KakaoMapManager = KakaoMapManager;
434+
window.CATEGORY_COLORS = CATEGORY_COLORS;
435+
window.CATEGORY_LABELS = CATEGORY_LABELS;
407436
window.MapUtils = {
408437
displayUserLocation,
409438
waitForKakaoMaps

backend-core/staticfiles/users/css/homepage_guest.css

Lines changed: 46 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,30 @@ body {
1515
font-family: 'Noto Sans KR', sans-serif;
1616
}
1717

18-
/* 2. 헤더 섹션 (WelcomeScreen 상단 블루 영역) */
18+
/* 2. 헤더 섹션 (상단 연한 블루 영역 수정) */
1919
.header {
20-
background: linear-gradient(180deg, var(--primary-blue) 0%, #6BB6FF 100%);
21-
padding: 60px 20px 60px;
20+
background: #E6F1FF; /* 배경색 수정 */
21+
padding: 60px 20px 80px;
2222
text-align: center;
23-
color: var(--white);
2423
}
2524

26-
.logo-circle {
27-
width: 60px; height: 60px;
28-
background: var(--white); color: var(--primary-blue);
29-
border-radius: 18px; display: flex; align-items: center; justify-content: center;
30-
font-size: 32px; font-weight: 800; margin: 0 auto 16px;
31-
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
25+
/* 실제 로고 이미지 스타일 */
26+
.login-logo {
27+
width: 350px; /* 로고 크기 */
28+
height: auto;
29+
display: block;
30+
margin: 0 auto 12px; /* 가로 중앙 정렬 및 하단 여백 */
3231
}
3332

34-
.brand-name { font-size: 30px; font-weight: 700; margin-bottom: 5px; }
35-
.brand-subtitle { font-size: 14px; opacity: 0.9; }
33+
.brand-subtitle {
34+
width: 350px; /* 로고 너비와 똑같이 맞춰서 기준점을 잡습니다 */
35+
margin: 0 auto; /* 로고와 동일하게 가로 중앙에 배치 */
36+
text-align: center; /* 350px라는 영역 안에서 글자를 중앙으로 정렬 */
37+
font-size: 15px;
38+
font-weight: 500;
39+
color: #4DA6FF;
40+
line-height: 2; /* 글자가 너무 붙어 보이지 않게 약간의 높이 추가 */
41+
}
3642

3743
/* 3. 미션 리스트 섹션 (문구 위치 및 굵기 설정) */
3844
.mission-list-section {
@@ -52,7 +58,7 @@ body {
5258
color: var(--text-black); margin-bottom: 8px;
5359
}
5460

55-
/* 설명 문구: 도움까지, 뒤에 줄바꿈(\A) 및 글자 크기 16px 적용 */
61+
/* 설명 문구 */
5662
.mission-list-section::after {
5763
content: "작은 부탁부터 과제 도움까지,\A학생들이 서로 돕는 미션 플랫폼";
5864
order: -1;
@@ -61,7 +67,7 @@ body {
6167
color: var(--text-gray);
6268
line-height: 1.6;
6369
margin-bottom: 30px;
64-
white-space: pre-wrap; /* \A 줄바꿈 인식을 위해 필수 */
70+
white-space: pre-wrap;
6571
}
6672

6773
.section-title {
@@ -121,35 +127,45 @@ body {
121127
.price { font-size: 18px; font-weight: 700; color: var(--primary-blue); }
122128

123129
/* 5. 하단 버튼 영역 (로그인/회원가입) */
124-
.guest-footer-area { padding: 30px 20px 100px; background: var(--white); }
130+
.guest-footer-area {
131+
padding: 30px 25px 100px; /* 양옆 여백을 20px에서 25px로 변경 */
132+
background: var(--white);
133+
}
125134

126-
/* 안내 문구와 미션 카드 사이 간격 확보 */
127135
.guest-footer-text {
128136
text-align: center;
129137
font-size: 14px;
130138
color: #98A2B3;
131139
margin: 60px 0 20px;
132140
}
133141

134-
/* [수정] 로그인/회원가입 버튼 규격: 로그인 페이지의 .btn-main과 일치시킴 */
135142
.guest-cta {
136-
display: flex; align-items: center; justify-content: center; gap: 10px;
137-
width: calc(100% - 40px);
138-
height: 56px; /* 높이 56px 적용 */
139-
margin: 0 20px 12px;
140-
border-radius: 12px; /* 테두리 반경 12px 적용 */
141-
font-size: 18px; /* 글자 크기 18px 적용 */
142-
font-weight: 700; /* 글자 굵기 700 적용 */
143+
display: flex;
144+
align-items: center;
145+
justify-content: center;
146+
gap: 10px;
147+
148+
/* 핵심 수정 부분: 가로 크기를 100%로 하고 양옆 마진을 0으로 합니다 */
149+
width: 100%;
150+
margin: 0 0 12px 0; /* 위 0, 오른쪽 0, 아래 12px, 왼쪽 0 */
151+
152+
height: 56px;
153+
border-radius: 12px;
154+
font-size: 18px;
155+
font-weight: 700;
143156
text-decoration: none;
144157
box-sizing: border-box;
145158
}
146159

147-
/* 로그인 버튼 색상 */
148-
.guest-cta:nth-of-type(1) { background: var(--primary-blue); color: var(--white); }
160+
/* 첫 번째 버튼 (로그인): 배경색 적용 */
161+
.guest-cta:nth-of-type(1) {
162+
background: #4DA6FF;
163+
color: #ffffff;
164+
}
149165

150-
/* 회원가입 버튼 색상 */
166+
/* 두 번째 버튼 (회원가입): 테두리와 글자색 적용 */
151167
.guest-cta:nth-of-type(2) {
152-
background: var(--white);
153-
color: var(--primary-blue);
154-
border: 1px solid var(--primary-blue);
168+
background: #ffffff;
169+
color: #4DA6FF;
170+
border: 1px solid #4DA6FF;
155171
}

0 commit comments

Comments
 (0)