diff --git a/exam/Scripts/settings.js b/exam/Scripts/settings.js index 9a4da35..2a8d8aa 100644 --- a/exam/Scripts/settings.js +++ b/exam/Scripts/settings.js @@ -11,11 +11,14 @@ document.addEventListener("DOMContentLoaded", () => { const themeLink = document.getElementById("theme-link"); const configFileInput = document.getElementById("config-file"); const clearConfigBtn = document.getElementById("clear-config-btn"); + const themeSelect = document.getElementById("theme-select"); let offsetTime = getCookie("offsetTime") || 0; let room = getCookie("room") || ""; let zoomLevel = getCookie("zoomLevel") || 1; let theme = getCookie("theme") || "dark"; + let currentTheme = getCookie("currentTheme") || "md3"; + let themeConfig = []; offsetTime = parseInt(offsetTime); roomElem.textContent = room; @@ -28,6 +31,29 @@ document.addEventListener("DOMContentLoaded", () => { themeToggle.checked = false; } + // 加载主题配置 + fetch('Styles/profile.json') + .then(response => response.json()) + .then(data => { + themeConfig = data.theme; + // 填充主题选择下拉框 + themeConfig.forEach(theme => { + const option = document.createElement('option'); + option.value = theme.path || theme.type; + option.textContent = theme.name; + themeSelect.appendChild(option); + }); + themeSelect.value = currentTheme; + updateThemeLink(); + }) + .catch(error => errorSystem.show('加载主题配置失败: ' + error.message)); + + function updateThemeLink() { + const themePath = currentTheme; + const isDark = !themeToggle.checked; + themeLink.href = `Styles/${themePath}/${isDark ? 'dark' : 'light'}.css`; + } + settingsBtn.addEventListener("click", () => { try { offsetTimeInput.value = offsetTime; @@ -57,10 +83,12 @@ document.addEventListener("DOMContentLoaded", () => { room = roomInput.value; zoomLevel = parseFloat(zoomInput.value); theme = themeToggle.checked ? "light" : "dark"; + currentTheme = themeSelect.value; setCookie("offsetTime", offsetTime, 365); setCookie("room", room, 365); setCookie("zoomLevel", zoomLevel, 365); setCookie("theme", theme, 365); + setCookie("currentTheme", currentTheme, 365); roomElem.textContent = room; document.body.style.zoom = zoomLevel; themeLink.href = theme === "light" ? "Styles/light.css" : "Styles/dark.css"; @@ -76,9 +104,13 @@ document.addEventListener("DOMContentLoaded", () => { } }); + themeSelect.addEventListener("change", () => { + currentTheme = themeSelect.value; + updateThemeLink(); + }); + themeToggle.addEventListener("change", () => { - const theme = themeToggle.checked ? "light" : "dark"; - themeLink.href = theme === "light" ? "Styles/light.css" : "Styles/dark.css"; + updateThemeLink(); }); configFileInput.addEventListener("change", (event) => { diff --git a/exam/Styles/ealg/dark.css b/exam/Styles/ealg/dark.css new file mode 100644 index 0000000..d67391c --- /dev/null +++ b/exam/Styles/ealg/dark.css @@ -0,0 +1,458 @@ +body { + font-family: 'Roboto', 'HarmonyOS Sans SC', sans-serif; + margin: 0; + padding: 0; + background: #1C1B1F; + color: #E6E1E5; + overflow: auto; +} + +body::-webkit-scrollbar { + display: none; +} + +#fullscreen-btn, #settings-btn { + position: absolute; + top: 20px; + padding: 12px 24px; + font-size: 1rem; + cursor: pointer; + background-color: #4A4458; + color: #E6E1E5; + border: none; + border-radius: 20px; + box-shadow: 0 1px 3px rgba(0,0,0,0.3); + transition: all 0.2s ease; + z-index: 1001; +} + +#fullscreen-btn { + right: 20px; +} + +#settings-btn { + right: 120px; +} + +#settings-btn:hover, #fullscreen-btn:hover { + background-color: #635B70; + transform: translateY(-1px); + box-shadow: 0 2px 6px rgba(0,0,0,0.4); +} + +.container { + padding: 24px; + max-width: 1400px; + margin: auto; + background-color: #333333; + border-radius: 28px; + box-shadow: 0 4px 8px rgba(0,0,0,0.2); +} + +h1 { + font-size: 3.5rem; + font-weight: 400; + text-align: left; + margin-bottom: 16px; + color: #E6E1E5; + display: flex; + align-items: center; + justify-content: space-between; +} + +#room { + font-size: 3.5rem; + font-weight: 400; + color: #E6E1E5; + margin-left: 20px; +} + +#message { + font-size: 1.5rem; + color: #D0BCFF; + margin-bottom: 24px; +} + +.content { + display: flex; + justify-content: space-between; + gap: 24px; +} + +.left-column, .right-column { + display: flex; + flex-direction: column; + gap: 24px; +} + +.left-column { + width: 45%; +} + +.right-column { + width: 50%; +} + +.clock-section, .info-section, .right-column { + background-color: #404040; + padding: 24px; + border-radius: 28px; + box-shadow: 0 2px 6px rgba(0,0,0,0.2); +} + +#current-time { + font-size: 8rem; + text-align: center; + color: #FFFFFF; + margin: 0; + font-weight: 400; +} + +#current-subject, #exam-timing, #remaining-time, #status { + font-size: 3rem; + margin: 16px 0; + text-align: left; + color: #FFFFFF; +} + +table { + width: 100%; + border-collapse: separate; + border-spacing: 0; + margin-top: 24px; + background-color: #4A4A4A; + border-radius: 16px; + overflow: hidden; +} + +th, td { + padding: 1px; + font-size: 1.8rem; + text-align: center; + border-bottom: 1px solid #555555; +} + +th { + background-color: transparent; + color: #FFFFFF; + font-weight: 500; +} + +tr:hover { + background-color: #555555; +} + +.exam-status-tag { + padding: 6px 12px; + border-radius: 8px; + font-size: 1.2rem; + font-weight: 500; +} + +.exam-status-进行中 { + background-color: #365534; + color: #90D480; +} + +.exam-status-即将开始 { + background-color: #594300; + color: #FFB960; +} + +.exam-status-已结束 { + background-color: #5C1130; + color: #FFB3B3; +} + +.exam-status-未开始 { + background-color: #4A4458; + color: #E6E1E5; +} + +#settings-modal { + display: none; + position: fixed; + z-index: 1000; + left: 0; + top: 0; + width: 100%; + height: 100%; + background-color: rgba(0,0,0,0.6); + backdrop-filter: blur(8px); +} + +#settings-modal-content { + background: #404040; + padding: 32px 48px 32px 32px; + margin: 32px auto; + border-radius: 28px; + width: 600px; + max-height: 60vh; + overflow-y: auto; + box-shadow: 0 8px 24px rgba(0,0,0,0.4); +} + +#settings-modal-content::-webkit-scrollbar { + width: 8px; +} + +#settings-modal-content::-webkit-scrollbar-track { + background: transparent; + margin: 4px; +} + +#settings-modal-content::-webkit-scrollbar-thumb { + background: #4A4458; + border-radius: 8px; + border: 2px solid #2B2930; +} + +#settings-modal-content::-webkit-scrollbar-thumb:hover { + background: #635B70; +} + +#settings-modal-content h3 { + margin: 0 0 24px; + color: #E6E1E5; + font-size: 24px; + font-weight: 400; +} + +#settings-modal-content label { + display: flex; + align-items: center; + gap: 16px; + margin: 16px 0; + font-size: 16px; + color: #E6E1E5; +} + +#settings-modal-content input[type="number"], +#settings-modal-content input[type="text"] { + font-size: 1.5rem; + padding: 12px 16px; + margin: 8px 0 24px; + width: 100%; + box-sizing: border-box; + border: 2px solid #4A4458; + border-radius: 12px; + background-color: #332D41; + color: #E6E1E5; + transition: all 0.2s ease; +} + +#settings-modal-content input:focus { + outline: none; + border-color: #D0BCFF; + background-color: #4A4458; +} + +.button-group { + display: flex; + justify-content: flex-end; + gap: 16px; + margin-top: 32px; +} + +#save-settings-btn, #close-settings-btn { + padding: 12px 24px; + border-radius: 20px; + font-size: 16px; + font-weight: 500; + border: none; + cursor: pointer; + transition: all 0.2s ease; +} + +#save-settings-btn { + background-color: #D0BCFF; + color: #1C1B1F; +} + +#close-settings-btn { + background-color: #4A4458; + color: #E6E1E5; +} + +#save-settings-btn:hover, #close-settings-btn:hover { + transform: translateY(-1px); + box-shadow: 0 2px 6px rgba(0,0,0,0.4); +} + +.error-container { + position: fixed; + bottom: 24px; + left: 50%; + transform: translateX(-50%); + background: #5C1130; + color: #FFB3B3; + padding: 16px 24px; + border-radius: 16px; + display: none; + z-index: 10001; + box-shadow: 0 4px 12px rgba(0,0,0,0.3); + animation: slideUp 0.3s ease; +} + +.switch { + position: relative; + display: inline-block; + width: 52px; + height: 32px; +} + +.slider { + position: absolute; + cursor: pointer; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: #4A4458; + transition: .3s; + border-radius: 16px; +} + +.slider:before { + position: absolute; + content: ""; + height: 24px; + width: 24px; + left: 4px; + bottom: 4px; + background-color: #E6E1E5; + transition: .3s; + border-radius: 50%; +} + +input:checked + .slider { + background-color: #D0BCFF; +} + +input:checked + .slider:before { + transform: translateX(20px); + background-color: #1C1B1F; +} + +.config-file-container { + margin: 24px 0; + padding: 24px; + border: 2px solid #555555; + border-radius: 20px; + background-color: #4A4A4A; + transition: all 0.2s ease; +} + +.config-file-container:hover { + border-color: #D0BCFF; + box-shadow: 0 2px 8px rgba(0,0,0,0.3); +} + +.config-file-container input[type="file"] { + max-width: 100%; + width: auto; + box-sizing: border-box; + padding: 12px; + border: 2px dashed #4A4458; + border-radius: 16px; + background-color: #332D41; + color: #E6E1E5; + cursor: pointer; + transition: all 0.2s ease; +} + +.config-file-container input[type="file"]::-webkit-file-upload-button { + padding: 8px 16px; + margin-right: 12px; + background-color: #4A4458; + color: #E6E1E5; + border: none; + border-radius: 12px; + cursor: pointer; + transition: all 0.2s ease; +} + +.config-file-container input[type="file"]::-webkit-file-upload-button:hover { + background-color: #635B70; +} + +.file-hint { + margin-top: 12px; + font-size: 14px; + color: #CAC4D0; + line-height: 1.5; +} + +.config-control-btn { + margin-top: 20px; + padding: 12px 28px; + background-color: #4A4458; + color: #E6E1E5; + border: none; + border-radius: 24px; + cursor: pointer; + font-size: 14px; + font-weight: 500; + transition: all 0.2s ease; + display: inline-flex; + align-items: center; + justify-content: center; +} + +.config-control-btn:hover { + background-color: #635B70; + transform: translateY(-1px); + box-shadow: 0 2px 8px rgba(0,0,0,0.4); +} + +.theme-toggle-container { + margin: 24px 0; + display: flex; + flex-direction: column; + gap: 16px; +} + +#theme-select { + width: 100%; + padding: 12px 16px; + font-size: 1.2rem; + background-color: #404040; + color: #FFFFFF; + border: 2px solid #555555; + border-radius: 12px; + cursor: pointer; + appearance: none; + -webkit-appearance: none; + background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); + background-repeat: no-repeat; + background-position: right 16px center; + background-size: 16px; +} + +#theme-select:hover { + background-color: #4A4A4A; + border-color: #666666; +} + +#theme-select:focus { + outline: none; + border-color: #D0BCFF; + background-color: #4A4A4A; +} + +#theme-select option { + background-color: #404040; + color: #FFFFFF; + padding: 12px; +} + +#theme-select option:hover, +#theme-select option:focus { + background-color: #4A4A4A; +} + +.theme-toggle-container label { + font-size: 16px; + color: #E6E1E5; + margin-bottom: 8px; +} diff --git a/exam/Styles/ealg/light.css b/exam/Styles/ealg/light.css new file mode 100644 index 0000000..ebc7250 --- /dev/null +++ b/exam/Styles/ealg/light.css @@ -0,0 +1,458 @@ +body { + font-family: 'Roboto', 'HarmonyOS Sans SC', sans-serif; + margin: 0; + padding: 0; + background: #FFFBFE; + color: #1C1B1F; + overflow: auto; +} + +body::-webkit-scrollbar { + display: none; +} + +#fullscreen-btn, #settings-btn { + position: absolute; + top: 20px; + padding: 12px 24px; + font-size: 1rem; + cursor: pointer; + background-color: #E8DEF8; + color: #1C1B1F; + border: none; + border-radius: 20px; + box-shadow: 0 1px 3px rgba(0,0,0,0.1); + transition: all 0.2s ease; + z-index: 1001; +} + +#fullscreen-btn { + right: 20px; +} + +#settings-btn { + right: 120px; +} + +#settings-btn:hover, #fullscreen-btn:hover { + background-color: #D0BCFF; + transform: translateY(-1px); + box-shadow: 0 2px 6px rgba(0,0,0,0.2); +} + +.container { + padding: 24px; + max-width: 1400px; + margin: auto; + background-color: #FFFFFF; + border-radius: 28px; + box-shadow: 0 4px 8px rgba(0,0,0,0.1); +} + +h1 { + font-size: 3.5rem; + font-weight: 400; + text-align: left; + margin-bottom: 16px; + color: #1C1B1F; + display: flex; + align-items: center; + justify-content: space-between; +} + +#room { + font-size: 3.5rem; + font-weight: 400; + color: #1C1B1F; + margin-left: 20px; +} + +#message { + font-size: 1.5rem; + color: #6750A4; + margin-bottom: 24px; +} + +.content { + display: flex; + justify-content: space-between; + gap: 24px; +} + +.left-column, .right-column { + display: flex; + flex-direction: column; + gap: 24px; +} + +.left-column { + width: 45%; +} + +.right-column { + width: 50%; +} + +.clock-section, .info-section, .right-column { + background-color: #FFFFFF; + padding: 24px; + border-radius: 28px; + box-shadow: 0 2px 6px rgba(0,0,0,0.1); +} + +#current-time { + font-size: 8rem; + text-align: center; + color: #000000; + margin: 0; + font-weight: 400; +} + +#current-subject, #exam-timing, #remaining-time, #status { + font-size: 3rem; + margin: 16px 0; + text-align: left; + color: #000000; +} + +table { + width: 100%; + border-collapse: separate; + border-spacing: 0; + margin-top: 24px; + background-color: #FFFFFF; + border-radius: 16px; + overflow: hidden; +} + +th, td { + padding: 1px; + font-size: 1.8rem; + text-align: center; + border-bottom: 1px solid #E8DEF8; +} + +th { + background-color: #E8DEF8; + color: #1C1B1F; + font-weight: 500; +} + +tr:hover { + background-color: #F7F2FA; +} + +.exam-status-tag { + padding: 6px 12px; + border-radius: 8px; + font-size: 1.2rem; + font-weight: 500; +} + +.exam-status-进行中 { + background-color: #DDF4D7; + color: #365534; +} + +.exam-status-即将开始 { + background-color: #FFF2D6; + color: #594300; +} + +.exam-status-已结束 { + background-color: #FFDAD6; + color: #5C1130; +} + +.exam-status-未开始 { + background-color: #E8DEF8; + color: #1C1B1F; +} + +#settings-modal { + display: none; + position: fixed; + z-index: 1000; + left: 0; + top: 0; + width: 100%; + height: 100%; + background-color: rgba(0,0,0,0.3); + backdrop-filter: blur(8px); +} + +#settings-modal-content { + background: #FFFFFF; + padding: 32px 48px 32px 32px; + margin: 32px auto; + border-radius: 28px; + width: 600px; + max-height: 60vh; + overflow-y: auto; + box-shadow: 0 8px 24px rgba(0,0,0,0.2); +} + +#settings-modal-content::-webkit-scrollbar { + width: 8px; +} + +#settings-modal-content::-webkit-scrollbar-track { + background: transparent; + margin: 4px; +} + +#settings-modal-content::-webkit-scrollbar-thumb { + background: #E8DEF8; + border-radius: 8px; + border: 2px solid #FFFFFF; +} + +#settings-modal-content::-webkit-scrollbar-thumb:hover { + background: #D0BCFF; +} + +#settings-modal-content h3 { + margin: 0 0 24px; + color: #1C1B1F; + font-size: 24px; + font-weight: 400; +} + +#settings-modal-content label { + display: flex; + align-items: center; + gap: 16px; + margin: 16px 0; + font-size: 16px; + color: #1C1B1F; +} + +#settings-modal-content input[type="number"], +#settings-modal-content input[type="text"] { + font-size: 1.5rem; + padding: 12px 16px; + margin: 8px 0 24px; + width: 100%; + box-sizing: border-box; + border: 2px solid #E8DEF8; + border-radius: 12px; + background-color: #FFFFFF; + color: #1C1B1F; + transition: all 0.2s ease; +} + +#settings-modal-content input:focus { + outline: none; + border-color: #6750A4; + background-color: #F7F2FA; +} + +.button-group { + display: flex; + justify-content: flex-end; + gap: 16px; + margin-top: 32px; +} + +#save-settings-btn, #close-settings-btn { + padding: 12px 24px; + border-radius: 20px; + font-size: 16px; + font-weight: 500; + border: none; + cursor: pointer; + transition: all 0.2s ease; +} + +#save-settings-btn { + background-color: #6750A4; + color: #FFFFFF; +} + +#close-settings-btn { + background-color: #E8DEF8; + color: #1C1B1F; +} + +#save-settings-btn:hover, #close-settings-btn:hover { + transform: translateY(-1px); + box-shadow: 0 2px 6px rgba(0,0,0,0.2); +} + +.error-container { + position: fixed; + bottom: 24px; + left: 50%; + transform: translateX(-50%); + background: #FFDAD6; + color: #5C1130; + padding: 16px 24px; + border-radius: 16px; + display: none; + z-index: 10001; + box-shadow: 0 4px 12px rgba(0,0,0,0.1); + animation: slideUp 0.3s ease; +} + +.switch { + position: relative; + display: inline-block; + width: 52px; + height: 32px; +} + +.slider { + position: absolute; + cursor: pointer; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: #E8DEF8; + transition: .3s; + border-radius: 16px; +} + +.slider:before { + position: absolute; + content: ""; + height: 24px; + width: 24px; + left: 4px; + bottom: 4px; + background-color: #FFFFFF; + transition: .3s; + border-radius: 50%; +} + +input:checked + .slider { + background-color: #6750A4; +} + +input:checked + .slider:before { + transform: translateX(20px); + background-color: #FFFFFF; +} + +.config-file-container { + margin: 24px 0; + padding: 24px; + border: 2px solid #E8DEF8; + border-radius: 20px; + background-color: #F7F2FA; + transition: all 0.2s ease; +} + +.config-file-container:hover { + border-color: #6750A4; + box-shadow: 0 2px 8px rgba(0,0,0,0.1); +} + +.config-file-container input[type="file"] { + max-width: 100%; + width: auto; + box-sizing: border-box; + padding: 12px; + border: 2px dashed #E8DEF8; + border-radius: 16px; + background-color: #FFFFFF; + color: #1C1B1F; + cursor: pointer; + transition: all 0.2s ease; +} + +.config-file-container input[type="file"]::-webkit-file-upload-button { + padding: 8px 16px; + margin-right: 12px; + background-color: #E8DEF8; + color: #1C1B1F; + border: none; + border-radius: 12px; + cursor: pointer; + transition: all 0.2s ease; +} + +.config-file-container input[type="file"]::-webkit-file-upload-button:hover { + background-color: #D0BCFF; +} + +.file-hint { + margin-top: 12px; + font-size: 14px; + color: #49454F; + line-height: 1.5; +} + +.config-control-btn { + margin-top: 20px; + padding: 12px 28px; + background-color: #E8DEF8; + color: #1C1B1F; + border: none; + border-radius: 24px; + cursor: pointer; + font-size: 14px; + font-weight: 500; + transition: all 0.2s ease; + display: inline-flex; + align-items: center; + justify-content: center; +} + +.config-control-btn:hover { + background-color: #D0BCFF; + transform: translateY(-1px); + box-shadow: 0 2px 8px rgba(0,0,0,0.15); +} + +.theme-toggle-container { + margin: 24px 0; + display: flex; + flex-direction: column; + gap: 16px; +} + +#theme-select { + width: 100%; + padding: 12px 16px; + font-size: 1.2rem; + background-color: #FFFFFF; + color: #1C1B1F; + border: 2px solid #E8DEF8; + border-radius: 12px; + cursor: pointer; + appearance: none; + -webkit-appearance: none; + background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); + background-repeat: no-repeat; + background-position: right 16px center; + background-size: 16px; +} + +#theme-select:hover { + background-color: #F7F2FA; + border-color: #D0BCFF; +} + +#theme-select:focus { + outline: none; + border-color: #6750A4; + background-color: #F7F2FA; +} + +#theme-select option { + background-color: #FFFFFF; + color: #1C1B1F; + padding: 12px; +} + +#theme-select option:hover, +#theme-select option:focus { + background-color: #F7F2FA; +} + +.theme-toggle-container label { + font-size: 16px; + color: #1C1B1F; + margin-bottom: 8px; +} diff --git a/exam/Styles/dark.css b/exam/Styles/md3/dark.css similarity index 85% rename from exam/Styles/dark.css rename to exam/Styles/md3/dark.css index 069813d..4050392 100644 --- a/exam/Styles/dark.css +++ b/exam/Styles/md3/dark.css @@ -404,3 +404,55 @@ input:checked + .slider:before { transform: translateY(-1px); box-shadow: 0 2px 8px rgba(0,0,0,0.4); } + +.theme-toggle-container { + margin: 24px 0; + display: flex; + flex-direction: column; + gap: 16px; +} + +#theme-select { + width: 100%; + padding: 12px 16px; + font-size: 1.2rem; + background-color: #332D41; + color: #E6E1E5; + border: 2px solid #4A4458; + border-radius: 12px; + cursor: pointer; + appearance: none; + -webkit-appearance: none; + background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); + background-repeat: no-repeat; + background-position: right 16px center; + background-size: 16px; +} + +#theme-select:hover { + background-color: #4A4458; + border-color: #635B70; +} + +#theme-select:focus { + outline: none; + border-color: #D0BCFF; + background-color: #4A4458; +} + +#theme-select option { + background-color: #332D41; + color: #E6E1E5; + padding: 12px; +} + +#theme-select option:hover, +#theme-select option:focus { + background-color: #4A4458; +} + +.theme-toggle-container label { + font-size: 16px; + color: #E6E1E5; + margin-bottom: 8px; +} diff --git a/exam/Styles/md3/light.css b/exam/Styles/md3/light.css new file mode 100644 index 0000000..f14f50b --- /dev/null +++ b/exam/Styles/md3/light.css @@ -0,0 +1,458 @@ +body { + font-family: 'Roboto', 'HarmonyOS Sans SC', sans-serif; + margin: 0; + padding: 0; + background: #FFFBFE; + color: #1C1B1F; + overflow: auto; +} + +body::-webkit-scrollbar { + display: none; +} + +#fullscreen-btn, #settings-btn { + position: absolute; + top: 20px; + padding: 12px 24px; + font-size: 1rem; + cursor: pointer; + background-color: #E8DEF8; + color: #1C1B1F; + border: none; + border-radius: 20px; + box-shadow: 0 1px 3px rgba(0,0,0,0.1); + transition: all 0.2s ease; + z-index: 1001; +} + +#fullscreen-btn { + right: 20px; +} + +#settings-btn { + right: 120px; +} + +#settings-btn:hover, #fullscreen-btn:hover { + background-color: #D0BCFF; + transform: translateY(-1px); + box-shadow: 0 2px 6px rgba(0,0,0,0.2); +} + +.container { + padding: 24px; + max-width: 1400px; + margin: auto; + background-color: #F7F2FA; + border-radius: 28px; + box-shadow: 0 4px 8px rgba(0,0,0,0.1); +} + +h1 { + font-size: 3.5rem; + font-weight: 400; + text-align: left; + margin-bottom: 16px; + color: #1C1B1F; + display: flex; + align-items: center; + justify-content: space-between; +} + +#room { + font-size: 3.5rem; + font-weight: 400; + color: #1C1B1F; + margin-left: 20px; +} + +#message { + font-size: 1.5rem; + color: #6750A4; + margin-bottom: 24px; +} + +.content { + display: flex; + justify-content: space-between; + gap: 24px; +} + +.left-column, .right-column { + display: flex; + flex-direction: column; + gap: 24px; +} + +.left-column { + width: 45%; +} + +.right-column { + width: 50%; +} + +.clock-section, .info-section, .right-column { + background-color: #FFFFFF; + padding: 24px; + border-radius: 28px; + box-shadow: 0 2px 6px rgba(0,0,0,0.1); +} + +#current-time { + font-size: 8rem; + text-align: center; + color: #6750A4; + margin: 0; + font-weight: 400; +} + +#current-subject, #exam-timing, #remaining-time, #status { + font-size: 3rem; + margin: 16px 0; + text-align: left; + color: #1C1B1F; +} + +table { + width: 100%; + border-collapse: separate; + border-spacing: 0; + margin-top: 24px; + background-color: #FFFFFF; + border-radius: 16px; + overflow: hidden; +} + +th, td { + padding: 1px; + font-size: 1.8rem; + text-align: center; + border-bottom: 1px solid #E8DEF8; +} + +th { + background-color: #E8DEF8; + color: #1C1B1F; + font-weight: 500; +} + +tr:hover { + background-color: #F7F2FA; +} + +.exam-status-tag { + padding: 6px 12px; + border-radius: 8px; + font-size: 1.2rem; + font-weight: 500; +} + +.exam-status-进行中 { + background-color: #DDF4D7; + color: #365534; +} + +.exam-status-即将开始 { + background-color: #FFF2D6; + color: #594300; +} + +.exam-status-已结束 { + background-color: #FFDAD6; + color: #5C1130; +} + +.exam-status-未开始 { + background-color: #E8DEF8; + color: #1C1B1F; +} + +#settings-modal { + display: none; + position: fixed; + z-index: 1000; + left: 0; + top: 0; + width: 100%; + height: 100%; + background-color: rgba(0,0,0,0.3); + backdrop-filter: blur(8px); +} + +#settings-modal-content { + background: #FFFFFF; + padding: 32px 48px 32px 32px; + margin: 32px auto; + border-radius: 28px; + width: 600px; + max-height: 60vh; + overflow-y: auto; + box-shadow: 0 8px 24px rgba(0,0,0,0.2); +} + +#settings-modal-content::-webkit-scrollbar { + width: 8px; +} + +#settings-modal-content::-webkit-scrollbar-track { + background: transparent; + margin: 4px; +} + +#settings-modal-content::-webkit-scrollbar-thumb { + background: #E8DEF8; + border-radius: 8px; + border: 2px solid #FFFFFF; +} + +#settings-modal-content::-webkit-scrollbar-thumb:hover { + background: #D0BCFF; +} + +#settings-modal-content h3 { + margin: 0 0 24px; + color: #1C1B1F; + font-size: 24px; + font-weight: 400; +} + +#settings-modal-content label { + display: flex; + align-items: center; + gap: 16px; + margin: 16px 0; + font-size: 16px; + color: #1C1B1F; +} + +#settings-modal-content input[type="number"], +#settings-modal-content input[type="text"] { + font-size: 1.5rem; + padding: 12px 16px; + margin: 8px 0 24px; + width: 100%; + box-sizing: border-box; + border: 2px solid #E8DEF8; + border-radius: 12px; + background-color: #FFFFFF; + color: #1C1B1F; + transition: all 0.2s ease; +} + +#settings-modal-content input:focus { + outline: none; + border-color: #6750A4; + background-color: #F7F2FA; +} + +.button-group { + display: flex; + justify-content: flex-end; + gap: 16px; + margin-top: 32px; +} + +#save-settings-btn, #close-settings-btn { + padding: 12px 24px; + border-radius: 20px; + font-size: 16px; + font-weight: 500; + border: none; + cursor: pointer; + transition: all 0.2s ease; +} + +#save-settings-btn { + background-color: #6750A4; + color: #FFFFFF; +} + +#close-settings-btn { + background-color: #E8DEF8; + color: #1C1B1F; +} + +#save-settings-btn:hover, #close-settings-btn:hover { + transform: translateY(-1px); + box-shadow: 0 2px 6px rgba(0,0,0,0.2); +} + +.error-container { + position: fixed; + bottom: 24px; + left: 50%; + transform: translateX(-50%); + background: #FFDAD6; + color: #5C1130; + padding: 16px 24px; + border-radius: 16px; + display: none; + z-index: 10001; + box-shadow: 0 4px 12px rgba(0,0,0,0.1); + animation: slideUp 0.3s ease; +} + +.switch { + position: relative; + display: inline-block; + width: 52px; + height: 32px; +} + +.slider { + position: absolute; + cursor: pointer; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: #E8DEF8; + transition: .3s; + border-radius: 16px; +} + +.slider:before { + position: absolute; + content: ""; + height: 24px; + width: 24px; + left: 4px; + bottom: 4px; + background-color: #FFFFFF; + transition: .3s; + border-radius: 50%; +} + +input:checked + .slider { + background-color: #6750A4; +} + +input:checked + .slider:before { + transform: translateX(20px); + background-color: #FFFFFF; +} + +.config-file-container { + margin: 24px 0; + padding: 24px; + border: 2px solid #E8DEF8; + border-radius: 20px; + background-color: #F7F2FA; + transition: all 0.2s ease; +} + +.config-file-container:hover { + border-color: #6750A4; + box-shadow: 0 2px 8px rgba(0,0,0,0.1); +} + +.config-file-container input[type="file"] { + max-width: 100%; + width: auto; + box-sizing: border-box; + padding: 12px; + border: 2px dashed #E8DEF8; + border-radius: 16px; + background-color: #FFFFFF; + color: #1C1B1F; + cursor: pointer; + transition: all 0.2s ease; +} + +.config-file-container input[type="file"]::-webkit-file-upload-button { + padding: 8px 16px; + margin-right: 12px; + background-color: #E8DEF8; + color: #1C1B1F; + border: none; + border-radius: 12px; + cursor: pointer; + transition: all 0.2s ease; +} + +.config-file-container input[type="file"]::-webkit-file-upload-button:hover { + background-color: #D0BCFF; +} + +.file-hint { + margin-top: 12px; + font-size: 14px; + color: #49454F; + line-height: 1.5; +} + +.config-control-btn { + margin-top: 20px; + padding: 12px 28px; + background-color: #E8DEF8; + color: #1C1B1F; + border: none; + border-radius: 24px; + cursor: pointer; + font-size: 14px; + font-weight: 500; + transition: all 0.2s ease; + display: inline-flex; + align-items: center; + justify-content: center; +} + +.config-control-btn:hover { + background-color: #D0BCFF; + transform: translateY(-1px); + box-shadow: 0 2px 8px rgba(0,0,0,0.15); +} + +.theme-toggle-container { + margin: 24px 0; + display: flex; + flex-direction: column; + gap: 16px; +} + +#theme-select { + width: 100%; + padding: 12px 16px; + font-size: 1.2rem; + background-color: #FFFFFF; + color: #1C1B1F; + border: 2px solid #E8DEF8; + border-radius: 12px; + cursor: pointer; + appearance: none; + -webkit-appearance: none; + background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); + background-repeat: no-repeat; + background-position: right 16px center; + background-size: 16px; +} + +#theme-select:hover { + background-color: #F7F2FA; + border-color: #D0BCFF; +} + +#theme-select:focus { + outline: none; + border-color: #6750A4; + background-color: #F7F2FA; +} + +#theme-select option { + background-color: #FFFFFF; + color: #1C1B1F; + padding: 12px; +} + +#theme-select option:hover, +#theme-select option:focus { + background-color: #F7F2FA; +} + +.theme-toggle-container label { + font-size: 16px; + color: #1C1B1F; + margin-bottom: 8px; +} diff --git a/exam/Styles/old/background.jpg b/exam/Styles/old/background.jpg new file mode 100644 index 0000000..88e4466 Binary files /dev/null and b/exam/Styles/old/background.jpg differ diff --git a/exam/Styles/old/background_light.jpg b/exam/Styles/old/background_light.jpg new file mode 100644 index 0000000..ff45a61 Binary files /dev/null and b/exam/Styles/old/background_light.jpg differ diff --git a/exam/Styles/old/dark.css b/exam/Styles/old/dark.css new file mode 100644 index 0000000..04d46a4 --- /dev/null +++ b/exam/Styles/old/dark.css @@ -0,0 +1,517 @@ +body { + font-family: 'HarmonyOS Sans SC Regular', 'Roboto', Arial, sans-serif; + margin: 0; + padding: 0; + background: url('background.jpg') no-repeat center center fixed; /* 更新路径 */ + background-size: cover; + animation: fadeIn 1s; + color: #e0e0e0; + overflow: auto; /* 允许页面滚动 */ +} + +/* 隐藏滚动条 */ +body::-webkit-scrollbar { + display: none; +} + +@keyframes fadeIn { + from { opacity: 0; } + to { opacity: 1; } +} + +#fullscreen-btn, #settings-btn { + position: absolute; + top: 20px; + padding: 10px 20px; + font-size: 1rem; + cursor: pointer; + background-color: #1f1f1f; + color: #e0e0e0; + border: 1px solid #333; + border-radius: 5px; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); + transition: background-color 0.3s ease, transform 0.3s ease; + z-index: 1001; +} + +#fullscreen-btn { + right: 20px; +} + +#settings-btn { + right: 120px; /* Fullscreen button's left */ +} + +#settings-btn:hover, #fullscreen-btn:hover { + background-color: #333; + transform: scale(1.05); +} + +.container { + padding: 20px; + max-width: 1400px; /* 增加主体部分宽度 */ + margin: auto; + background-color: rgba(0, 0, 0, 0.4); /* 使用rgba设置背景透明度为80% */ +} + +h1 { + font-size: 3.5rem; + font-weight: bold; + text-align: left; + margin-bottom: 10px; + color: #e0e0e0; + display: flex; + align-items: center; + justify-content: space-between; +} + +#room { + font-size: 3.5rem; + font-weight: bold; + color: #e0e0e0; + position: relative; + right: 0; + margin-left: 20px; /* 调整位置使其保持在container中 */ +} + +#message { + font-size: 1.5rem; + color: #16a3d1; + margin-bottom: 20px; +} + +.content { + display: flex; + justify-content: space-between; + gap: 3px; /* 板块间隔3px */ +} + +.left-column, .right-column { + display: flex; + flex-direction: column; + gap: 3px; +} + +.left-column { + width: 45%; +} + +.right-column { + width: 50%; +} + +.clock-section, .info-section, .right-column { + background-color: rgba(31, 31, 31, 0.5); /* 亚克力效果 */ + backdrop-filter: blur(10px); + padding: 20px; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); + border-radius: 8px; + margin-bottom: 20px; /* 增加时钟和信息板块之间的间隔 */ +} + +#current-time { + font-size: 8rem; + text-align: center; + color: #7cc3fb; + margin: 0; + font-weight: bold; +} + +#current-subject, #exam-timing, #remaining-time, #status { + font-size: 3rem; + margin: 10px 0; + text-align: left; + color: #e0e0e0; +} + +table { + width: 100%; + border-collapse: collapse; + margin-top: 20px; + border: 1px solid rgba(255, 255, 255, 0.75); + background-color: rgba(31, 31, 31, 0.5); +} + +th, td { + border: 1px solid #fff; + padding: 0px; /* 缩短行高 */ + font-size: 1.8rem; + text-align: center; +} + +th { + background-color: #333; + color: #7cc3fb; + font-weight: bold; + border-bottom: 2px solid #fff; +} + +tr:hover { + background-color: #333; +} + +table { + border-radius: 8px; + overflow: hidden; +} + +td { + border-bottom: 1px solid #fff; +} + +td:first-child { + border-top-left-radius: 8px; + border-bottom-left-radius: 8px; +} + +td:last-child { + border-top-right-radius: 8px; + border-bottom-right-radius: 8px; +} + +.exam-status-tag { + padding: 3px 6px; + border-radius: 4px; + font-size: 1.2rem; + display: inline-block; + min-width: 60px; +} + +.exam-status-进行中 { + background-color: rgba(91, 168, 56, 0.2); + color: #5ba838; +} + +.exam-status-即将开始 { + background-color: rgba(254, 153, 1, 0.2); + color: #fe9901; +} + +.exam-status-已结束 { + background-color: rgba(236, 4, 52, 0.2); + color: #ec0434; +} + +.exam-status-未开始 { + background-color: rgba(238, 238, 91, 0.2); + color: #eeee5b; +} + +#settings-modal { + display: none; + position: fixed; + z-index: 1000; + left: 0; + top: 0; + width: 100%; + height: 100%; + overflow: auto; + background-color: rgb(0, 0, 0); + background-color: rgba(0, 0, 0, 0.4); + padding-top: 60px; +} + +#settings-modal-content { + background: rgba(31, 31, 31, 0.95); + padding: 25px; + margin: 25px auto; + border-radius: 12px; + border: 1px solid #444; + backdrop-filter: blur(8px); + max-width: 600px; + max-height: 60vh; /* 限制最大高度 */ + overflow-y: auto; /* 允许垂直滚动 */ + animation: fadeIn 0.5s ease; +} + +/* 设置滚动条样式 */ +#settings-modal-content::-webkit-scrollbar { + width: 8px; +} + +#settings-modal-content::-webkit-scrollbar-track { + background: rgba(31, 31, 31, 0.5); + border-radius: 4px; +} + +#settings-modal-content::-webkit-scrollbar-thumb { + background: #666; + border-radius: 4px; +} + +#settings-modal-content::-webkit-scrollbar-thumb:hover { + background: #888; +} + +@keyframes fadeIn { + from { opacity: 0; transform: translateY(-20px); } + to { opacity: 1; transform: translateY(0); } +} + +@keyframes fadeOut { + from { opacity: 1; transform: translateY(0); } + to { opacity: 0; transform: translateY(-20px); } +} + +.fade-out { + animation: fadeOut 0.3s ease; +} + +#settings-modal-content h3 { + margin: 0 0 20px; + color: #e0e0e0; + font-size: 20px; +} + +#settings-modal-content label { + display: flex; + align-items: center; + gap: 10px; + margin: 12px 0; + font-size: 16px; + color: #b0b0b0; +} + +#settings-modal-content label[for="offset-time"], +#settings-modal-content label[for="room-input"], +#settings-modal-content label[for="zoom-input"] { + justify-content: space-between; +} + +#settings-modal-content input[type="number"], +#settings-modal-content input[type="text"] { + flex-grow: 1; + margin-left: 10px; + font-size: 1.5rem; + padding: 10px; + margin-top: 10px; + margin-bottom: 20px; + width: 100%; + box-sizing: border-box; + border: 1px solid #555; + border-radius: 5px; + background-color: #222; + color: #e0e0e0; +} + +#settings-modal-content input:focus { + outline: none; + border-color: #007acc; + box-shadow: 0 0 0 1px #007acc; +} + +.button-group { + display: flex; + justify-content: flex-end; + gap: 10px; +} + +#settings-modal-content button { + background: linear-gradient(135deg, #3498db, #2980b9); + color: white; + border: none; + padding: 12px 24px; + border-radius: 8px; + cursor: pointer; + font-size: 15px; + font-weight: 500; + transition: all 0.2s ease; + box-shadow: 0 4px 12px rgba(52,152,219,0.25); +} + +#settings-modal-content button:hover { + transform: translateY(-1px); + box-shadow: 0 6px 16px rgba(52,152,219,0.35); +} + +#close-settings-btn { + padding: 10px 20px; + font-size: 2rem; + cursor: pointer; + background-color: #d9534f; + color: white; + border: none; + border-radius: 5px; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); + transition: background-color 0.3s ease; +} + +#close-settings-btn:hover { + background-color: #c9302c; +} + +.error-container { + position: fixed; + bottom: 0; + left: 0; + right: 0; + background: #ff6b6b; + color: white; + padding: 16px; + display: none; + z-index: 10001; + animation: slideUp 0.3s ease; +} + +@keyframes slideUp { + from { transform: translateY(100%); } + to { transform: translateY(0); } +} + +.error-content { + max-width: 800px; + margin: 0 auto; + font-size: 15px; + display: flex; + align-items: center; + gap: 12px; +} + +.error-content:before { + content: '!'; + display: flex; + align-items: center; + justify-content: center; + width: 24px; + height: 24px; + background: white; + color: #ff6b6b; + border-radius: 50%; + font-weight: bold; +} + +.switch { + position: relative; + display: inline-block; + width: 60px; + height: 34px; +} + +.switch input { + opacity: 0; + width: 0; + height: 0; +} + +.slider { + position: absolute; + cursor: pointer; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: #ccc; + transition: .4s; + border-radius: 34px; +} + +.slider:before { + position: absolute; + content: ""; + height: 26px; + width: 26px; + left: 4px; + bottom: 4px; + background-color: white; + transition: .4s; + border-radius: 50%; +} + +input:checked + .slider { + background-color: #2196F3; +} + +input:checked + .slider:before { + transform: translateX(26px); +} + +.theme-toggle-container { + display: flex; + align-items: center; + justify-content: space-between; + gap: 10px; +} + +#theme-select { + padding: 8px 12px; + font-size: 14px; + border: 1px solid #555; + border-radius: 4px; + background-color: #222; + color: #e0e0e0; + cursor: pointer; + outline: none; + width: 120px; +} + +#theme-select:hover { + border-color: #666; +} + +#theme-select:focus { + border-color: #007acc; + box-shadow: 0 0 0 1px #007acc; +} + +#theme-select option { + background-color: #222; + color: #e0e0e0; + padding: 8px; +} + +.config-file-container { + margin: 12px 0; + padding: 10px; + border: 1px solid #555; + border-radius: 5px; + background-color: rgba(31, 31, 31, 0.5); + box-sizing: border-box; + max-width: 100%; +} + +.config-file-container label { + display: block; + margin-bottom: 8px; + color: #e0e0e0; +} + +.config-file-container input[type="file"] { + display: block; + width: calc(100% - 16px); /* 减去padding的宽度 */ + padding: 8px; + border: 1px solid #555; + border-radius: 4px; + background-color: #222; + color: #e0e0e0; + cursor: pointer; + box-sizing: border-box; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.config-file-container input[type="file"]:hover { + background-color: #333; +} + +.file-hint { + margin-top: 4px; + font-size: 12px; + color: #888; +} + +.config-control-btn { + margin-top: 10px; + padding: 8px 16px; + background-color: #d9534f; + color: white; + border: none; + border-radius: 4px; + cursor: pointer; + font-size: 14px; + transition: background-color 0.3s ease; +} + +.config-control-btn:hover { + background-color: #c9302c; +} diff --git a/exam/Styles/old/light.css b/exam/Styles/old/light.css new file mode 100644 index 0000000..993f126 --- /dev/null +++ b/exam/Styles/old/light.css @@ -0,0 +1,522 @@ +body { + font-family: 'HarmonyOS Sans SC Regular', 'Roboto', Arial, sans-serif; + margin: 0; + padding: 0; + background: url('background_light.jpg') no-repeat center center fixed; + background-size: cover; + animation: fadeIn 1s; + color: #333; + overflow: auto; +} + +body::-webkit-scrollbar { + display: none; +} + +@keyframes fadeIn { + from { opacity: 0; } + to { opacity: 1; } +} + +#fullscreen-btn, #settings-btn { + position: absolute; + top: 20px; + padding: 10px 20px; + font-size: 1rem; + cursor: pointer; + background-color: #f0f0f0; + color: #333; + border: 1px solid #ccc; + border-radius: 5px; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); + transition: background-color 0.3s ease, transform 0.3s ease; + z-index: 1001; +} + +#fullscreen-btn { + right: 20px; +} + +#settings-btn { + right: 120px; +} + +#settings-btn:hover, #fullscreen-btn:hover { + background-color: #ccc; + transform: scale(1.05); +} + +.container { + padding: 20px; + max-width: 1400px; + margin: auto; + background-color: rgba(255, 255, 255, 0.4); +} + +h1 { + font-size: 3.5rem; + font-weight: bold; + text-align: left; + margin-bottom: 10px; + color: #333; + display: flex; + align-items: center; + justify-content: space-between; +} + +#room { + font-size: 3.5rem; + font-weight: bold; + color: #333; + position: relative; + right: 0; + margin-left: 20px; +} + +#message { + font-size: 1.5rem; + color: #16a3d1; + margin-bottom: 20px; +} + +.content { + display: flex; + justify-content: space-between; + gap: 3px; +} + +.left-column, .right-column { + display: flex; + flex-direction: column; + gap: 3px; +} + +.left-column { + width: 45%; +} + +.right-column { + width: 50%; +} + +.clock-section, .info-section, .right-column { + background-color: rgba(255, 255, 255, 0.2); + backdrop-filter: blur(10px); + padding: 20px; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); + border-radius: 8px; +} + +.clock-section, .info-section { + margin-bottom: 20px; /* 增加时钟和信息板块之间的间隔 */ +} + +#current-time { + font-size: 8rem; + text-align: center; + color: #333; + margin: 0; + font-weight: bold; +} + +#current-subject, #exam-timing, #remaining-time, #status { + font-size: 3rem; + margin: 10px 0; + text-align: left; + color: #333; +} + +table { + width: 100%; + border-collapse: collapse; + margin-top: 20px; + border: 1px solid #000; + background-color: rgba(255, 255, 255, 0.5); +} + +th, td { + border: 1px solid #000; + padding: 0px; + font-size: 1.8rem; + text-align: center; +} + +th { + background-color: #f0f0f0; + color: #333; + font-weight: bold; + border-bottom: 2px solid #000; +} + +tr:hover { + background-color: #f0f0f0; +} + +table { + border-radius: 8px; + overflow: hidden; +} + +td { + border-bottom: 1px solid #000; +} + +td:first-child { + border-top-left-radius: 8px; + border-bottom-left-radius: 8px; +} + +td:last-child { + border-top-right-radius: 8px; + border-bottom-right-radius: 8px; +} + +.exam-status-tag { + padding: 3px 6px; + border-radius: 4px; + font-size: 1.2rem; + display: inline-block; + min-width: 60px; +} + +.exam-status-进行中 { + background-color: rgba(91, 168, 56, 0.1); + color: #5ba838; +} + +.exam-status-即将开始 { + background-color: rgba(254, 153, 1, 0.1); + color: #fe9901; +} + +.exam-status-已结束 { + background-color: rgba(236, 4, 52, 0.1); + color: #ec0434; +} + +.exam-status-未开始 { + background-color: rgba(238, 238, 91, 0.1); + color: #d4b106; +} + +#settings-modal { + display: none; + position: fixed; + z-index: 1000; + left: 0; + top: 0; + width: 100%; + height: 100%; + overflow: auto; + background-color: rgba(0, 0, 0, 0.4); + padding-top: 60px; +} + +#settings-modal-content { + background: rgba(255, 255, 255, 0.95); + padding: 25px; + margin: 25px auto; + border-radius: 12px; + border: 1px solid #ccc; + backdrop-filter: blur(8px); + max-width: 600px; + max-height: 60vh; /* 限制最大高度 */ + overflow-y: auto; /* 允许垂直滚动 */ + animation: fadeIn 0.5s ease; +} + +/* 设置滚动条样式 */ +#settings-modal-content::-webkit-scrollbar { + width: 8px; +} + +#settings-modal-content::-webkit-scrollbar-track { + background: rgba(0, 0, 0, 0.1); + border-radius: 4px; +} + +#settings-modal-content::-webkit-scrollbar-thumb { + background: #ccc; + border-radius: 4px; +} + +#settings-modal-content::-webkit-scrollbar-thumb:hover { + background: #999; +} + +@keyframes fadeIn { + from { opacity: 0; transform: translateY(-20px); } + to { opacity: 1; transform: translateY(0); } +} + +@keyframes fadeOut { + from { opacity: 1; transform: translateY(0); } + to { opacity: 0; transform: translateY(-20px); } +} + +.fade-out { + animation: fadeOut 0.3s ease; +} + +#settings-modal-content h3 { + margin: 0 0 20px; + color: #333; + font-size: 20px; +} + +#settings-modal-content label { + display: flex; + align-items: center; + gap: 10px; + margin: 12px 0; + font-size: 16px; + color: #666; +} + +#settings-modal-content label[for="offset-time"], +#settings-modal-content label[for="room-input"], +#settings-modal-content label[for="zoom-input"] { + justify-content: space-between; +} + +#settings-modal-content input[type="number"], +#settings-modal-content input[type="text"] { + flex-grow: 1; + margin-left: 10px; +} + +#settings-modal-content input[type="number"], +#settings-modal-content input[type="text"] { + font-size: 1.5rem; + padding: 10px; + margin-top: 10px; + margin-bottom: 20px; + width: 100%; + box-sizing: border-box; + border: 1px solid #ccc; + border-radius: 5px; + background-color: #fff; + color: #333; +} + +#settings-modal-content input:focus { + outline: none; + border-color: #007acc; + box-shadow: 0 0 0 1px #007acc; +} + +.button-group { + display: flex; + justify-content: flex-end; + gap: 10px; +} + +#settings-modal-content button { + background: linear-gradient(135deg, #3498db, #2980b9); + color: white; + border: none; + padding: 12px 24px; + border-radius: 8px; + cursor: pointer; + font-size: 15px; + font-weight: 500; + transition: all 0.2s ease; + box-shadow: 0 4px 12px rgba(52,152,219,0.25); +} + +#settings-modal-content button:hover { + transform: translateY(-1px); + box-shadow: 0 6px 16px rgba(52,152,219,0.35); +} + +#close-settings-btn { + padding: 10px 20px; + font-size: 2rem; + cursor: pointer; + background-color: #d9534f; + color: white; + border: none; + border-radius: 5px; + box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); + transition: background-color 0.3s ease; +} + +#close-settings-btn:hover { + background-color: #c9302c; +} + +.error-container { + position: fixed; + bottom: 0; + left: 0; + right: 0; + background: #ff6b6b; + color: white; + padding: 16px; + display: none; + z-index: 10001; + animation: slideUp 0.3s ease; +} + +@keyframes slideUp { + from { transform: translateY(100%); } + to { transform: translateY(0); } +} + +.error-content { + max-width: 800px; + margin: 0 auto; + font-size: 15px; + display: flex; + align-items: center; + gap: 12px; +} + +.error-content:before { + content: '!'; + display: flex; + align-items: center; + justify-content: center; + width: 24px; + height: 24px; + background: white; + color: #ff6b6b; + border-radius: 50%; + font-weight: bold; +} + +.switch { + position: relative; + display: inline-block; + width: 60px; + height: 34px; +} + +.switch input { + opacity: 0; + width: 0; + height: 0; +} + +.slider { + position: absolute; + cursor: pointer; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: #ccc; + transition: .4s; + border-radius: 34px; +} + +.slider:before { + position: absolute; + content: ""; + height: 26px; + width: 26px; + left: 4px; + bottom: 4px; + background-color: white; + transition: .4s; + border-radius: 50%; +} + +input:checked + .slider { + background-color: #2196F3; +} + +input:checked + .slider:before { + transform: translateX(26px); +} + +.theme-toggle-container { + display: flex; + align-items: center; + justify-content: space-between; + gap: 10px; +} + +#theme-select { + padding: 8px 12px; + font-size: 14px; + border: 1px solid #ccc; + border-radius: 4px; + background-color: #fff; + color: #333; + cursor: pointer; + outline: none; + width: 120px; +} + +#theme-select:hover { + border-color: #999; +} + +#theme-select:focus { + border-color: #007acc; + box-shadow: 0 0 0 1px #007acc; +} + +#theme-select option { + background-color: #fff; + color: #333; + padding: 8px; +} + +.config-file-container { + margin: 12px 0; + padding: 10px; + border: 1px solid #ccc; + border-radius: 5px; + background-color: rgba(255, 255, 255, 0.5); + box-sizing: border-box; + max-width: 100%; +} + +.config-file-container label { + display: block; + margin-bottom: 8px; + color: #333; +} + +.config-file-container input[type="file"] { + display: block; + width: calc(100% - 16px); /* 减去padding的宽度 */ + padding: 8px; + border: 1px solid #ccc; + border-radius: 4px; + background-color: #fff; + color: #333; + cursor: pointer; + box-sizing: border-box; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.config-file-container input[type="file"]:hover { + background-color: #f5f5f5; +} + +.file-hint { + margin-top: 4px; + font-size: 12px; + color: #666; +} + +.config-control-btn { + margin-top: 10px; + padding: 8px 16px; + background-color: #d9534f; + color: white; + border: none; + border-radius: 4px; + cursor: pointer; + font-size: 14px; + transition: background-color 0.3s ease; +} + +.config-control-btn:hover { + background-color: #c9302c; +} diff --git a/exam/index.html b/exam/index.html index 59ad297..8bcd500 100644 --- a/exam/index.html +++ b/exam/index.html @@ -66,6 +66,10 @@