Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
207 changes: 207 additions & 0 deletions src/main/resources/static/css/ads.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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%;
Expand Down Expand Up @@ -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;
}
}
Loading