From fd86dc15734f3b7126d88f0130897c597100e30a Mon Sep 17 00:00:00 2001 From: polwex Date: Thu, 15 May 2025 20:32:25 +0700 Subject: m --- src/zoom/zoom.css | 567 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 567 insertions(+) create mode 100644 src/zoom/zoom.css (limited to 'src/zoom/zoom.css') diff --git a/src/zoom/zoom.css b/src/zoom/zoom.css new file mode 100644 index 0000000..2c743bd --- /dev/null +++ b/src/zoom/zoom.css @@ -0,0 +1,567 @@ +.app { + font-family: 'Arial', sans-serif; + max-width: 1200px; + margin: 0 auto; + padding: 20px; + color: #333; +} + +.app-header { + text-align: center; + margin-bottom: 40px; +} + +h1 { + font-size: 2.5rem; + margin-bottom: 1rem; + color: #2c3e50; + letter-spacing: -0.5px; +} + +.instructions { + font-size: 1.1rem; + line-height: 1.6; + color: #555; + max-width: 800px; + margin: 0 auto; +} + +.highlight { + background-color: rgba(255, 255, 200, 0.5); + padding: 0.2rem 0.5rem; + border-radius: 4px; + font-weight: 500; + color: #444; +} + +main { + display: flex; + justify-content: center; + margin: 2rem 0; +} + +.app-footer { + text-align: center; + margin-top: 60px; + padding-top: 20px; + border-top: 1px solid #eee; + color: #777; + font-size: 0.9rem; +} + +.text-focus-morph { + width: 100%; + max-width: 800px; + margin: 0 auto; + padding: 20px; + font-family: 'Arial', sans-serif; + position: relative; + min-height: 80vh; +} + +.content-container { + display: flex; + flex-direction: column; + gap: 1rem; + position: relative; +} + +/* Paragraph level */ +.paragraph-container, +.paragraph-wrapper { + position: relative; + padding: 1rem; + border-radius: 8px; + cursor: pointer; + will-change: transform, opacity, filter, background-color; + transition: background-color 0.2s ease; +} + +.paragraph-container.selected, +.paragraph-wrapper.selected { + background-color: rgba(200, 220, 255, 0.1); + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); + z-index: 1; +} + +.paragraph { + margin: 0; + line-height: 1.6; + text-align: left; +} + +.sentences-container { + display: inline; + line-height: 1.7; + text-align: left; +} + +/* Sentence level */ +.sentence, +.sentence-wrapper { + position: relative; + padding: 2px 4px; + border-radius: 4px; + cursor: pointer; + transition: background-color 0.2s ease; + display: inline; + will-change: transform, opacity, filter, background-color; +} + +.sentence.selected, +.sentence-wrapper.selected { + background-color: rgba(200, 220, 255, 0.2); + z-index: 2; +} + + +/* Word level */ +.word-container, +.word-wrapper { + display: inline-block; + padding: 2px 4px; + margin: 0 2px; + border-radius: 4px; + cursor: pointer; + transition: all 0.3s ease; + will-change: transform, opacity, filter, background-color; + position: relative; + z-index: 1; + /* Base z-index */ +} + +.word-container.selected, +.word-wrapper.selected { + background-color: #ffffff; + /* Fully opaque background */ + width: 90%; + max-width: 600px; + margin: 1rem auto; + display: block; + padding: 1rem; + box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15); + z-index: 50; + /* Higher than everything else */ + position: relative; + isolation: isolate; + /* Creates a new stacking context */ +} + +.word { + font-weight: 500; + position: relative; +} + +/* Fix for the word details view */ +.word-details-wrapper { + width: 100%; + overflow-y: auto; + position: relative; + margin: 0 auto; + z-index: 55; + /* Higher z-index */ + background-color: #ffffff; + /* Solid background */ + border-radius: 8px; + box-shadow: 0 0 0 1000px white; + /* Create an extended white background */ +} + +/* No longer needed - using word-backdrop element instead */ + +/* Backdrop overlay for word view */ +.word-backdrop { + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: rgba(255, 255, 255, 0.9); + z-index: 45; + /* Between regular content and the word container */ + pointer-events: none; + /* Allow clicks to pass through */ +} + +.word-content { + background-color: white; + border-radius: 8px; + padding: 1.5rem; + box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08); + max-height: 60vh; + overflow-y: auto; + position: relative; + z-index: 56; + /* Even higher z-index */ +} + +.word-details { + display: flex; + flex-direction: column; + gap: 0.8rem; + background-color: white; + border-radius: 8px; + padding: 1rem; + box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08); + position: relative; + z-index: 56; + /* Match word-content z-index */ +} + +/* Ensure all word detail elements remain on top */ +.word-container.selected *, +.word-wrapper.selected * { + position: relative; + z-index: 1; +} + +.word-header { + display: flex; + justify-content: space-between; + align-items: flex-start; + border-bottom: 2px solid rgba(255, 200, 200, 0.3); + padding-bottom: 0.5rem; + margin-bottom: 0.8rem; +} + +.word-title, +.word-text { + font-size: 1.8rem; + margin: 0; + color: #2c3e50; + flex: 1; +} + +.word-phonetics, +.word-phonetics.ipa { + margin: 0.8rem 0; + padding: 0.5rem; + background-color: rgba(245, 245, 245, 0.5); + border-radius: 4px; +} + +.pronunciation-item { + margin: 0.5rem 0; + display: flex; + align-items: center; + gap: 0.5rem; +} + +.ipa { + font-family: serif; + font-style: italic; + background-color: rgba(255, 255, 255, 0.8); + padding: 0.2rem 0.5rem; + border-radius: 4px; + font-weight: 500; +} + +.pronunciation-tags { + color: #666; + font-size: 0.9rem; +} + +.word-meanings { + margin: 1rem 0; + font-size: 0.95rem; + color: #333; + background-color: rgba(255, 255, 255, 0.8); + padding: 0.8rem; + border-radius: 6px; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); +} + +.sense-container, +.word-meaning { + margin: 1rem 0; + padding: 0.5rem; + border-left: 3px solid rgba(255, 200, 200, 0.3); + padding-left: 1rem; +} + +.sense-header { + display: flex; + align-items: center; + gap: 0.5rem; + margin-bottom: 0.5rem; +} + +.pos-tag { + background-color: rgba(200, 220, 255, 0.3); + color: #2c3e50; + padding: 0.1rem 0.5rem; + border-radius: 4px; + font-size: 0.9rem; + font-weight: 500; +} + +.etymology { + font-style: italic; + color: #666; + font-size: 0.9rem; +} + +.sense-list { + margin: 0.5rem 0; + padding-left: 1.5rem; +} + +.sense-item { + margin: 0.3rem 0; +} + +.glosses { + line-height: 1.5; +} + +/* Syllables display */ +.syllables-section { + margin: 1.5rem 0 0.5rem 0; + padding-top: 1rem; + border-top: 1px solid #eee; +} + +.syllables-container { + display: flex; + flex-direction: column; + gap: 0.8rem; +} + +.syllables-row { + display: flex; + flex-wrap: wrap; + justify-content: center; + gap: 0.8rem; + margin-top: 0.5rem; +} + +/* Compact syllables display for header */ +.syllables-compact { + display: flex; + flex-wrap: wrap; + gap: 0.4rem; + align-items: center; + margin-left: 1rem; +} + +.syllable { + display: inline-block; + padding: 0.3rem 0.6rem; + background-color: rgba(200, 255, 200, 0.2); + border-radius: 6px; + cursor: pointer; + transition: all 0.2s ease; + font-weight: 500; + text-align: center; + font-size: 0.9rem; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); +} + +.syllable:hover { + background-color: rgba(200, 255, 200, 0.4); + transform: translateY(-2px); +} + +.syllable.selected { + background-color: rgba(200, 255, 200, 0.4); +} + +.phoneme { + display: inline-block; + padding: 2px; + margin: 0 1px; + background-color: rgba(255, 255, 200, 0.2); + border-radius: 2px; +} + +/* Loading and error states */ +.word-loading, +.word-error { + text-align: center; + padding: 2rem; + background-color: white; + border-radius: 8px; + box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08); + z-index: 56; +} + +.word-error { + color: #e74c3c; + background-color: rgba(255, 200, 200, 0.1); +} + +/* Navigation */ +.back-button { + position: fixed; + top: 20px; + left: 20px; + padding: 8px 16px; + background-color: #f0f0f0; + border: none; + border-radius: 4px; + cursor: pointer; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); + z-index: 100; + transition: background-color 0.2s ease; +} + +.back-button:hover { + background-color: #e0e0e0; +} + +/* Loaders */ +.spinner { + border: 4px solid rgba(0, 0, 0, 0.1); + width: 24px; + height: 24px; + border-radius: 50%; + border-left-color: #09f; + margin: 5px auto; + animation: spin 1s ease infinite; +} + +.mini-spinner { + display: inline-block; + border: 2px solid rgba(0, 0, 0, 0.1); + width: 12px; + height: 12px; + border-radius: 50%; + border-left-color: #09f; + margin: 0 3px; + animation: spin 1s ease infinite; +} + +@keyframes spin { + 0% { + transform: rotate(0deg); + } + + 100% { + transform: rotate(360deg); + } +} + +/* Responsive adjustments */ +@media (max-width: 768px) { + + .word-container.selected, + .word-wrapper.selected { + width: 100%; + padding: 0.5rem; + } + + .word-content, + .word-details { + padding: 1rem; + } + + .word-title, + .word-text { + font-size: 1.5rem; + } + + .word-header { + flex-direction: column; + align-items: flex-start; + } + + .syllables-compact { + margin-left: 0; + margin-top: 0.5rem; + } +} + +/* Translation modal */ +.modal-bg { + width: 100vw; + height: 100vh; + background-color: rgba(0, 0, 0, 0.3); + position: fixed; + top: 0; + left: 0; + z-index: 100; +} + +.modal-bg2 { + position: relative; + width: 100%; + height: 100%; +} + +.modal-fg { + background-color: white; + z-index: 101; + border: 1px solid black; + overflow-y: auto; + padding: 1rem; + width: 80%; + height: max-content; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + border-radius: 8px; + box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2); +} + +/* Translation button */ +.translate-button { + position: fixed; + top: 20px; + right: 20px; + padding: 8px 16px; + background-color: #f0f0f0; + border: none; + border-radius: 4px; + cursor: pointer; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); + z-index: 100; + transition: background-color 0.2s ease; +} + +.translate-button:hover { + background-color: #e0e0e0; +} + + + + +.suword { + margin-left: 0.5ch; + margin-right: 0.5ch; +} + +/* .suword.pred { */ +/* color: gold; */ +/* } */ + +/* Clause level */ +.clause-container { + max-width: 600px; + white-space: normal !important; + hyphens: auto; + + padding: 2px; + border-radius: 4px; + cursor: pointer; + transition: background-color 0.2s ease; + will-change: transform, opacity, filter, background-color; + + span { + white-space: normal !important; + } +} + +.clause-container.selected { + background-color: rgba(220, 200, 255, 0.2); + z-index: 3; +} + +.suword.subj { + color: blue; + /* border-bottom: 2px solid blue; */ +} + +.suword.root { + color: darkred; +} \ No newline at end of file -- cgit v1.2.3