Skip to content

Commit

Permalink
暗色模式更新
Browse files Browse the repository at this point in the history
  • Loading branch information
guguan123 committed Oct 4, 2024
1 parent ebdf25a commit f6f3ff6
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 1 deletion.
49 changes: 48 additions & 1 deletion style/themes/web/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ body {
@media (prefers-color-scheme: dark) {
body {
background-color: #0A0A0A;
color: white;
color: #eee;
}
}

Expand Down Expand Up @@ -197,6 +197,15 @@ div.pager {
text-align: left;
color: #ffffff;
}
@media (prefers-color-scheme: dark) {
div.c2 {
color: white;
background: #191a1a;
border: 1px solid #273842;
margin: 3px;
padding: 8px 8px 8px 8px;
}
}

/* E */
.err {
Expand Down Expand Up @@ -425,6 +434,44 @@ textarea:focus {
.invert-image {
filter: invert(1); /* 图片反色 */
}
input[type="submit"] {
background: url("images/mhead_bg_dark.png") repeat-x #3A506E; /* 暗色背景图和颜色 */
border: 1px solid #5A6B82; /* 边框颜色变暗 */
box-shadow: inset 0px 1px 0px 0px rgba(255, 255, 255, 0.1); /* 内阴影透明度降低 */
text-shadow: 0px -1px 0px #324763; /* 文字阴影颜色加深 */
}

input[type="submit"]:hover {
box-shadow: 0px 0px 20px #aaa; /* 暗色模式下白色发光效果变暗 */
background: #3A506E; /* 背景色变暗 */
}

select {
border: 1px solid #555; /* 暗色模式下,边框变为较深颜色 */
background-color: #2A2A2A; /* 背景颜色变暗 */
color: #DDD; /* 文字颜色变浅 */
}

input[type="text"],
input[type="password"] {
background-color: #2A2A2A; /* 输入框背景色变暗 */
border: 1px solid #555; /* 边框颜色变暗 */
box-shadow: 1px 1px 7px -4px rgba(0, 0, 0, 0.7) inset, 0 0 0 1px #333; /* 内阴影调整为更暗的黑色,外边框颜色加深 */
color: #DDD; /* 文本颜色变浅 */
}

input[type="text"]:disabled,
input[type="password"]:disabled {
border-color: #555; /* 禁用时的边框颜色加深 */
background-color: #333; /* 背景颜色变暗 */
color: #888; /* 文本颜色加深 */
}

input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus {
border-color: #777; /* 焦点时边框颜色变暗 */
}
}

/* K */
Expand Down
34 changes: 34 additions & 0 deletions style/themes/web/txt.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Form Style Test</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>

<h1>Form Style Test</h1>

<form action="#" method="post">
<label for="username">Username:</label>
<input type="text" id="username" name="username" placeholder="Enter username" required><br>

<label for="password">Password:</label>
<input type="password" id="password" name="password" placeholder="Enter password" required><br>

<label for="select-example">Select an option:</label>
<select id="select-example" name="select-example">
<option value="option1">Option 1</option>
<option value="option2">Option 2</option>
<option value="option3">Option 3</option>
</select><br>

<label for="disabled-input">Disabled Input:</label>
<input type="text" id="disabled-input" name="disabled-input" value="Disabled" disabled><br>

<input type="submit" value="Submit">
</form>

</body>
</html>

0 comments on commit f6f3ff6

Please sign in to comment.