updated: app/ui-tarot-card.js
This commit is contained in:
@@ -1255,6 +1255,7 @@
|
|||||||
|
|
||||||
.tarot-frame-panel {
|
.tarot-frame-panel {
|
||||||
--frame-grid-zoom-scale: 1;
|
--frame-grid-zoom-scale: 1;
|
||||||
|
--frame-card-overlay-scale: clamp(1, calc(0.92 + ((var(--frame-grid-zoom-scale) - 1) * 0.14)), 2.3);
|
||||||
--frame-base-cell-width: clamp(32px, 2.6vw, 46px);
|
--frame-base-cell-width: clamp(32px, 2.6vw, 46px);
|
||||||
--frame-cell-width: calc(var(--frame-base-cell-width) * var(--frame-grid-zoom-scale));
|
--frame-cell-width: calc(var(--frame-base-cell-width) * var(--frame-grid-zoom-scale));
|
||||||
--frame-cell-height: calc(var(--frame-cell-width) * 1.5);
|
--frame-cell-height: calc(var(--frame-cell-width) * 1.5);
|
||||||
@@ -1946,14 +1947,14 @@
|
|||||||
|
|
||||||
.tarot-frame-card-badge {
|
.tarot-frame-card-badge {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 4px;
|
left: calc(4px * var(--frame-card-overlay-scale));
|
||||||
right: 4px;
|
right: calc(4px * var(--frame-card-overlay-scale));
|
||||||
bottom: 4px;
|
bottom: calc(4px * var(--frame-card-overlay-scale));
|
||||||
padding: 4px 5px;
|
padding: calc(4px * var(--frame-card-overlay-scale)) calc(5px * var(--frame-card-overlay-scale));
|
||||||
border-radius: 8px;
|
border-radius: calc(8px * var(--frame-card-overlay-scale));
|
||||||
background: rgba(2, 6, 23, 0.84);
|
background: rgba(2, 6, 23, 0.84);
|
||||||
color: #f8fafc;
|
color: #f8fafc;
|
||||||
font-size: clamp(8px, 0.72vw, 10px);
|
font-size: calc(clamp(8px, 0.72vw, 10px) * var(--frame-card-overlay-scale));
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
line-height: 1.15;
|
line-height: 1.15;
|
||||||
letter-spacing: 0.02em;
|
letter-spacing: 0.02em;
|
||||||
|
|||||||
@@ -48,9 +48,9 @@
|
|||||||
pisces: "02-19"
|
pisces: "02-19"
|
||||||
};
|
};
|
||||||
const MASTER_GRID_SIZE = 14;
|
const MASTER_GRID_SIZE = 14;
|
||||||
const FRAME_GRID_ZOOM_STEPS = [1, 1.2, 1.4, 1.7, 2, 2.4, 3, 3.6, 4.2];
|
const FRAME_GRID_ZOOM_STEPS = [1, 1.2, 1.4, 1.7, 2, 2.4, 3, 3.6, 4.2, 5.2, 6.4, 8, 10, 12, 14];
|
||||||
const FRAME_GRID_MIN_SCALE = 0.8;
|
const FRAME_GRID_MIN_SCALE = 0.8;
|
||||||
const FRAME_GRID_MAX_SCALE = 5.2;
|
const FRAME_GRID_MAX_SCALE = 14;
|
||||||
const FRAME_CUSTOM_LAYOUTS_STORAGE_KEY = "tarot-frame-custom-layouts-v1";
|
const FRAME_CUSTOM_LAYOUTS_STORAGE_KEY = "tarot-frame-custom-layouts-v1";
|
||||||
const FRAME_ACTIVE_LAYOUT_STORAGE_KEY = "tarot-frame-active-layout-v1";
|
const FRAME_ACTIVE_LAYOUT_STORAGE_KEY = "tarot-frame-active-layout-v1";
|
||||||
const FRAME_CARD_PICKER_QUERY_STORAGE_KEY = "tarot-frame-card-picker-query-v1";
|
const FRAME_CARD_PICKER_QUERY_STORAGE_KEY = "tarot-frame-card-picker-query-v1";
|
||||||
@@ -201,6 +201,7 @@
|
|||||||
},
|
},
|
||||||
suppressClick: false,
|
suppressClick: false,
|
||||||
showInfo: true,
|
showInfo: true,
|
||||||
|
layoutGuideVisible: false,
|
||||||
settingsOpen: false,
|
settingsOpen: false,
|
||||||
layoutMenuOpen: false,
|
layoutMenuOpen: false,
|
||||||
gridFocusMode: false,
|
gridFocusMode: false,
|
||||||
@@ -736,6 +737,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function applyLayoutGuideUi() {
|
||||||
|
const { tarotFrameOverviewEl } = getElements();
|
||||||
|
if (!(tarotFrameOverviewEl instanceof HTMLElement)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
tarotFrameOverviewEl.hidden = !state.layoutGuideVisible;
|
||||||
|
}
|
||||||
|
|
||||||
function applyGridFocusModeUi() {
|
function applyGridFocusModeUi() {
|
||||||
const {
|
const {
|
||||||
tarotFrameSectionEl,
|
tarotFrameSectionEl,
|
||||||
@@ -2335,6 +2345,20 @@
|
|||||||
saveButtonEl.disabled = Boolean(state.exportInProgress);
|
saveButtonEl.disabled = Boolean(state.exportInProgress);
|
||||||
tarotFrameLayoutPanelEl.appendChild(saveButtonEl);
|
tarotFrameLayoutPanelEl.appendChild(saveButtonEl);
|
||||||
|
|
||||||
|
const guideToggleEl = document.createElement("label");
|
||||||
|
guideToggleEl.className = "tarot-frame-toggle";
|
||||||
|
guideToggleEl.setAttribute("for", "tarot-frame-layout-guide-visible");
|
||||||
|
const guideToggleInputEl = document.createElement("input");
|
||||||
|
guideToggleInputEl.id = "tarot-frame-layout-guide-visible";
|
||||||
|
guideToggleInputEl.type = "checkbox";
|
||||||
|
guideToggleInputEl.checked = Boolean(state.layoutGuideVisible);
|
||||||
|
guideToggleInputEl.disabled = Boolean(state.exportInProgress);
|
||||||
|
guideToggleInputEl.dataset.layoutGuideVisible = "true";
|
||||||
|
const guideToggleLabelEl = document.createElement("span");
|
||||||
|
guideToggleLabelEl.textContent = "Show layout guide + notes";
|
||||||
|
guideToggleEl.append(guideToggleInputEl, guideToggleLabelEl);
|
||||||
|
tarotFrameLayoutPanelEl.appendChild(guideToggleEl);
|
||||||
|
|
||||||
const builtInHeadingEl = document.createElement("div");
|
const builtInHeadingEl = document.createElement("div");
|
||||||
builtInHeadingEl.className = "tarot-frame-layout-section-title";
|
builtInHeadingEl.className = "tarot-frame-layout-section-title";
|
||||||
builtInHeadingEl.textContent = "Built-in Layouts";
|
builtInHeadingEl.textContent = "Built-in Layouts";
|
||||||
@@ -2874,6 +2898,7 @@
|
|||||||
tarotFrameBoardEl.replaceChildren();
|
tarotFrameBoardEl.replaceChildren();
|
||||||
|
|
||||||
tarotFrameOverviewEl.appendChild(createOverview(layoutPreset, cards));
|
tarotFrameOverviewEl.appendChild(createOverview(layoutPreset, cards));
|
||||||
|
applyLayoutGuideUi();
|
||||||
|
|
||||||
const panelEl = document.createElement("section");
|
const panelEl = document.createElement("section");
|
||||||
panelEl.className = "tarot-frame-panel tarot-frame-panel--master";
|
panelEl.className = "tarot-frame-panel tarot-frame-panel--master";
|
||||||
@@ -3965,6 +3990,17 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (tarotFrameLayoutPanelEl) {
|
if (tarotFrameLayoutPanelEl) {
|
||||||
|
tarotFrameLayoutPanelEl.addEventListener("change", (event) => {
|
||||||
|
event.stopPropagation();
|
||||||
|
const target = event.target;
|
||||||
|
if (!(target instanceof HTMLInputElement) || target.dataset.layoutGuideVisible !== "true") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
state.layoutGuideVisible = Boolean(target.checked);
|
||||||
|
applyLayoutGuideUi();
|
||||||
|
});
|
||||||
|
|
||||||
tarotFrameLayoutPanelEl.addEventListener("click", (event) => {
|
tarotFrameLayoutPanelEl.addEventListener("click", (event) => {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
const target = event.target;
|
const target = event.target;
|
||||||
|
|||||||
10
index.html
10
index.html
@@ -16,7 +16,7 @@
|
|||||||
<link rel="stylesheet" href="node_modules/@fontsource/amiri/arabic-400.css">
|
<link rel="stylesheet" href="node_modules/@fontsource/amiri/arabic-400.css">
|
||||||
<link rel="stylesheet" href="node_modules/@fontsource/amiri/arabic-700.css">
|
<link rel="stylesheet" href="node_modules/@fontsource/amiri/arabic-700.css">
|
||||||
<link rel="stylesheet" href="node_modules/@fontsource/noto-naskh-arabic/arabic-400.css">
|
<link rel="stylesheet" href="node_modules/@fontsource/noto-naskh-arabic/arabic-400.css">
|
||||||
<link rel="stylesheet" href="app/styles.css?v=20260404-frame-pan-cushion-01">
|
<link rel="stylesheet" href="app/styles.css?v=20260407-frame-layout-guide-menu-01">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="topbar">
|
<div class="topbar">
|
||||||
@@ -343,6 +343,12 @@
|
|||||||
<option value="6">300%</option>
|
<option value="6">300%</option>
|
||||||
<option value="7">360%</option>
|
<option value="7">360%</option>
|
||||||
<option value="8">420%</option>
|
<option value="8">420%</option>
|
||||||
|
<option value="9">520%</option>
|
||||||
|
<option value="10">640%</option>
|
||||||
|
<option value="11">800%</option>
|
||||||
|
<option value="12">1000%</option>
|
||||||
|
<option value="13">1200%</option>
|
||||||
|
<option value="14">1400%</option>
|
||||||
</select>
|
</select>
|
||||||
</label>
|
</label>
|
||||||
<label class="tarot-frame-toggle" for="tarot-frame-show-info">
|
<label class="tarot-frame-toggle" for="tarot-frame-show-info">
|
||||||
@@ -1189,7 +1195,7 @@
|
|||||||
<script src="app/ui-numbers-detail.js"></script>
|
<script src="app/ui-numbers-detail.js"></script>
|
||||||
<script src="app/ui-numbers.js"></script>
|
<script src="app/ui-numbers.js"></script>
|
||||||
<script src="app/ui-tarot-spread.js"></script>
|
<script src="app/ui-tarot-spread.js"></script>
|
||||||
<script src="app/ui-tarot-frame.js?v=20260404-frame-notes-blur-01"></script>
|
<script src="app/ui-tarot-frame.js?v=20260407-frame-layout-guide-menu-02"></script>
|
||||||
<script src="app/ui-settings.js?v=20260309-gate"></script>
|
<script src="app/ui-settings.js?v=20260309-gate"></script>
|
||||||
<script src="app/ui-chrome.js?v=20260328-topbar-settings-01"></script>
|
<script src="app/ui-chrome.js?v=20260328-topbar-settings-01"></script>
|
||||||
<script src="app/ui-navigation.js?v=20260401-tarot-frame-01"></script>
|
<script src="app/ui-navigation.js?v=20260401-tarot-frame-01"></script>
|
||||||
|
|||||||
Reference in New Issue
Block a user