Rapport-Laravel/resources/views/widgets/milestone_team_leaderboard....

274 lines
6.0 KiB
PHP

<style>
.mlb-card {
background: #f6f2fb;
border: 0;
border-radius: 28px;
box-shadow: 0 10px 30px rgba(90, 60, 140, 0.08);
padding: 22px 22px 16px;
height: 100%;
margin-bottom: 24px;
}
.mlb-card-head { margin-bottom: 8px; }
.mlb-card-title {
font-size: 18px;
font-weight: 700;
color: #1f1f1f;
margin: 0 0 6px;
letter-spacing: -0.02em;
}
.mlb-card-meta {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
flex-wrap: wrap;
}
.mlb-card-date {
color: #8b8b8b;
font-size: 14px;
margin: 0;
}
.mlb-card-date i { margin-right: 6px; }
.mlb-card-details {
color: #7b61c8;
font-weight: 600;
font-size: 13px;
text-decoration: none;
border: 1px solid #eadff8;
background: #fff;
border-radius: 999px;
padding: 6px 14px;
display: inline-block;
line-height: 1.2;
}
.mlb-card-details:hover { color: #5b3fb0; }
.mlb-pills {
display: flex;
justify-content: center;
gap: 10px;
margin: 16px 0 4px;
flex-wrap: wrap;
}
.mlb-pill {
border: 1px solid #ebe4f5;
background: #fff;
color: #6f6f6f;
border-radius: 999px;
padding: 6px 16px;
font-size: 13px;
font-weight: 600;
line-height: 1.2;
text-decoration: none;
display: inline-block;
cursor: pointer;
font-family: inherit;
}
.mlb-pill:hover {
background: #eadff8;
border-color: #eadff8;
color: #2b2b2b;
}
.mlb-pill.is-active {
background: #eadff8;
border-color: #eadff8;
color: #2b2b2b;
}
button.mlb-pill {
appearance: none;
-webkit-appearance: none;
}
.mlb-podium {
min-height: 300px;
display: flex;
align-items: flex-end;
justify-content: center;
}
.mlb-podium-row {
width: 100%;
display: flex;
align-items: flex-end;
justify-content: center;
gap: 12px;
padding: 8px 4px 4px;
}
.mlb-col {
width: 96px;
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
}
.mlb-col.is-first { width: 112px; }
.mlb-col.is-empty .mlb-name,
.mlb-col.is-empty .mlb-bar {
color: #9a9a9a;
}
.mlb-avatar-wrap {
position: relative;
margin-bottom: 10px;
}
.mlb-crown {
position: absolute;
top: -22px;
left: 50%;
transform: translateX(-50%);
z-index: 2;
filter: drop-shadow(0 2px 2px rgba(0,0,0,.15));
}
.mlb-avatar {
width: 62px;
height: 62px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-weight: 800;
font-size: 18px;
overflow: hidden;
background: #eee;
}
.mlb-col.is-first .mlb-avatar {
width: 80px;
height: 80px;
font-size: 24px;
}
.mlb-avatar img {
width: 100%;
height: 100%;
object-fit: cover;
}
.mlb-avatar.rank-1 {
background: #f4e3b8;
color: #222;
box-shadow: 0 10px 24px rgba(243, 211, 74, 0.45);
}
.mlb-avatar.rank-2 {
background: #1d3557;
color: #fff;
box-shadow: 0 10px 24px rgba(29, 53, 87, 0.28);
}
.mlb-avatar.rank-3 {
background: #ff4f9a;
color: #111;
box-shadow: 0 10px 24px rgba(255, 79, 154, 0.28);
}
.mlb-badge {
position: absolute;
left: 50%;
bottom: -8px;
transform: translateX(-50%);
width: 24px;
height: 24px;
border-radius: 50%;
color: #fff;
font-size: 12px;
font-weight: 700;
display: flex;
align-items: center;
justify-content: center;
border: 2px solid #f6f2fb;
}
.mlb-badge.rank-1 { background: #e3b341; }
.mlb-badge.rank-2 { background: #9aa0ad; }
.mlb-badge.rank-3 { background: #e0893a; }
.mlb-name {
font-size: 13px;
font-weight: 600;
color: #4b4b4b;
margin: 6px 0 10px;
min-height: 18px;
max-width: 130px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.mlb-bar {
width: 100%;
border-radius: 14px;
display: flex;
align-items: center;
justify-content: center;
font-size: 22px;
font-weight: 800;
color: #4a4a4a;
box-shadow: 0 12px 18px rgba(0,0,0,.08);
}
.mlb-bar.rank-1 { height: 128px; background: #f3d34a; }
.mlb-bar.rank-2 { height: 92px; background: #d5d8e0; }
.mlb-bar.rank-3 { height: 68px; background: #ff8b3d; }
.mlb-podium-store { display: none; }
.mlb-empty, .mlb-podium-loading {
width: 100%;
text-align: center;
color: #8b8b8b;
padding: 48px 12px;
}
.mlb-dots {
display: flex;
justify-content: center;
gap: 8px;
margin-top: 14px;
}
.mlb-dot {
width: 8px;
height: 8px;
border-radius: 999px;
background: #cbb7ea;
border: 0;
padding: 0;
}
.mlb-dot.is-active {
width: 22px;
background: #9b7ad4;
}
.mlb-dots {
display: flex;
justify-content: center;
gap: 8px;
margin-top: 14px;
}
.mlb-dot {
width: 8px;
height: 8px;
border-radius: 999px;
background: #cbb7ea;
border: 0;
padding: 0;
}
.mlb-dot.is-active {
width: 22px;
background: #9b7ad4;
}
@media (max-width: 575px) {
.mlb-card { padding: 16px 12px 12px; border-radius: 22px; }
.mlb-card-title { font-size: 18px; }
.mlb-col { width: 96px; }
.mlb-col.is-first { width: 112px; }
.mlb-avatar { width: 58px; height: 58px; font-size: 16px; }
.mlb-col.is-first .mlb-avatar { width: 74px; height: 74px; font-size: 20px; }
.mlb-bar { font-size: 20px; border-radius: 10px; }
.mlb-bar.rank-1 { height: 120px; }
.mlb-bar.rank-2 { height: 88px; }
.mlb-bar.rank-3 { height: 64px; }
.mlb-podium-row { gap: 10px; }
}
</style>
<div class="row">
<div class="col-12">
<div class="page-title-box">
<h4 class="page-title">{{ $title }}</h4>
</div>
</div>
</div>
<div class="js-milestone-team-leaderboard"
data-list-url="{{ url('/milestone/dashboardLeaderboards') }}"
id="milestone-leaderboard-{{ $widgetId }}">
<div class="text-center py-4 milestone-leaderboard-loading">
<div class="spinner-border text-primary" role="status">
<span class="visually-hidden">Loading...</span>
</div>
<p class="text-muted mt-2 mb-0">Loading leaderboards...</p>
</div>
</div>