347 lines
7.0 KiB
CSS

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: #000000;
overflow: auto; /* 允许页面滚动 */
}
/* 隐藏滚动条 */
body::-webkit-scrollbar {
display: none;
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
#fullscreen-btn {
position: absolute;
top: 20px;
right: 20px;
padding: 10px 20px;
font-size: 1rem;
cursor: pointer;
background-color: #ffffff;
color: #000000;
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;
}
#settings-btn {
position: absolute;
top: 20px;
right: 120px; /* Fullscreen button's left */
padding: 10px 20px;
font-size: 1rem;
cursor: pointer;
background-color: #ffffff;
color: #000000;
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;
}
#settings-btn:hover {
background-color: #f0f0f0;
transform: scale(1.05);
}
#fullscreen-btn:hover {
background-color: #f0f0f0;
transform: scale(1.05);
}
.container {
padding: 20px;
max-width: 1400px; /* 增加主体部分宽度 */
margin: auto;
background-color: rgba(255, 255, 255, 0.5); /* 使用rgba设置背景透明度 */
border-radius: 8px;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}
h1 {
font-size: 3.5rem;
font-weight: bold;
text-align: left;
margin-bottom: 10px;
color: #000000;
display: flex;
align-items: center;
justify-content: space-between;
}
#room {
font-size: 3.5rem;
font-weight: bold;
color: #000000;
position: relative;
right: 0;
margin-left: 20px; /* 调整位置使其保持在container中 */
}
#message {
font-size: 1.5rem;
color: #134858;
margin-bottom: 20px;
}
.content {
display: flex;
justify-content: space-between;
}
.left-column, .right-column {
width: 48%;
background-color: rgba(255, 255, 255, 0.2);
padding: 20px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
border-radius: 8px;
}
#current-time {
font-size: 10rem;
font-weight: bold;
text-align: center;
margin-bottom: 20px;
color: #000000;
}
#current-subject, #exam-timing, #remaining-time, #status {
font-size: 3rem;
margin: 10px 0;
text-align: left;
color: #000000;
}
table {
width: 100%;
border-collapse: collapse;
margin-top: 20px;
border: 1px solid #ccc;
background-color: rgba(255, 255, 255, 0.5);
}
th, td {
border: 1px solid #ccc;
padding: 8px; /* 缩短行高 */
font-size: 2rem;
text-align: center;
}
th {
background-color: rgba(255, 255, 255, 0.5);
color: #134858;
font-weight: bold;
border-bottom: 2px solid #134858;
}
.exam-status-进行中 td {
color: #5ba838 !important; /* 绿色字体 */
}
.exam-status-即将开始 td {
color: #fe9901 !important; /* 橙色字体 */
}
.exam-status-已结束 td {
color: #ec0434 !important; /* 红色字体 */
}
.exam-status-空闲 td {
color: blue !important; /* 蓝色字体 */
}
tr:hover {
background-color: #f0f0f0;
}
table {
border-radius: 8px;
overflow: hidden;
}
td {
border-bottom: 1px solid #ccc;
}
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;
}
#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-color: #ffffff;
margin: 5% auto;
padding: 20px;
border: 1px solid #888;
width: 80%;
max-width: 600px;
border-radius: 10px;
}
#settings-modal-content label {
font-size: 2rem;
}
#settings-modal-content input[type="number"],
#settings-modal-content input[type="text"] {
font-size: 2rem;
padding: 10px;
margin-top: 10px;
margin-bottom: 20px;
width: 100%;
box-sizing: border-box;
border: 1px solid #ccc;
border-radius: 5px;
background-color: #ffffff;
color: #000000;
}
#settings-modal-content button {
padding: 10px 20px;
font-size: 2rem;
cursor: pointer;
background-color: #93b4f7;
color: white;
border: none;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
transition: background-color 0.3s ease;
}
#settings-modal-content button:hover {
background-color: #45a049;
}
#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;
}
body.dark-theme {
background-image: url('../background-dark.jpg');
color: #ffffff;
}
body.dark-theme .container {
background-color: rgba(0, 0, 0, 0.5);
}
body.dark-theme .left-column,
body.dark-theme .right-column {
background-color: rgba(255, 255, 255, 0.2);
}
body.dark-theme #current-time {
color: #ffffff;
}
body.dark-theme #current-subject,
body.dark-theme #exam-timing,
body.dark-theme #remaining-time,
body.dark-theme #status {
color: #ffffff;
}
body.dark-theme h1,
body.dark-theme #room {
color: #ffffff;
}
body.dark-theme table {
background-color: rgba(255, 255, 255, 0.2);
}
body.dark-theme th,
body.dark-theme td {
color: rgba(0, 0, 0, 0.2);
}
body.dark-theme th {
background-color: rgba(0, 0, 0, 0.2);
color: #7cc3fb;
border-bottom: 2px solid #134858;
}
body.dark-theme #settings-modal-content {
background-color: #333;
border: 1px solid #666;
}
body.dark-theme #settings-modal-content label,
body.dark-theme #settings-modal-content input[type="number"],
body.dark-theme #settings-modal-content input[type="text"] {
color: #ffffff;
background-color: #444;
border: 1px solid #666;
}
body.dark-theme #settings-modal-content button {
background-color: #555;
color: #ffffff;
border: 1px solid #666;
}
body.dark-theme #settings-modal-content button:hover {
background-color: #666;
}
body.dark-theme #settings-btn,
body.dark-theme #fullscreen-btn,
body.dark-theme #theme-toggle-btn,
body.dark-theme #save-settings-btn,
body.dark-theme #close-settings-btn {
background-color: #444;
color: #ffffff;
border: 1px solid #666;
}
body.dark-theme #settings-btn:hover,
body.dark-theme #fullscreen-btn:hover,
body.dark-theme #theme-toggle-btn:hover,
body.dark-theme #save-settings-btn:hover,
body.dark-theme #close-settings-btn:hover {
background-color: #666;
}