mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-09-03 11:54:30 -07:00
- Add default controls for installed sources and All sources - Expose source metadata for extension rows
474 lines
8.2 KiB
CSS
474 lines
8.2 KiB
CSS
@font-face {
|
|
font-family: 'M PLUS 1';
|
|
src: url('./fonts/MPLUS1[wght].ttf') format('truetype');
|
|
font-weight: 100 900;
|
|
font-display: swap;
|
|
}
|
|
|
|
:root {
|
|
/* Catppuccin Macchiato */
|
|
--ctp-mauve: #c6a0f6;
|
|
--ctp-red: #ed8796;
|
|
--ctp-peach: #f5a97f;
|
|
--ctp-yellow: #eed49f;
|
|
--ctp-green: #a6da95;
|
|
--ctp-sky: #91d7e3;
|
|
--ctp-blue: #8aadf4;
|
|
--ctp-lavender: #b7bdf8;
|
|
--ctp-text: #cad3f5;
|
|
--ctp-subtext0: #a5adcb;
|
|
--ctp-overlay1: #8087a2;
|
|
--ctp-surface0: #363a4f;
|
|
--ctp-base: #24273a;
|
|
--ctp-mantle: #1e2030;
|
|
--ctp-crust: #181926;
|
|
|
|
--bg: var(--ctp-base);
|
|
--panel: rgba(36, 39, 58, 0.85);
|
|
--panel-elevated: rgba(54, 58, 79, 0.55);
|
|
--line: rgba(110, 115, 141, 0.28);
|
|
--text: var(--ctp-text);
|
|
--muted: var(--ctp-subtext0);
|
|
--faint: var(--ctp-overlay1);
|
|
--accent: var(--ctp-blue);
|
|
--accent-strong: var(--ctp-lavender);
|
|
|
|
/* Amber marks the mining action: the thing you highlight to look up. */
|
|
--mine: var(--ctp-yellow);
|
|
--danger: var(--ctp-red);
|
|
--ok: var(--ctp-green);
|
|
--shadow: rgba(0, 0, 0, 0.42);
|
|
--mono: 'SF Mono', 'Cascadia Code', 'JetBrains Mono', 'Fira Code', monospace;
|
|
}
|
|
|
|
* {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
html,
|
|
body {
|
|
height: 100%;
|
|
margin: 0;
|
|
overflow: hidden;
|
|
}
|
|
|
|
html[data-embedded='overlay-modal'] .topbar {
|
|
gap: 12px;
|
|
padding: 10px 14px;
|
|
}
|
|
|
|
html[data-embedded='overlay-modal'] .brand-block {
|
|
gap: 0;
|
|
}
|
|
|
|
html[data-embedded='overlay-modal'] .brand-logo {
|
|
width: 38px;
|
|
height: 38px;
|
|
}
|
|
|
|
html[data-embedded='overlay-modal'] .brand-copy {
|
|
position: absolute;
|
|
width: 1px;
|
|
height: 1px;
|
|
padding: 0;
|
|
margin: -1px;
|
|
overflow: hidden;
|
|
clip: rect(0, 0, 0, 0);
|
|
white-space: nowrap;
|
|
border: 0;
|
|
}
|
|
|
|
html[data-embedded='overlay-modal'] .bridge-banner {
|
|
padding-inline: 14px;
|
|
}
|
|
|
|
html[data-embedded='overlay-modal'] .statusbar {
|
|
padding-inline: 14px;
|
|
}
|
|
|
|
body {
|
|
display: flex;
|
|
flex-direction: column;
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
font-family:
|
|
'M PLUS 1', 'Avenir Next', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Yu Gothic', sans-serif;
|
|
font-size: 14px;
|
|
line-height: 1.55;
|
|
}
|
|
|
|
.hidden {
|
|
display: none !important;
|
|
}
|
|
|
|
/* ---------- top bar ---------- */
|
|
|
|
.topbar {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 20px;
|
|
padding: 14px 20px;
|
|
border-bottom: 1px solid var(--line);
|
|
background: linear-gradient(180deg, var(--ctp-mantle), var(--ctp-base));
|
|
flex: none;
|
|
}
|
|
|
|
.brand-block {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
flex: none;
|
|
}
|
|
|
|
.brand-logo {
|
|
width: 52px;
|
|
height: 52px;
|
|
flex: none;
|
|
object-fit: contain;
|
|
filter: drop-shadow(0 5px 9px rgba(0, 0, 0, 0.28));
|
|
}
|
|
|
|
.brand-title {
|
|
font-size: 11px;
|
|
font-weight: 700;
|
|
letter-spacing: 0.22em;
|
|
text-transform: uppercase;
|
|
color: var(--faint);
|
|
}
|
|
|
|
.brand-subtitle {
|
|
font-size: 20px;
|
|
font-weight: 600;
|
|
letter-spacing: -0.01em;
|
|
line-height: 1.1;
|
|
}
|
|
|
|
.search-form {
|
|
display: flex;
|
|
gap: 8px;
|
|
flex: 1 1 auto;
|
|
max-width: 560px;
|
|
}
|
|
|
|
.text-input {
|
|
width: 100%;
|
|
padding: 9px 12px;
|
|
border: 1px solid var(--line);
|
|
border-radius: 10px;
|
|
background: var(--ctp-crust);
|
|
color: var(--text);
|
|
font: inherit;
|
|
transition:
|
|
border-color 0.15s ease,
|
|
box-shadow 0.15s ease;
|
|
}
|
|
|
|
.text-input:focus-visible {
|
|
outline: none;
|
|
border-color: var(--accent);
|
|
box-shadow: 0 0 0 3px rgba(138, 173, 244, 0.22);
|
|
}
|
|
|
|
.primary-button,
|
|
.ghost-button {
|
|
padding: 9px 16px;
|
|
border-radius: 10px;
|
|
border: 1px solid transparent;
|
|
font: inherit;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
white-space: nowrap;
|
|
transition:
|
|
background 0.15s ease,
|
|
border-color 0.15s ease,
|
|
transform 0.1s ease;
|
|
}
|
|
|
|
.primary-button {
|
|
background: var(--accent);
|
|
color: var(--ctp-crust);
|
|
}
|
|
|
|
.primary-button:hover:not(:disabled) {
|
|
background: var(--accent-strong);
|
|
}
|
|
|
|
.ghost-button {
|
|
background: transparent;
|
|
border-color: var(--line);
|
|
color: var(--muted);
|
|
}
|
|
|
|
.ghost-button:hover:not(:disabled) {
|
|
color: var(--text);
|
|
border-color: var(--faint);
|
|
}
|
|
|
|
.primary-button:disabled,
|
|
.ghost-button:disabled {
|
|
opacity: 0.5;
|
|
cursor: default;
|
|
}
|
|
|
|
.primary-button:active:not(:disabled) {
|
|
transform: translateY(1px);
|
|
}
|
|
|
|
:focus-visible {
|
|
outline: 2px solid var(--accent);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
.tabs {
|
|
display: flex;
|
|
gap: 4px;
|
|
flex: none;
|
|
padding: 3px;
|
|
border: 1px solid var(--line);
|
|
border-radius: 12px;
|
|
background: var(--ctp-crust);
|
|
}
|
|
|
|
.tab {
|
|
padding: 8px 14px;
|
|
border: 1px solid transparent;
|
|
border-radius: 9px;
|
|
background: transparent;
|
|
color: var(--muted);
|
|
font: inherit;
|
|
font-weight: 600;
|
|
white-space: nowrap;
|
|
cursor: pointer;
|
|
transition:
|
|
background 0.15s ease,
|
|
color 0.15s ease;
|
|
}
|
|
|
|
.tab:hover[aria-selected='false'] {
|
|
color: var(--text);
|
|
}
|
|
|
|
.tab[aria-selected='true'] {
|
|
background: var(--panel-elevated);
|
|
border-color: var(--line);
|
|
color: var(--text);
|
|
}
|
|
|
|
.source-picker {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
flex: none;
|
|
min-width: 190px;
|
|
}
|
|
|
|
.source-label {
|
|
font-size: 10px;
|
|
letter-spacing: 0.16em;
|
|
text-transform: uppercase;
|
|
color: var(--faint);
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.source-picker .text-input {
|
|
flex: 1 1 auto;
|
|
width: auto;
|
|
}
|
|
|
|
/* ---------- bridge banner ---------- */
|
|
|
|
.bridge-banner {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
padding: 9px 20px;
|
|
border-bottom: 1px solid var(--line);
|
|
background: var(--panel-elevated);
|
|
font-size: 13px;
|
|
color: var(--muted);
|
|
flex: none;
|
|
}
|
|
|
|
.bridge-dot {
|
|
width: 8px;
|
|
height: 8px;
|
|
border-radius: 50%;
|
|
background: var(--faint);
|
|
flex: none;
|
|
}
|
|
|
|
.bridge-banner[data-stage='ready'] .bridge-dot {
|
|
background: var(--ok);
|
|
}
|
|
|
|
.bridge-banner[data-stage='failed'] .bridge-dot {
|
|
background: var(--danger);
|
|
}
|
|
|
|
.bridge-banner[data-busy='true'] .bridge-dot {
|
|
background: var(--accent);
|
|
animation: pulse 1.1s ease-in-out infinite;
|
|
}
|
|
|
|
@keyframes pulse {
|
|
0%,
|
|
100% {
|
|
opacity: 0.35;
|
|
}
|
|
50% {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
.bridge-meter {
|
|
width: 160px;
|
|
height: 4px;
|
|
border-radius: 2px;
|
|
background: var(--ctp-crust);
|
|
overflow: hidden;
|
|
}
|
|
|
|
.bridge-meter i {
|
|
display: block;
|
|
height: 100%;
|
|
width: 0;
|
|
background: var(--accent);
|
|
transition: width 0.2s ease;
|
|
}
|
|
|
|
.bridge-update {
|
|
margin-left: auto;
|
|
padding: 4px 12px;
|
|
border-radius: 8px;
|
|
font-size: 12px;
|
|
}
|
|
|
|
/* ---------- layout ---------- */
|
|
|
|
.layout {
|
|
display: flex;
|
|
flex: 1 1 0;
|
|
min-height: 0;
|
|
}
|
|
|
|
.results {
|
|
flex: 1 1 auto;
|
|
min-width: 0;
|
|
overflow-y: auto;
|
|
padding: 20px;
|
|
}
|
|
|
|
.grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
|
|
gap: 18px;
|
|
}
|
|
|
|
.empty {
|
|
margin: 48px auto;
|
|
max-width: 44ch;
|
|
text-align: center;
|
|
color: var(--muted);
|
|
}
|
|
|
|
.load-more {
|
|
display: block;
|
|
margin: 24px auto 4px;
|
|
}
|
|
|
|
.load-more.hidden {
|
|
display: none;
|
|
}
|
|
|
|
/* ---------- cover cards ---------- */
|
|
|
|
.card {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
padding: 0;
|
|
border: none;
|
|
background: none;
|
|
color: inherit;
|
|
font: inherit;
|
|
text-align: left;
|
|
cursor: pointer;
|
|
animation: card-in 0.32s ease both;
|
|
}
|
|
|
|
@keyframes card-in {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(8px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
.card-art {
|
|
position: relative;
|
|
aspect-ratio: 2 / 3;
|
|
border-radius: 12px;
|
|
overflow: hidden;
|
|
background: var(--ctp-crust);
|
|
border: 1px solid var(--line);
|
|
box-shadow: 0 10px 28px -18px var(--shadow);
|
|
transition:
|
|
border-color 0.18s ease,
|
|
transform 0.18s ease;
|
|
}
|
|
|
|
.card:hover .card-art,
|
|
.card:focus-visible .card-art {
|
|
border-color: var(--accent);
|
|
transform: translateY(-3px);
|
|
}
|
|
|
|
.card-art img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
display: block;
|
|
}
|
|
|
|
.card-art.is-empty::after {
|
|
content: attr(data-initial);
|
|
position: absolute;
|
|
inset: 0;
|
|
display: grid;
|
|
place-items: center;
|
|
font-size: 30px;
|
|
font-weight: 600;
|
|
color: var(--faint);
|
|
}
|
|
|
|
/* Which source a cover came from, shown only in an all-sources result. */
|
|
.card-source {
|
|
position: absolute;
|
|
left: 6px;
|
|
bottom: 6px;
|
|
right: 6px;
|
|
padding: 3px 7px;
|
|
border-radius: 7px;
|
|
background: rgba(24, 25, 38, 0.82);
|
|
backdrop-filter: blur(6px);
|
|
color: var(--muted);
|
|
font-size: 10px;
|
|
letter-spacing: 0.04em;
|
|
text-transform: uppercase;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.card-title {
|
|
font-size: 13px;
|
|
line-height: 1.35;
|
|
display: -webkit-box;
|
|
-webkit-line-clamp: 2;
|
|
-webkit-box-orient: vertical;
|
|
overflow: hidden;
|
|
}
|