Skip to content

Commit 7e255df

Browse files
Merge pull request #57 from DevKor-github/develop
운영 서버 배포
2 parents 2b399a9 + 60f3268 commit 7e255df

4 files changed

Lines changed: 354 additions & 147 deletions

File tree

src/main/java/apu/saerok_admin/web/view/ad/AdPlacementGroup.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,16 @@ public boolean hasPlacements() {
1616
}
1717

1818
public String fallbackProbabilityLabel() {
19+
if (!hasPlacements()) {
20+
return "100%";
21+
}
1922
return Math.round(fallbackRatioPercent) + "%";
2023
}
2124

2225
public boolean hasFallbackProbability() {
26+
if (!hasPlacements()) {
27+
return true;
28+
}
2329
return fallbackRatioPercent > 0.0;
2430
}
2531
}

src/main/resources/static/css/ads.css

Lines changed: 207 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,7 @@
412412
border-radius: 999px;
413413
font-size: 0.95rem;
414414
font-weight: 700;
415+
font-variant-numeric: tabular-nums;
415416
transition: transform 0.2s ease, box-shadow 0.2s ease;
416417
}
417418

@@ -452,6 +453,197 @@
452453
box-shadow: 0 14px 28px rgba(59, 130, 246, 0.18);
453454
}
454455

