Restyle the Framework7 layout
This commit is contained in:
@@ -69,6 +69,7 @@ html[data-layout="f7-swipe"] .f7s-row.swipeout-transitioning .f7s-act {
|
||||
transition-duration: .3s; transition-property: transform, left, width, background-color;
|
||||
transition-timing-function: var(--ease, ease);
|
||||
}
|
||||
html[data-layout="f7-swipe"] .f7s-row.f7s-touch-open > .swipeout-content { transition: transform .24s var(--ease, ease); }
|
||||
html[data-layout="f7-swipe"] .f7s-row .swipeout-actions-left,
|
||||
html[data-layout="f7-swipe"] .f7s-row .swipeout-actions-right {
|
||||
position: absolute; top: 0; height: 100%; display: flex; align-items: center;
|
||||
@@ -109,7 +110,7 @@ html[data-layout="f7-swipe"] .bottom-nav-btn.active {
|
||||
html[data-layout="f7-swipe"] .bottom-nav-btn.active .bottom-nav-icon { transform: none; }
|
||||
|
||||
/* The mini-player reads as a floating sheet above the tab bar. */
|
||||
html[data-layout="f7-swipe"] .mini-bar {
|
||||
html[data-layout="f7-swipe"] #miniBar {
|
||||
left: 10px; right: 10px; bottom: calc(64px + env(safe-area-inset-bottom) + 8px);
|
||||
overflow: hidden; border: 1px solid var(--f7-hairline); border-radius: 16px;
|
||||
background: var(--f7-glass); box-shadow: 0 8px 28px rgb(0 0 0 / .18);
|
||||
@@ -170,3 +171,174 @@ html[data-layout="f7-swipe"] #miniBar .mini-bar-inner::before {
|
||||
html[data-layout="f7-swipe"] .bottom-nav { display: flex; height: calc(64px + env(safe-area-inset-bottom)); }
|
||||
html[data-layout="f7-swipe"] .bottom-nav-btn { min-height: 64px; }
|
||||
}
|
||||
|
||||
/* Full Framework7 v9 iOS surface. */
|
||||
html[data-layout="f7-swipe"] {
|
||||
--f7-glass: color-mix(in srgb, var(--bg-1) 86%, transparent);
|
||||
--f7-hairline: color-mix(in srgb, var(--line) 70%, transparent);
|
||||
--f7-inset: color-mix(in srgb, var(--bg-1) 84%, var(--bg) 16%);
|
||||
font-family: var(--ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif);
|
||||
color-scheme: dark;
|
||||
}
|
||||
html[data-layout="f7-swipe"][data-theme="light"] { color-scheme: light; }
|
||||
html[data-layout="f7-swipe"][data-theme="contrast"] { color-scheme: dark; }
|
||||
html[data-layout="f7-swipe"] body { background: var(--bg); }
|
||||
html[data-layout="f7-swipe"] body::before,
|
||||
html[data-layout="f7-swipe"] body::after { display: none; }
|
||||
html[data-layout="f7-swipe"] :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
|
||||
html[data-layout="f7-swipe"] ::selection { color: var(--text); background: color-mix(in srgb, var(--accent) 42%, transparent); }
|
||||
html[data-layout="f7-swipe"] ::-webkit-scrollbar-thumb { background: var(--line); background-clip: content-box; }
|
||||
|
||||
/* Navigation/search navbar */
|
||||
html[data-layout="f7-swipe"] .topbar {
|
||||
position: relative; z-index: 20; min-height: 64px; padding: 9px 16px;
|
||||
background: var(--f7-glass); border-bottom: 1px solid var(--f7-hairline);
|
||||
-webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
|
||||
}
|
||||
html[data-layout="f7-swipe"] .sidebar-toggle,
|
||||
html[data-layout="f7-swipe"] .topbar button:not(.search-btn) { border: 0; background: transparent; box-shadow: none; color: var(--accent); }
|
||||
html[data-layout="f7-swipe"] .search-form { position: relative; gap: 8px; }
|
||||
html[data-layout="f7-swipe"] #searchInput {
|
||||
min-height: 42px; padding: 0 14px 0 38px; border: 0; border-radius: 12px;
|
||||
background: color-mix(in srgb, var(--bg-2) 92%, transparent); color: var(--text);
|
||||
box-shadow: none; font: 400 17px/1.25 var(--ui, system-ui, sans-serif);
|
||||
}
|
||||
html[data-layout="f7-swipe"] .search-form::before { content: ''; position: absolute; left: 13px; top: 12px; z-index: 1; width: 18px; height: 18px; background: var(--text-dim); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='m16 16 5 5' stroke='black' stroke-width='2'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='m16 16 5 5' stroke='black' stroke-width='2'/%3E%3C/svg%3E") center/contain no-repeat; pointer-events: none; }
|
||||
html[data-layout="f7-swipe"] .search-btn { min-height: 42px; padding: 0 8px; border: 0; background: transparent; color: var(--accent); font-size: 16px; font-weight: 500; box-shadow: none; }
|
||||
html[data-layout="f7-swipe"] #updateIconBtn { width: 40px; height: 40px; }
|
||||
html[data-layout="f7-swipe"] .search-recent { top: calc(100% + 8px); border: 1px solid var(--f7-hairline); border-radius: 14px; background: var(--bg-1); box-shadow: 0 12px 36px rgb(0 0 0 / .22); overflow: hidden; }
|
||||
html[data-layout="f7-swipe"] .search-recent > * { border-radius: 0; border: 0; border-bottom: 1px solid var(--f7-hairline); background: transparent; min-height: 48px; }
|
||||
|
||||
/* Sidebar panel and grouped destinations */
|
||||
html[data-layout="f7-swipe"] #sidebar { background: var(--bg-1); border-right: 1px solid var(--f7-hairline); padding: 24px 12px max(16px, env(safe-area-inset-bottom)); }
|
||||
html[data-layout="f7-swipe"] #sidebar .brand { font: 700 22px/1.2 var(--ui, system-ui, sans-serif); padding: 4px 12px 24px; }
|
||||
html[data-layout="f7-swipe"] #sidebar .sidebar-section-title,
|
||||
html[data-layout="f7-swipe"] #sidebar .pl-header,
|
||||
html[data-layout="f7-swipe"] #sidebar h2,
|
||||
html[data-layout="f7-swipe"] #sidebar h3 { color: var(--text-dim); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
|
||||
html[data-layout="f7-swipe"] #sidebar .nav-item,
|
||||
html[data-layout="f7-swipe"] #sidebar .sidebar-nav button,
|
||||
html[data-layout="f7-swipe"] #playlistList > *, html[data-layout="f7-swipe"] #smartPlaylistList > * {
|
||||
min-height: 48px; border: 0; border-radius: 10px; background: transparent; box-shadow: none;
|
||||
}
|
||||
html[data-layout="f7-swipe"] #sidebar .nav-item.active,
|
||||
html[data-layout="f7-swipe"] #sidebar .nav-item[aria-current="page"] { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
|
||||
html[data-layout="f7-swipe"] #sidebar .nav-item { display: flex; align-items: center; gap: 10px; }
|
||||
html[data-layout="f7-swipe"] .legacy-nav-icon { display: none !important; }
|
||||
html[data-layout="f7-swipe"] .classic-nav-icon { display: block !important; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
|
||||
html[data-layout="f7-swipe"] #sidebar .nav-item::before { display: none; }
|
||||
html[data-layout="f7-swipe"] #sidebar .nav-item::after { content: '›'; margin-left: auto; color: var(--text-dim); font-size: 22px; line-height: 1; }
|
||||
html[data-layout="f7-swipe"] #sidebar .nav-item > .legacy-nav-icon { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 8px; background: var(--bg-2); font-size: 14px; }
|
||||
html[data-layout="f7-swipe"] #sidebar .nav-item > .classic-nav-icon { width: 30px; height: 30px; flex: none; padding: 6px; border-radius: 8px; background: var(--bg-2); }
|
||||
html[data-layout="f7-swipe"] #sidebar .playlist-item { min-height: 46px; border-radius: 10px; }
|
||||
html[data-layout="f7-swipe"] #sidebar .playlist-item::before { content: '›'; font-size: 20px; }
|
||||
html[data-layout="f7-swipe"] #newPlaylistBtn { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--accent); }
|
||||
html[data-layout="f7-swipe"] #sidebar .switch { display: flex; align-items: center; justify-content: space-between; }
|
||||
html[data-layout="f7-swipe"] #audioOnlyToggle { appearance: none; width: 48px; height: 29px; margin: 0; border-radius: 99px; background: var(--bg-3); transition: background .18s; }
|
||||
html[data-layout="f7-swipe"] #audioOnlyToggle { background: radial-gradient(circle at 14px 50%, #fff 0 11px, transparent 12px), var(--bg-3); }
|
||||
html[data-layout="f7-swipe"] #audioOnlyToggle:checked { background: radial-gradient(circle at 34px 50%, #fff 0 11px, transparent 12px), var(--accent); }
|
||||
|
||||
/* Large-title home and browsing pane */
|
||||
html[data-layout="f7-swipe"] .player-placeholder { padding: 30px 24px; }
|
||||
html[data-layout="f7-swipe"] #playerPane.empty .player-stage,
|
||||
html[data-layout="f7-swipe"] #playerPane.home-playlists .player-stage { width: 100%; min-height: 0; max-height: none; aspect-ratio: auto; overflow: visible; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
|
||||
html[data-layout="f7-swipe"] #playerPane.empty .player-placeholder { position: relative; inset: auto; min-height: 0; padding: 34px 16px 24px; background: transparent; }
|
||||
html[data-layout="f7-swipe"] #playerPane.empty .hero { align-items: flex-start; }
|
||||
html[data-layout="f7-swipe"] #playerPane.empty .ph-logo { display: none; }
|
||||
html[data-layout="f7-swipe"] #playerPane.empty .hero-pills { display: none; }
|
||||
html[data-layout="f7-swipe"] .hero { max-width: 740px; margin: 0 auto; text-align: left; }
|
||||
html[data-layout="f7-swipe"] .hero-title { font: 700 clamp(34px, 5vw, 40px)/1.08 var(--ui, system-ui, sans-serif); letter-spacing: -.035em; }
|
||||
html[data-layout="f7-swipe"] .hero-tagline { max-width: 54ch; color: var(--text-2); }
|
||||
html[data-layout="f7-swipe"] .hero-pills { gap: 8px; }
|
||||
html[data-layout="f7-swipe"] .hero-pill, html[data-layout="f7-swipe"] .chip { border-radius: 999px; border: 1px solid var(--f7-hairline); background: var(--bg-2); box-shadow: none; }
|
||||
html[data-layout="f7-swipe"] .home-pl { margin: 24px auto; max-width: 900px; }
|
||||
html[data-layout="f7-swipe"] .home-pl-title { font-size: 25px; font-weight: 700; }
|
||||
html[data-layout="f7-swipe"] .home-pl-grid { gap: 14px; }
|
||||
html[data-layout="f7-swipe"] .home-pl-card { overflow: hidden; border: 0; border-radius: 14px; background: var(--bg-1); box-shadow: none; }
|
||||
html[data-layout="f7-swipe"] .home-pl-card img { border-radius: 10px; }
|
||||
html[data-layout="f7-swipe"] .list-pane { background: transparent; }
|
||||
html[data-layout="f7-swipe"] .list-header { padding: 20px 20px 10px; }
|
||||
html[data-layout="f7-swipe"] .list-title-row h2 { font: 700 32px/1.12 var(--ui, system-ui, sans-serif); letter-spacing: -.035em; }
|
||||
html[data-layout="f7-swipe"] .list-sub { color: var(--text-dim); }
|
||||
@media (max-width: 860px) {
|
||||
html[data-layout="f7-swipe"]:has(#bottomNav .bottom-nav-btn.active:not([data-view="search"])) #playerPane.empty { display: none; }
|
||||
}
|
||||
html[data-layout="f7-swipe"] #listActions button:first-child { background: var(--accent); color: var(--on-accent, #fff); border-color: transparent; }
|
||||
html[data-layout="f7-swipe"] #listActions button:nth-child(2) { color: var(--text-dim); background: transparent; border-color: transparent; }
|
||||
html[data-layout="f7-swipe"]:has(#bottomNav .bottom-nav-btn.active[data-view="settings"]) #listFilterBar { display: none !important; }
|
||||
html[data-layout="f7-swipe"] #listTitleActions button, html[data-layout="f7-swipe"] #listActions button,
|
||||
html[data-layout="f7-swipe"] #batchBar button { min-height: 40px; border-radius: 999px; }
|
||||
html[data-layout="f7-swipe"] #listFilterBar { border-radius: 12px; background: var(--bg-2); }
|
||||
html[data-layout="f7-swipe"] #listFilterInput { min-height: 42px; border: 0; background: transparent; box-shadow: none; }
|
||||
html[data-layout="f7-swipe"] #batchBar { background: var(--f7-glass); border-block: 1px solid var(--f7-hairline); }
|
||||
html[data-layout="f7-swipe"] #searchMeta, html[data-layout="f7-swipe"] #status, html[data-layout="f7-swipe"] #p2pStrip { color: var(--text-dim); }
|
||||
|
||||
/* Shared inset grouped media list */
|
||||
html[data-layout="f7-swipe"] #cards { gap: 0; margin: 8px 16px 28px; padding: 0; overflow: visible; border: 1px solid var(--f7-hairline); border-radius: 14px; background: var(--f7-inset); }
|
||||
html[data-layout="f7-swipe"] #cards .card { min-height: 80px; padding: 8px 12px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
|
||||
html[data-layout="f7-swipe"] #cards .f7s-row:not(:last-child) .card { border-bottom: 1px solid var(--f7-hairline); }
|
||||
html[data-layout="f7-swipe"] #cards .thumb { width: 60px; height: 60px; flex: 0 0 60px; border-radius: 8px; }
|
||||
html[data-layout="f7-swipe"] #cards .thumb img { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; }
|
||||
html[data-layout="f7-swipe"] #cards .card-title { font-size: 15px; font-weight: 600; }
|
||||
html[data-layout="f7-swipe"] #cards .card-subtitle, html[data-layout="f7-swipe"] #cards .card-channel { color: var(--text-dim); }
|
||||
html[data-layout="f7-swipe"] #cards .card-menu { width: 42px; height: 42px; border: 0; border-radius: 50%; background: transparent; box-shadow: none; }
|
||||
@media (hover: none) { html[data-layout="f7-swipe"] #cards .card-del { display: none !important; } }
|
||||
html[data-layout="f7-swipe"] #cards .card.playing { background: color-mix(in srgb, var(--accent) 9%, transparent); }
|
||||
html[data-layout="f7-swipe"] #cards .badge, html[data-layout="f7-swipe"] #cards .saved-badge { border-radius: 999px; font-size: 11px; }
|
||||
|
||||
/* Settings, player deck, notes and related lists */
|
||||
html[data-layout="f7-swipe"] #cards .settings-overview { padding: 14px 8px; border: 1px solid var(--f7-hairline); border-radius: 14px; background: var(--f7-inset); }
|
||||
html[data-layout="f7-swipe"] #cards .settings-overview > * { min-height: 56px; border-bottom: 1px solid var(--f7-hairline); background: transparent; }
|
||||
html[data-layout="f7-swipe"] #cards .settings-section { margin: 18px 0; overflow: hidden; border: 1px solid var(--f7-hairline); border-radius: 14px; background: var(--f7-inset); box-shadow: none; }
|
||||
html[data-layout="f7-swipe"] #cards .settings-section-title { padding: 12px 16px 6px; color: var(--accent); font-size: 13px; }
|
||||
html[data-layout="f7-swipe"] #cards .set-row, html[data-layout="f7-swipe"] #cards .settings-section-row { min-height: 52px; padding-inline: 16px; border-bottom: 1px solid var(--f7-hairline); }
|
||||
html[data-layout="f7-swipe"] #cards .set-row input[type="checkbox"] { appearance: none; width: 48px; height: 29px; border: 0; border-radius: 99px; background: radial-gradient(circle at 14px 50%, #fff 0 11px, transparent 12px), var(--bg-3); }
|
||||
html[data-layout="f7-swipe"] #cards .set-row input[type="checkbox"]:checked { background: radial-gradient(circle at 34px 50%, #fff 0 11px, transparent 12px), var(--accent); }
|
||||
html[data-layout="f7-swipe"] #cards .set-row select { min-height: 38px; border: 1px solid var(--f7-hairline); border-radius: 9px; background: var(--bg-2); color: var(--text); }
|
||||
html[data-layout="f7-swipe"] #controls { padding: 10px 16px; }
|
||||
html[data-layout="f7-swipe"] #controls .seek { height: 3px; accent-color: var(--accent); }
|
||||
html[data-layout="f7-swipe"] #controls .ctrl, html[data-layout="f7-swipe"] #controls .dk-more,
|
||||
html[data-layout="f7-swipe"] #nowPlayingMeta .np-btn { border: 0; border-radius: 50%; background: transparent; box-shadow: none; }
|
||||
html[data-layout="f7-swipe"] #controls .play { width: 62px; height: 62px; border-radius: 50%; background: var(--accent); color: var(--on-accent, #fff); }
|
||||
html[data-layout="f7-swipe"] #nowPlayingMeta { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
|
||||
html[data-layout="f7-swipe"] .np-actions { display: flex; gap: 4px; }
|
||||
html[data-layout="f7-swipe"] #notesPanel { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
|
||||
html[data-layout="f7-swipe"] #notesPanel [role="tablist"], html[data-layout="f7-swipe"] .notes-tabs { display: flex; border-radius: 999px; background: var(--bg-2); padding: 3px; }
|
||||
html[data-layout="f7-swipe"] #notesPanel [role="tab"], html[data-layout="f7-swipe"] .notes-tabs button { border: 0; border-radius: 999px; background: transparent; }
|
||||
html[data-layout="f7-swipe"] #notesPanel [role="tab"][aria-selected="true"], html[data-layout="f7-swipe"] #notesPanel .notes-tab.active { color: var(--text); background: var(--bg-3); }
|
||||
html[data-layout="f7-swipe"] #upnext, html[data-layout="f7-swipe"] #relatedPanel { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
|
||||
html[data-layout="f7-swipe"] #relatedPanel .related-item { border-bottom: 1px solid var(--f7-hairline); }
|
||||
|
||||
/* Tab bar, toast, modal, action sheet and auxiliary modes */
|
||||
html[data-layout="f7-swipe"] #bottomNav { background: var(--f7-glass); border-top: 1px solid var(--f7-hairline); -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px); }
|
||||
html[data-layout="f7-swipe"] .bottom-nav-btn { min-height: 54px; border-radius: 0; color: var(--text-dim); }
|
||||
html[data-layout="f7-swipe"] .bottom-nav-icon .classic-nav-icon { width: 20px; height: 20px; padding: 0; }
|
||||
html[data-layout="f7-swipe"] .bottom-nav-btn.active { color: var(--accent); background: transparent; }
|
||||
html[data-layout="f7-swipe"] #toastContainer { bottom: calc(74px + env(safe-area-inset-bottom)); }
|
||||
html[data-layout="f7-swipe"] #toastContainer .toast { border-radius: 999px; background: #242428; color: #fff; box-shadow: 0 4px 18px rgb(0 0 0 / .22); }
|
||||
html[data-layout="f7-swipe"] #modal .modal { border-radius: 18px; box-shadow: 0 14px 42px rgb(0 0 0 / .2); }
|
||||
html[data-layout="f7-swipe"] #modalBody { box-shadow: none; }
|
||||
html[data-layout="f7-swipe"] #modalActions button { min-height: 48px; border-radius: 12px; }
|
||||
html[data-layout="f7-swipe"] #modal .modal { background: var(--bg-1); }
|
||||
html[data-layout="f7-swipe"] .f7s-sheet { box-shadow: none; border-radius: 18px 18px 0 0; }
|
||||
html[data-layout="f7-swipe"] .f7s-sheet.f7s-full { top: 0; bottom: 0; height: 100dvh; max-height: none; border-radius: 0; }
|
||||
html[data-layout="f7-swipe"] #sectionRail { top: auto; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); transform: none; border: 1px solid var(--f7-hairline); border-radius: 22px; background: var(--f7-glass); box-shadow: 0 4px 16px rgb(0 0 0 / .12); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
|
||||
html[data-layout="f7-swipe"] #sectionRail button { min-width: 44px; min-height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--text-dim); }
|
||||
html[data-layout="f7-swipe"] #sectionRail button.active { color: var(--accent); }
|
||||
html[data-layout="f7-swipe"] #serviceMode, html[data-layout="f7-swipe"] #partyPanel,
|
||||
html[data-layout="f7-swipe"] #remoteView, html[data-layout="f7-swipe"] #presenterView { color: var(--text); font-family: var(--ui, system-ui, sans-serif); }
|
||||
|
||||
@media (max-width: 860px) {
|
||||
html[data-layout="f7-swipe"] .topbar { padding-inline: 10px; }
|
||||
html[data-layout="f7-swipe"] .body { touch-action: pan-y; }
|
||||
html[data-layout="f7-swipe"] #cards { margin-inline: 10px; }
|
||||
html[data-layout="f7-swipe"] .bottom-nav { display: flex; height: calc(62px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); }
|
||||
html[data-layout="f7-swipe"] #miniBar { bottom: calc(66px + env(safe-area-inset-bottom)) !important; }
|
||||
html[data-layout="f7-swipe"] #modal { align-items: flex-end; padding: 0; }
|
||||
html[data-layout="f7-swipe"] #modal .modal { width: 100%; max-width: none; max-height: min(84dvh, 720px); margin: 0; overflow-y: auto; border-radius: 18px 18px 0 0; padding-bottom: max(18px, env(safe-area-inset-bottom)); }
|
||||
}
|
||||
@media (max-width: 420px) {
|
||||
html[data-layout="f7-swipe"] .list-header { padding-inline: 14px; }
|
||||
html[data-layout="f7-swipe"] .list-title-row h2 { font-size: 29px; }
|
||||
html[data-layout="f7-swipe"] #cards .card { min-height: 76px; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user