Fix static data volume mount and add global hover-to-translate mode

This commit is contained in:
chrisf committed 2026-10-21 04:32:47 +00:00
1 parent f35864a03e
commit ffe25e782a
7 files changed
+569 -80

No files matched your search

+92
View File
@@ -1033,3 +1033,95 @@ body {
opacity: 1;
transform: translateY(0);
}
/* === HOVER-TO-TRANSLATE MODE & FLOATING TOOLTIP === */
.hover-toggle-btn {
display: inline-flex;
align-items: center;
gap: 0.4rem;
font-family: inherit;
font-size: 0.82rem;
font-weight: 700;
padding: 0.42rem 0.8rem;
border-radius: 999px;
cursor: pointer;
border: 1px solid var(--border-strong);
background: var(--bg-subtle);
color: var(--text-secondary);
transition: all 0.15s ease;
white-space: nowrap;
}
.hover-toggle-btn.active {
background: var(--indigo-light);
color: var(--indigo);
border-color: #a5b4fc;
}
.hover-toggle-btn:hover {
transform: translateY(-1px);
}
body.hover-translate-on .word-token {
border-bottom: 1px dashed rgba(79, 70, 229, 0.35);
}
body.hover-translate-on .word-token:hover {
background: #e0e7ff;
color: #1e1b4b;
}
.hover-translate-tooltip {
position: fixed;
z-index: 9999;
background: #18181b;
color: #ffffff;
padding: 0.55rem 0.85rem;
border-radius: 10px;
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.28);
pointer-events: none;
opacity: 0;
transform: translate(-50%, -100%) translateY(-8px);
transition: opacity 0.12s ease;
max-width: 310px;
font-size: 0.84rem;
line-height: 1.35;
border: 1px solid rgba(255, 255, 255, 0.14);
}
.hover-translate-tooltip.visible {
opacity: 1;
}
.hover-translate-tooltip::after {
content: "";
position: absolute;
top: 100%;
left: 50%;
transform: translateX(-50%);
border-width: 6px;
border-style: solid;
border-color: #18181b transparent transparent transparent;
}
.hover-tt-top {
display: flex;
align-items: center;
gap: 0.4rem;
margin-bottom: 0.18rem;
font-weight: 700;
color: #f4f4f5;
}
.hover-tt-en {
color: #fde68a;
font-weight: 700;
font-size: 0.9rem;
}
.hover-tt-note {
color: #a1a1aa;
font-size: 0.74rem;
margin-top: 0.15rem;
}