456+
.ads-card-list {
457+
display: flex;
458+
flex-direction: column;
459+
gap: 1rem;
460+
}
461+
462+
.ads-card-list .list-group-item {
463+
border: none;
464+
background: transparent;
465+
}
466+
467+
.ads-card {
468+
border: none;
469+
background: transparent;
470+
}
471+
472+
.ads-card__content {
473+
display: flex;
474+
flex-direction: column;
475+
gap: 1rem;
476+
padding: 1.25rem;
477+
border-radius: 1rem;
478+
border: 1px solid rgba(226, 232, 240, 0.7);
479+
background: #ffffff;
480+
box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
481+
}
482+
483+
.ads-card__header {
484+
display: flex;
485+
gap: 1rem;
486+
align-items: flex-start;
487+
}
488+
489+
.ads-card__thumb {
490+
border-radius: 1rem;
491+
overflow: hidden;
492+
border: 1px solid rgba(148, 163, 184, 0.35);
493+
box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
494+
background: #ffffff;
495+
}
496+
497+
.ads-card__thumb--wide {
498+
width: 120px;
499+
}
500+
501+
.ads-card__thumb--wide .ratio {
502+
width: 100%;
503+
}
504+
505+
.ads-card__thumb--square {
506+
width: 72px;
507+
height: 72px;
508+
display: flex;
509+
}
510+
511+
.ads-card__thumb--square img {
512+
width: 100%;
513+
height: 100%;
514+
object-fit: cover;
515+
}
516+
517+
.ads-card__thumb-placeholder {
518+
display: flex;
519+
align-items: center;
520+
justify-content: center;
521+
background: linear-gradient(135deg, rgba(226, 232, 240, 0.6), rgba(148, 163, 184, 0.3));
522+
border-style: dashed;
523+
border-color: rgba(148, 163, 184, 0.6);
524+
color: #94a3b8;
525+
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
526+
}
527+
528+
.ads-card__thumb--wide.ads-card__thumb-placeholder {
529+
height: 90px;
530+
}
531+
532+
.ads-card__thumb--square.ads-card__thumb-placeholder {
533+
height: 72px;
534+
}
535+
536+
.ads-card__thumb-placeholder i {
537+
font-size: 1.5rem;
538+
}
539+
540+
.ads-card__body {
541+
display: flex;
542+
flex-direction: column;
543+
gap: 0.5rem;
544+
flex: 1 1 auto;
545+
}
546+
547+
.ads-card__meta {
548+
display: flex;
549+
flex-direction: column;
550+
gap: 0.35rem;
551+
}
552+
553+
.ads-card__meta-label,
554+
.ads-card__metric-label {
555+
font-size: 0.75rem;
556+
letter-spacing: 0.06em;
557+
text-transform: uppercase;
558+
color: #64748b;
559+
font-weight: 600;
560+
}
561+
562+
.ads-card__metrics {
563+
display: flex;
564+
flex-direction: column;
565+
gap: 0.75rem;
566+
}
567+
568+
.ads-card__metric {
569+
display: flex;
570+
flex-direction: column;
571+
gap: 0.4rem;
572+
}
573+
574+
.ads-card__metric-value {
575+
display: flex;
576+
align-items: center;
577+
gap: 0.5rem;
578+
}
579+
580+
.ads-card__actions {
581+
display: flex;
582+
flex-wrap: wrap;
583+
gap: 0.5rem;
584+
}
585+
586+
.ads-card__actions .btn {
587+
flex: 1 1 auto;
588+
}
589+
590+
.ads-card__action-form {
591+
flex: 1 1 auto;
592+
}
593+
594+
.ads-card__action-form .btn {
595+
width: 100%;
596+
}
597+
598+
.ads-card--fallback .ads-card__content {
599+
background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(14, 165, 233, 0.06));
600+
border-color: rgba(99, 102, 241, 0.2);
601+
}
602+
603+
@media (min-width: 992px) {
604+
.ads-card__metrics {
605+
display: grid;
606+
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
607+
gap: 0.85rem;
608+
align-items: stretch;
609+
}
610+
611+
.ads-card__metric {
612+
flex-direction: row;
613+
align-items: stretch;
614+
justify-content: space-between;
615+
padding: 0.85rem 1rem;
616+
border-radius: 0.9rem;
617+
background: linear-gradient(135deg, rgba(226, 232, 240, 0.35), rgba(248, 250, 252, 0.4));
618+
box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.18);
619+
gap: 0.75rem;
620+
}
621+
622+
.ads-card__metric-value {
623+
margin-left: auto;
624+
}
625+
626+
.ads-card__metric--probability {
627+
background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(56, 189, 248, 0.18));
628+
box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.26);
629+
}
630+
631+
.ads-card__metric--probability .ads-card__metric-label {
632+
color: #4338ca;
633+
}
634+
635+
.ads-card__metric--probability .ads-card__metric-value {
636+
justify-content: flex-end;
637+
width: 50%;
638+
}
639+
}
640+
641+
@media (max-width: 575.98px) {
642+
.ads-card__thumb--wide {
643+
width: 100px;
644+
}
645+
}
646+
455647
@media (max-width: 991.98px) {
456648
.ads-tabs {
457649
width: 100%;
@@ -481,3 +673,18 @@
481673
width: 100%;
482674
}
483675
}
676+
677+
@media (min-width: 768px) {
678+
.ads-card__actions {
679+
justify-content: flex-end;
680+
}
681+
682+
.ads-card__actions .btn,
683+
.ads-card__action-form {
684+
flex: 0 0 auto;
685+
}
686+
687+
.ads-card__action-form .btn {
688+
width: auto;
689+
}
690+
}

src/main/resources/templates/ads/ad-form.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ <h1 class="h5 mb-0" th:text="${form.id() == null} ? '새 광고 등록' : '광
3939
</div>
4040
<div class="flex-grow-1 w-100">
4141
<input type="file" class="form-control" id="adImageFile" accept="image/*">
42-
<div class="form-text">이미지 선택 시 자동으로 업로드됩니다. 최소 1200x628 이상의 이미지를 권장합니다.</div>
42+
<div class="form-text">이미지 선택 시 자동으로 업로드됩니다.</div>
4343
<div id="adImageUploadStatus" class="ads-upload-status text-muted small mt-2">
4444
<span th:text="${form.hasUploadedImage() || form.hasExistingImage()} ? '이미지가 준비되었습니다.' : '아직 업로드된 이미지가 없습니다.'">이미지를 업로드해주세요.</span>
4545
</div>

0 commit comments

Comments
 (0)