diff --git a/src/main/java/apu/saerok_admin/web/view/ad/AdPlacementGroup.java b/src/main/java/apu/saerok_admin/web/view/ad/AdPlacementGroup.java index 057ea0f..4c055bc 100644 --- a/src/main/java/apu/saerok_admin/web/view/ad/AdPlacementGroup.java +++ b/src/main/java/apu/saerok_admin/web/view/ad/AdPlacementGroup.java @@ -16,10 +16,16 @@ public boolean hasPlacements() { } public String fallbackProbabilityLabel() { + if (!hasPlacements()) { + return "100%"; + } return Math.round(fallbackRatioPercent) + "%"; } public boolean hasFallbackProbability() { + if (!hasPlacements()) { + return true; + } return fallbackRatioPercent > 0.0; } } diff --git a/src/main/resources/static/css/ads.css b/src/main/resources/static/css/ads.css index 99e1dbd..175524d 100644 --- a/src/main/resources/static/css/ads.css +++ b/src/main/resources/static/css/ads.css @@ -412,6 +412,7 @@ border-radius: 999px; font-size: 0.95rem; font-weight: 700; + font-variant-numeric: tabular-nums; transition: transform 0.2s ease, box-shadow 0.2s ease; } @@ -452,6 +453,197 @@ box-shadow: 0 14px 28px rgba(59, 130, 246, 0.18); } +.ads-card-list { + display: flex; + flex-direction: column; + gap: 1rem; +} + +.ads-card-list .list-group-item { + border: none; + background: transparent; +} + +.ads-card { + border: none; + background: transparent; +} + +.ads-card__content { + display: flex; + flex-direction: column; + gap: 1rem; + padding: 1.25rem; + border-radius: 1rem; + border: 1px solid rgba(226, 232, 240, 0.7); + background: #ffffff; + box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12); +} + +.ads-card__header { + display: flex; + gap: 1rem; + align-items: flex-start; +} + +.ads-card__thumb { + border-radius: 1rem; + overflow: hidden; + border: 1px solid rgba(148, 163, 184, 0.35); + box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1); + background: #ffffff; +} + +.ads-card__thumb--wide { + width: 120px; +} + +.ads-card__thumb--wide .ratio { + width: 100%; +} + +.ads-card__thumb--square { + width: 72px; + height: 72px; + display: flex; +} + +.ads-card__thumb--square img { + width: 100%; + height: 100%; + object-fit: cover; +} + +.ads-card__thumb-placeholder { + display: flex; + align-items: center; + justify-content: center; + background: linear-gradient(135deg, rgba(226, 232, 240, 0.6), rgba(148, 163, 184, 0.3)); + border-style: dashed; + border-color: rgba(148, 163, 184, 0.6); + color: #94a3b8; + box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4); +} + +.ads-card__thumb--wide.ads-card__thumb-placeholder { + height: 90px; +} + +.ads-card__thumb--square.ads-card__thumb-placeholder { + height: 72px; +} + +.ads-card__thumb-placeholder i { + font-size: 1.5rem; +} + +.ads-card__body { + display: flex; + flex-direction: column; + gap: 0.5rem; + flex: 1 1 auto; +} + +.ads-card__meta { + display: flex; + flex-direction: column; + gap: 0.35rem; +} + +.ads-card__meta-label, +.ads-card__metric-label { + font-size: 0.75rem; + letter-spacing: 0.06em; + text-transform: uppercase; + color: #64748b; + font-weight: 600; +} + +.ads-card__metrics { + display: flex; + flex-direction: column; + gap: 0.75rem; +} + +.ads-card__metric { + display: flex; + flex-direction: column; + gap: 0.4rem; +} + +.ads-card__metric-value { + display: flex; + align-items: center; + gap: 0.5rem; +} + +.ads-card__actions { + display: flex; + flex-wrap: wrap; + gap: 0.5rem; +} + +.ads-card__actions .btn { + flex: 1 1 auto; +} + +.ads-card__action-form { + flex: 1 1 auto; +} + +.ads-card__action-form .btn { + width: 100%; +} + +.ads-card--fallback .ads-card__content { + background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(14, 165, 233, 0.06)); + border-color: rgba(99, 102, 241, 0.2); +} + +@media (min-width: 992px) { + .ads-card__metrics { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); + gap: 0.85rem; + align-items: stretch; + } + + .ads-card__metric { + flex-direction: row; + align-items: stretch; + justify-content: space-between; + padding: 0.85rem 1rem; + border-radius: 0.9rem; + background: linear-gradient(135deg, rgba(226, 232, 240, 0.35), rgba(248, 250, 252, 0.4)); + box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.18); + gap: 0.75rem; + } + + .ads-card__metric-value { + margin-left: auto; + } + + .ads-card__metric--probability { + background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(56, 189, 248, 0.18)); + box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.26); + } + + .ads-card__metric--probability .ads-card__metric-label { + color: #4338ca; + } + + .ads-card__metric--probability .ads-card__metric-value { + justify-content: flex-end; + width: 50%; + } +} + +@media (max-width: 575.98px) { + .ads-card__thumb--wide { + width: 100px; + } +} + @media (max-width: 991.98px) { .ads-tabs { width: 100%; @@ -481,3 +673,18 @@ width: 100%; } } + +@media (min-width: 768px) { + .ads-card__actions { + justify-content: flex-end; + } + + .ads-card__actions .btn, + .ads-card__action-form { + flex: 0 0 auto; + } + + .ads-card__action-form .btn { + width: auto; + } +} diff --git a/src/main/resources/templates/ads/ad-form.html b/src/main/resources/templates/ads/ad-form.html index 757c998..22c739c 100644 --- a/src/main/resources/templates/ads/ad-form.html +++ b/src/main/resources/templates/ads/ad-form.html @@ -39,7 +39,7 @@

-
이미지 선택 시 자동으로 업로드됩니다. 최소 1200x628 이상의 이미지를 권장합니다.
+
이미지 선택 시 자동으로 업로드됩니다.
이미지를 업로드해주세요.
diff --git a/src/main/resources/templates/ads/list.html b/src/main/resources/templates/ads/list.html index b4a9e07..e45fbfc 100644 --- a/src/main/resources/templates/ads/list.html +++ b/src/main/resources/templates/ads/list.html @@ -74,59 +74,54 @@

광고 목록

-
- - - - - - - - - - - - - - - - - - - - - - -
광고 이미지광고 이름이동할 링크(URL)메모
- 등록된 광고가 없습니다. -
-
- 광고 이미지 +
+
+ 등록된 광고가 없습니다. +
+
+
+
+
+
+ 광고 이미지 +
-
-
광고 이름 +
+
광고 이름
+
광고 이름
+
+ +
+
이동할 링크 (URL)
https://example.com -
메모 -
- 수정 -
- - -
-
-
+
+
+
메모
+
메모
+
+
+ 수정 +
+ + +
+
+ + @@ -185,114 +180,113 @@

HOME_TOP

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
광고진행 기간우선순위광고가 뜰 확률진행 상태
-
-
- -
-
-
기본 광고 (Kakao AdFit)
-
광고가 없을 때 표시되는 기본 콘텐츠입니다.
+
+
+
+
+
+ +
+
+
기본 광고 (Kakao AdFit)
+
광고가 없을 때 표시되는 기본 콘텐츠입니다.
+
+
+
+
+
광고가 뜰 확률
+
+ 50%
-
-- - 50% - - -
- +
+
+ +
+ + +
+ 등록된 스케줄이 없습니다. +
+
+
+
+
+ 광고 미리보기
-
- 등록된 스케줄이 없습니다. -
-
-
- 광고 미리보기 +
+ +
+
+
광고
+
광고 이름
+
+
+
+
+
진행 상태
+
+ 진행 중 +
+
+
+
우선순위
+
+ 매우 낮음
-
- +
+
+
광고가 뜰 확률
+
+ 0%
-
광고 이름
-
+ +
+
진행 기간
2025.01.01 ~ 2025.01.31
-
- 매우 낮음 - - 0% - - 진행 중 - -
-
- - - -
- 수정 -
- - -
-
-
+
+
+
+ + + +
+ 수정 +
+ + +
+
+ +