building new tarot frame component for custom layout

This commit is contained in:
2026-04-01 12:31:56 -07:00
parent d47e63df6d
commit a7d956cee8
11 changed files with 2359 additions and 79 deletions

View File

@@ -89,6 +89,9 @@
.topbar-menu-toggle:hover {
background: #3f3f46;
}
.topbar-settings-toggle {
margin-left: 0;
}
.topbar-actions {
display: none;
flex: 1 0 100%;
@@ -187,6 +190,9 @@
.topbar-menu-toggle {
min-height: 38px;
}
.topbar-settings-toggle {
min-height: 38px;
}
.topbar-panel-toggle {
min-height: 38px;
}
@@ -389,12 +395,21 @@
box-sizing: border-box;
overflow: hidden;
}
#tarot-frame-section {
height: calc(100vh - 61px);
background: #18181b;
box-sizing: border-box;
overflow: auto;
}
#tarot-section[hidden] {
display: none;
}
#tarot-house-section[hidden] {
display: none;
}
#tarot-frame-section[hidden] {
display: none;
}
#planet-section[hidden] {
display: none;
}
@@ -844,12 +859,430 @@
gap: 10px;
}
.tarot-frame-view {
min-height: 100%;
padding: 18px;
box-sizing: border-box;
}
.tarot-frame-shell {
width: min(1480px, 100%);
margin: 0 auto;
display: grid;
gap: 16px;
}
.tarot-frame-header {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 16px;
flex-wrap: wrap;
}
.tarot-frame-title {
margin: 0;
font-size: clamp(28px, 4vw, 38px);
line-height: 1.05;
letter-spacing: 0.01em;
}
.tarot-frame-copy {
margin: 8px 0 0;
max-width: 820px;
color: #cbd5e1;
font-size: 14px;
line-height: 1.55;
}
.tarot-frame-actions {
position: relative;
display: flex;
align-items: center;
gap: 8px;
flex-wrap: wrap;
}
.tarot-frame-action-btn {
padding: 10px 14px;
border: 1px solid #4c1d95;
border-radius: 999px;
background: linear-gradient(180deg, #312e81, #1d1b4b);
color: #eef2ff;
cursor: pointer;
font-size: 13px;
font-weight: 700;
letter-spacing: 0.02em;
}
.tarot-frame-action-btn:hover {
border-color: #6d28d9;
background: linear-gradient(180deg, #4338ca, #312e81);
}
.tarot-frame-settings-panel {
position: absolute;
top: calc(100% + 10px);
right: 0;
z-index: 25;
min-width: 220px;
display: grid;
gap: 10px;
padding: 12px;
border: 1px solid #312e81;
border-radius: 16px;
background:
radial-gradient(circle at top, rgba(99, 102, 241, 0.14), transparent 40%),
linear-gradient(180deg, rgba(22, 22, 34, 0.98), rgba(10, 10, 18, 0.98));
box-shadow: 0 18px 38px rgba(0, 0, 0, 0.3);
}
.tarot-frame-settings-panel[hidden] {
display: none !important;
}
.tarot-frame-toggle {
display: inline-flex;
align-items: center;
gap: 10px;
padding: 9px 10px;
border: 1px solid rgba(99, 102, 241, 0.34);
border-radius: 12px;
background: rgba(15, 23, 42, 0.5);
color: #e2e8f0;
font-size: 13px;
font-weight: 600;
cursor: pointer;
-webkit-user-select: none;
user-select: none;
}
.tarot-frame-toggle input {
margin: 0;
accent-color: #818cf8;
}
.tarot-frame-toggle input:disabled,
.tarot-frame-export-btn:disabled,
.tarot-frame-settings-toggle:disabled {
cursor: wait;
}
.tarot-frame-export-btn {
width: 100%;
justify-content: center;
}
.tarot-frame-status {
padding: 10px 14px;
border: 1px solid #27272a;
border-radius: 14px;
background: linear-gradient(180deg, rgba(20, 20, 32, 0.95), rgba(10, 10, 18, 0.95));
color: #d4d4d8;
font-size: 13px;
line-height: 1.4;
}
.tarot-frame-board-grid {
display: block;
}
.tarot-frame-panel {
--frame-cell-size: clamp(34px, 3.1vw, 52px);
--frame-gap: clamp(2px, 0.3vw, 6px);
display: grid;
gap: 14px;
padding: 18px;
border: 1px solid #27272a;
border-radius: 22px;
background:
radial-gradient(circle at top, rgba(59, 130, 246, 0.08), transparent 34%),
linear-gradient(180deg, #161622 0%, #0f0f17 100%);
box-shadow: 0 22px 54px rgba(0, 0, 0, 0.24);
overflow: auto;
}
.tarot-frame-panel-head {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 12px;
min-width: max-content;
}
.tarot-frame-panel-title {
margin: 0;
font-size: 17px;
line-height: 1.2;
color: #f8fafc;
}
.tarot-frame-panel-subtitle {
margin: 5px 0 0;
color: #94a3b8;
font-size: 13px;
line-height: 1.45;
}
.tarot-frame-panel-count {
align-self: center;
padding: 6px 10px;
border-radius: 999px;
background: rgba(15, 23, 42, 0.78);
color: #cbd5e1;
font-size: 11px;
font-weight: 700;
letter-spacing: 0.08em;
text-transform: uppercase;
white-space: nowrap;
}
.tarot-frame-legend {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 10px;
}
.tarot-frame-legend-item {
display: grid;
gap: 4px;
padding: 10px 12px;
border: 1px solid rgba(71, 85, 105, 0.56);
border-radius: 14px;
background: rgba(15, 23, 42, 0.46);
color: #cbd5e1;
font-size: 12px;
line-height: 1.4;
}
.tarot-frame-legend-item strong {
color: #f8fafc;
font-size: 12px;
letter-spacing: 0.04em;
text-transform: uppercase;
}
.tarot-frame-grid {
display: grid;
grid-template-columns: repeat(var(--frame-grid-size), var(--frame-cell-size));
grid-template-rows: repeat(var(--frame-grid-size), var(--frame-cell-size));
gap: var(--frame-gap);
justify-content: center;
align-content: center;
min-width: max-content;
}
.tarot-frame-slot {
position: relative;
width: var(--frame-cell-size);
height: var(--frame-cell-size);
border-radius: 8px;
transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}
.tarot-frame-slot.is-empty-slot {
border: 1px dashed rgba(148, 163, 184, 0.4);
}
.tarot-frame-slot.is-drop-target {
box-shadow: 0 0 0 2px #f59e0b, 0 0 0 6px rgba(245, 158, 11, 0.18);
border-radius: 8px;
}
.tarot-frame-slot.is-drag-source {
opacity: 0.42;
}
.tarot-frame-slot-empty {
width: 100%;
height: 100%;
display: block;
border: 0;
border-radius: 0;
background: transparent;
color: transparent;
font-size: 0;
}
.tarot-frame-slot-empty::before {
content: none;
}
.tarot-frame-card {
position: absolute;
inset: 0;
padding: 0;
border: 0;
border-radius: 0;
background: transparent;
overflow: visible;
cursor: grab;
box-shadow: none;
transition: transform 120ms ease, filter 120ms ease;
-webkit-user-select: none;
user-select: none;
}
.tarot-frame-card.is-empty {
cursor: default;
box-shadow: none;
background: transparent;
border-color: transparent;
}
.tarot-frame-card:hover {
transform: translateY(-2px);
filter: drop-shadow(0 10px 18px rgba(15, 23, 42, 0.38));
}
.tarot-frame-card.is-empty:hover {
border-color: transparent;
box-shadow: none;
transform: none;
}
.tarot-frame-card-image,
.tarot-frame-card-fallback {
display: block;
width: 100%;
height: 100%;
pointer-events: none;
-webkit-user-select: none;
user-select: none;
}
.tarot-frame-card-image {
object-fit: contain;
background: transparent;
border-radius: 0;
}
.tarot-frame-card-fallback {
display: grid;
place-items: center;
padding: 8px;
box-sizing: border-box;
color: #f8fafc;
font-size: 12px;
line-height: 1.2;
text-align: center;
background:
radial-gradient(circle at top, rgba(99, 102, 241, 0.18), transparent 50%),
linear-gradient(180deg, #1e1b4b 0%, #0f172a 100%);
}
.tarot-frame-card-badge {
position: absolute;
left: 4px;
right: 4px;
bottom: 4px;
padding: 4px 5px;
border-radius: 8px;
background: rgba(2, 6, 23, 0.84);
color: #f8fafc;
font-size: clamp(8px, 0.72vw, 10px);
font-weight: 700;
line-height: 1.15;
letter-spacing: 0.02em;
text-align: center;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
white-space: normal;
box-sizing: border-box;
pointer-events: none;
-webkit-user-select: none;
user-select: none;
}
.tarot-frame-grid.is-info-hidden .tarot-frame-card-badge {
display: none;
}
.tarot-frame-drag-ghost {
position: fixed;
z-index: 120;
width: 86px;
height: 129px;
pointer-events: none;
border-radius: 14px;
overflow: hidden;
border: 1px solid #818cf8;
background: linear-gradient(180deg, #18181b 0%, #09090b 100%);
box-shadow: 0 20px 42px rgba(0, 0, 0, 0.38);
transform: translate(-50%, -50%);
}
.tarot-frame-drag-ghost img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
.tarot-frame-drag-ghost-label {
position: absolute;
left: 6px;
right: 6px;
bottom: 6px;
padding: 4px 5px;
border-radius: 999px;
background: rgba(2, 6, 23, 0.88);
color: #f8fafc;
font-size: 10px;
font-weight: 700;
text-align: center;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
box-sizing: border-box;
}
body.is-tarot-frame-dragging {
cursor: grabbing;
-webkit-user-select: none;
user-select: none;
}
@media (max-width: 1180px) {
.tarot-frame-legend {
grid-template-columns: minmax(0, 1fr);
}
}
@media (max-width: 820px) {
.tarot-frame-view {
padding: 12px;
}
.tarot-frame-actions {
width: 100%;
}
.tarot-frame-settings-panel {
left: 0;
right: auto;
}
.tarot-frame-panel {
padding: 14px;
}
.tarot-frame-panel {
--frame-cell-size: 28px;
}
.tarot-frame-card-badge {
font-size: 7px;
padding: 3px 4px;
}
}
.tarot-house-card-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
flex-wrap: wrap;
position: relative;
}
.tarot-house-card-actions {
@@ -857,6 +1290,28 @@
align-items: center;
gap: 8px;
flex-wrap: wrap;
margin-left: auto;
}
.tarot-house-settings-panel {
position: absolute;
top: calc(100% + 10px);
right: 0;
z-index: 3;
width: min(560px, 100%);
display: grid;
gap: 10px;
padding: 14px 16px;
border: 1px solid rgba(82, 82, 91, 0.9);
border-radius: 14px;
background: rgba(9, 9, 11, 0.96);
box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
-webkit-backdrop-filter: blur(14px);
backdrop-filter: blur(14px);
}
.tarot-house-settings-panel[hidden] {
display: none;
}
.tarot-house-toggle {
@@ -2897,12 +3352,13 @@
}
.tarot-house-card-actions {
display: grid;
grid-template-columns: minmax(0, 1fr);
display: flex;
align-items: stretch;
gap: 8px;
margin-left: 0;
}
.tarot-house-settings-toggle,
.tarot-house-toggle,
.tarot-house-filter-group,
.tarot-house-action-btn {
@@ -2910,6 +3366,12 @@
box-sizing: border-box;
}
.tarot-house-settings-panel {
position: static;
width: 100%;
max-width: 100%;
}
.tarot-house-filter-group {
justify-content: flex-start;
}