fix(reader): restore font-controls closing brace and fix desktop popup and settings panel styling
This commit is contained in:
@@ -2834,6 +2834,10 @@ body {
|
|||||||
-webkit-overflow-scrolling: touch !important;
|
-webkit-overflow-scrolling: touch !important;
|
||||||
border-radius: 20px !important;
|
border-radius: 20px !important;
|
||||||
box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.55) !important;
|
box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.55) !important;
|
||||||
|
border: 1px solid var(--border-focus) !important;
|
||||||
|
background-color: var(--bg-surface) !important;
|
||||||
|
color: var(--text-main) !important;
|
||||||
|
padding: 16px 18px 24px !important;
|
||||||
z-index: 10006 !important;
|
z-index: 10006 !important;
|
||||||
animation: slideUpSheet 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
|
animation: slideUpSheet 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
|
||||||
}
|
}
|
||||||
@@ -3143,6 +3147,8 @@ body {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 4px;
|
gap: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
.reader-scroll-area {
|
.reader-scroll-area {
|
||||||
--reader-font-size: 18px;
|
--reader-font-size: 18px;
|
||||||
--reader-line-height: 1.65;
|
--reader-line-height: 1.65;
|
||||||
@@ -3277,11 +3283,12 @@ body {
|
|||||||
top: 64px;
|
top: 64px;
|
||||||
right: 28px;
|
right: 28px;
|
||||||
width: 320px;
|
width: 320px;
|
||||||
|
max-width: calc(100vw - 32px);
|
||||||
background-color: var(--bg-surface);
|
background-color: var(--bg-surface);
|
||||||
border: 1px solid var(--border-focus);
|
border: 1px solid var(--border-focus);
|
||||||
border-radius: var(--radius-lg);
|
border-radius: var(--radius-lg);
|
||||||
box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
|
box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
|
||||||
z-index: 10002;
|
z-index: 10006;
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
animation: fadeIn 0.15s ease-out;
|
animation: fadeIn 0.15s ease-out;
|
||||||
}
|
}
|
||||||
@@ -3721,7 +3728,7 @@ body {
|
|||||||
/* Click-to-Translate Popup */
|
/* Click-to-Translate Popup */
|
||||||
.reader-word-popup {
|
.reader-word-popup {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
z-index: 10001;
|
z-index: 10005;
|
||||||
background-color: var(--bg-surface);
|
background-color: var(--bg-surface);
|
||||||
border: 1px solid var(--border-focus);
|
border: 1px solid var(--border-focus);
|
||||||
border-radius: var(--radius-lg);
|
border-radius: var(--radius-lg);
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
|
||||||
<title>Notes — Персональный тренажер и словарь английского языка</title>
|
<title>Notes — Персональный тренажер и словарь английского языка</title>
|
||||||
<meta name="description" content="Защищённый персональный тренажёр и словарь английского языка с интервальными повторениями SRS SM-2, контекстным поиском и озвучкой">
|
<meta name="description" content="Защищённый персональный тренажёр и словарь английского языка с интервальными повторениями SRS SM-2, контекстным поиском и озвучкой">
|
||||||
<link rel="stylesheet" href="/static/css/style.css?v=3.2">
|
<link rel="stylesheet" href="/static/css/style.css?v=3.3">
|
||||||
|
|
||||||
<!-- PWA meta and icons -->
|
<!-- PWA meta and icons -->
|
||||||
<link rel="manifest" href="/manifest.json">
|
<link rel="manifest" href="/manifest.json">
|
||||||
@@ -1051,7 +1051,7 @@
|
|||||||
<!-- Audio Element for native streaming -->
|
<!-- Audio Element for native streaming -->
|
||||||
<audio id="global-audio-player" preload="none"></audio>
|
<audio id="global-audio-player" preload="none"></audio>
|
||||||
|
|
||||||
<script src="/static/js/app.js?v=3.2"></script>
|
<script src="/static/js/app.js?v=3.3"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|||||||
+35
-1
@@ -2571,6 +2571,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
async function openWordPopup(term, contextSentence, targetElement) {
|
async function openWordPopup(term, contextSentence, targetElement) {
|
||||||
const cleanTerm = (term || '').replace(/^['"“«`\s\-_.,;:!?()[\]{}]+|['"”»`\s\-_.,;:!?()[\]{}]+$/g, '').trim();
|
const cleanTerm = (term || '').replace(/^['"“«`\s\-_.,;:!?()[\]{}]+|['"”»`\s\-_.,;:!?()[\]{}]+$/g, '').trim();
|
||||||
if (!cleanTerm) return;
|
if (!cleanTerm) return;
|
||||||
|
if (readerSettingsPanel) readerSettingsPanel.classList.add('hidden');
|
||||||
|
|
||||||
const lowerClean = cleanTerm.toLowerCase();
|
const lowerClean = cleanTerm.toLowerCase();
|
||||||
const existingCard = allCards && allCards.find(c => c.term && c.term.trim().toLowerCase() === lowerClean);
|
const existingCard = allCards && allCards.find(c => c.term && c.term.trim().toLowerCase() === lowerClean);
|
||||||
@@ -2925,6 +2926,29 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function positionSettingsPanel() {
|
||||||
|
if (!readerSettingsPanel || !readerSettingsBtn) return;
|
||||||
|
if (window.innerWidth <= 768) {
|
||||||
|
readerSettingsPanel.style.top = '';
|
||||||
|
readerSettingsPanel.style.left = '';
|
||||||
|
readerSettingsPanel.style.right = '';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const rect = readerSettingsBtn.getBoundingClientRect();
|
||||||
|
const panelWidth = 320;
|
||||||
|
const viewportWidth = window.innerWidth;
|
||||||
|
|
||||||
|
let left = rect.right - panelWidth;
|
||||||
|
if (left < 16) left = 16;
|
||||||
|
if (left + panelWidth > viewportWidth - 16) {
|
||||||
|
left = viewportWidth - panelWidth - 16;
|
||||||
|
}
|
||||||
|
|
||||||
|
readerSettingsPanel.style.top = `${Math.round(rect.bottom + 8)}px`;
|
||||||
|
readerSettingsPanel.style.left = `${Math.round(left)}px`;
|
||||||
|
readerSettingsPanel.style.right = 'auto';
|
||||||
|
}
|
||||||
|
|
||||||
function initReaderSettingsPanel() {
|
function initReaderSettingsPanel() {
|
||||||
loadSavedReaderSettings();
|
loadSavedReaderSettings();
|
||||||
applyReaderSettings();
|
applyReaderSettings();
|
||||||
@@ -2932,10 +2956,14 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
if (readerSettingsBtn) {
|
if (readerSettingsBtn) {
|
||||||
readerSettingsBtn.addEventListener('click', (e) => {
|
readerSettingsBtn.addEventListener('click', (e) => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
|
if (readerWordPopup) readerWordPopup.classList.add('hidden');
|
||||||
if (readerSettingsPanel) {
|
if (readerSettingsPanel) {
|
||||||
const isHidden = readerSettingsPanel.classList.contains('hidden');
|
const isHidden = readerSettingsPanel.classList.contains('hidden');
|
||||||
readerSettingsPanel.classList.toggle('hidden', !isHidden);
|
readerSettingsPanel.classList.toggle('hidden', !isHidden);
|
||||||
if (isHidden) updateReaderSettingsUI();
|
if (isHidden) {
|
||||||
|
updateReaderSettingsUI();
|
||||||
|
positionSettingsPanel();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -3028,6 +3056,12 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
window.addEventListener('resize', () => {
|
||||||
|
if (readerSettingsPanel && !readerSettingsPanel.classList.contains('hidden')) {
|
||||||
|
positionSettingsPanel();
|
||||||
|
}
|
||||||
|
}, { passive: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
initReaderSettingsPanel();
|
initReaderSettingsPanel();
|
||||||
|
|||||||
Reference in New Issue
Block a user