Files
ytplayer/frontend/theme-f7.css

140 lines
5.3 KiB
CSS

/* Framework7 Swipe layout (html[data-layout="f7-swipe"]).
Keeps the classic look; only the Framework7 swipeout / sheet mechanics are
styled here, with the app's own tokens instead of Framework7's stylesheet. */
/* ---- Swipeout rows ---- */
[data-layout="f7-swipe"] .cards li.f7s-row {
list-style: none;
position: relative;
overflow: hidden;
border-radius: 12px;
transform-style: preserve-3d;
touch-action: pan-y;
}
[data-layout="f7-swipe"] .f7s-row > .swipeout-content {
position: relative;
z-index: 10;
background: var(--bg);
transition: background 0.16s, border-color 0.16s;
}
[data-layout="f7-swipe"] .f7s-row.swipeout-active > .swipeout-content,
[data-layout="f7-swipe"] .f7s-row.swipeout-opened > .swipeout-content {
background: var(--bg-2);
border-color: var(--line);
}
[data-layout="f7-swipe"] .f7s-row.swipeout-transitioning > .swipeout-content,
[data-layout="f7-swipe"] .f7s-row.swipeout-transitioning .f7s-act {
transition-duration: 0.3s;
transition-property: transform, left, width, background-color;
transition-timing-function: var(--ease, ease);
}
[data-layout="f7-swipe"] .f7s-row .swipeout-actions-left,
[data-layout="f7-swipe"] .f7s-row .swipeout-actions-right {
position: absolute;
top: 0;
height: 100%;
display: flex;
align-items: center;
gap: 8px;
padding: 0 10px;
direction: ltr;
}
[data-layout="f7-swipe"] .f7s-row .swipeout-actions-left { left: 0; }
[data-layout="f7-swipe"] .f7s-row .swipeout-actions-right { right: 0; }
[data-layout="f7-swipe"] .f7s-act {
position: relative;
left: 0;
transform: scale(0);
border: 1px solid var(--line, transparent);
border-radius: 999px;
padding: 10px 16px;
font: inherit;
font-size: 13px;
font-weight: 600;
color: var(--text);
background: var(--bg-3);
cursor: pointer;
white-space: nowrap;
text-decoration: none;
user-select: none;
}
[data-layout="f7-swipe"] .swipeout-actions-left .f7s-act { background: var(--accent); border-color: var(--accent); color: #fff; }
[data-layout="f7-swipe"] .f7s-act.f7s-danger { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }
[data-layout="f7-swipe"] .f7s-row.swipeout-overswipe-active .f7s-danger { box-shadow: 0 0 0 3px var(--accent-glow); }
/* Swipe replaces the hover-only row buttons on touch screens. */
@media (hover: none) {
[data-layout="f7-swipe"] .f7s-row .card-del { display: none; }
}
/* ---- Up next sheet ---- */
.sheet-backdrop {
position: fixed;
inset: 0;
z-index: 11000;
background: rgba(0, 0, 0, 0.45);
opacity: 0;
visibility: hidden;
pointer-events: none;
transition: opacity 0.3s, visibility 0.3s;
}
.sheet-backdrop.backdrop-in { opacity: 1; visibility: visible; pointer-events: auto; }
.f7s-sheet {
--f7-sheet-transition-duration: 300ms;
position: fixed;
left: 0;
right: 0;
bottom: 0;
z-index: 12500;
display: none;
height: min(85vh, 720px);
overflow: hidden;
box-sizing: border-box;
border-radius: 18px 18px 0 0;
border: 1px solid var(--line, transparent);
border-bottom: 0;
background: var(--bg-1);
color: var(--text);
box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
transform: translate3d(0, 100%, 0);
transition-property: transform;
transition-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
will-change: transform;
padding-bottom: env(safe-area-inset-bottom);
}
.f7s-sheet.modal-in, .f7s-sheet.modal-out { transition-duration: var(--f7-sheet-transition-duration); }
.f7s-sheet.not-animated { transition-duration: 0s; }
.f7s-sheet.modal-in { display: block; transform: translate3d(0, 0, 0); }
.f7s-sheet.modal-in-breakpoint, .f7s-sheet.modal-in-swipe-step {
display: block;
transform: translate3d(0, var(--f7-sheet-breakpoint, var(--f7-sheet-swipe-step, 0)), 0);
}
.f7s-sheet.modal-out { transform: translate3d(0, 100%, 0); }
.f7s-sheet .sheet-modal-inner { height: 100%; display: flex; flex-direction: column; }
.f7s-grab { flex: none; height: 22px; display: grid; place-items: center; cursor: grab; touch-action: none; }
.f7s-grab::before { content: ''; width: 40px; height: 5px; border-radius: 3px; background: var(--text-dim); opacity: 0.6; }
.f7s-sheet-head { flex: none; padding: 0 18px 10px; font-weight: 700; font-size: 15px; touch-action: none; }
.f7s-sheet-list { flex: 1; overflow-y: auto; margin: 0; padding: 0 10px 16px; list-style: none; }
.f7s-up { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 12px; cursor: pointer; }
.f7s-up:active, .f7s-up:hover { background: var(--bg-2); }
.f7s-up img { width: 88px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; flex: none; background: var(--bg-3); }
.f7s-up-info { min-width: 0; }
.f7s-up-title { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.f7s-up-ch { font-size: 12px; color: var(--text-dim); margin-top: 4px; }
.f7s-empty { color: var(--text-dim); padding: 12px 8px; margin: 0; }
/* A grab hint on the mini bar: swipe up for Up next, sideways to skip. */
[data-layout="f7-swipe"] #miniBar { touch-action: none; }
[data-layout="f7-swipe"] #miniBar .mini-bar-inner { position: relative; }
[data-layout="f7-swipe"] #miniBar .mini-bar-inner::before {
content: '';
position: absolute;
top: 3px;
left: 50%;
width: 32px;
height: 4px;
margin-left: -16px;
border-radius: 2px;
background: var(--text-dim);
opacity: 0.5;
}