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 6d09f7c commit 10bdbd4
Show file tree
Hide file tree
Showing 5 changed files with 123 additions and 51 deletions.
8 changes: 4 additions & 4 deletions style/themes/web/altername_post_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ function tag(text1, text2) {
</div>
</div>
<div style="margin:4px;">
<a href="javascript:tag('[b]', '[/b]')"><img src="/style/value/b.png" alt="b" title="加粗"/></a>
<a href="javascript:tag('[i]', '[/i]')"><img src="/style/value/i.png" alt="i" title="斜"/></a>
<a href="javascript:tag('[u]', '[/u]')"><img src="/style/value/u.png" alt="u" title="下划线"/></a>
<a href="javascript:tag('&#60;?php', '?&#62;')"><img src="/style/value/cod.png" alt="cod" title="密码"/></a>
<a class="invert-image" href="javascript:tag('[b]', '[/b]')"><img src="/style/value/b.png" alt="b" title="加粗"/></a>
<a class="invert-image" href="javascript:tag('[i]', '[/i]')"><img src="/style/value/i.png" alt="i" title="斜"/></a>
<a class="invert-image" href="javascript:tag('[u]', '[/u]')"><img src="/style/value/u.png" alt="u" title="下划线"/></a>
<a class="invert-image" href="javascript:tag('&#60;?php', '?&#62;')"><img src="/style/value/cod.png" alt="cod" title="密码"/></a>
<a href="javascript:tag('[url=]', '[/url]')"><img src="/style/value/l.png" alt="url" title="连结" /></a>
<a href="javascript:tag('[red]', '[/red]')"><img src="/style/value/re.png" alt="red" title="红色"/></a>
<a href="javascript:tag('[green]', '[/green]')"><img src="/style/value/gr.png" alt="green" title="绿色"/></a>
Expand Down
Binary file added style/themes/web/images/ma2_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
77 changes: 71 additions & 6 deletions style/themes/web/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,20 @@ a.activ {
a {
color: #95b8ff;
}
a.activ {
color: #979797;
text-shadow: 0px -1px 0px black;
background: -moz-linear-gradient(top, #202020, #000);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #202020), color-stop(100%, #000));
background: -webkit-linear-gradient(top, #202020, #000);
background: -o-linear-gradient(top, #202020, #000);
background: -ms-linear-gradient(top, #202020, #000);
background: linear-gradient(top, #202020, #000);
filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#202020', endColorstr='#000');
border-top: 1px solid #3A3A3A;
border-right: 1px solid #3A3A3A;
border-left: 1px solid #3A3A3A;
}
}

/* B */
Expand Down Expand Up @@ -189,6 +203,19 @@ div.pager {
font-weight: bold;
text-align: center;
}
@media (prefers-color-scheme: dark) {
.err {
text-shadow: 1px 1px 3px #000000; /* 黑色文字阴影,让文字更清晰 */
background: #8b0000; /* 深红色作为基础背景 */
background: -moz-linear-gradient(top, #a00000, #600000); /* 渐变:从较亮的红色到较深的红色 */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #a00000), color-stop(100%, #600000));
background: -webkit-linear-gradient(top, #a00000, #600000);
background: -o-linear-gradient(top, #a00000, #600000);
background: -ms-linear-gradient(top, #a00000, #600000);
background: linear-gradient(to bottom, #a00000, #600000); /* 标准语法,top 替换为 to bottom */
filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#a00000', endColorstr='#600000');
}
}

/* F */
form {
Expand Down Expand Up @@ -249,6 +276,21 @@ form label:hover {
.foot_page a {
color: #ffc207;
}
@media (prefers-color-scheme: dark) {
form {
background: #050505;
border: 1px #242424 solid;
box-shadow: 0 0 0 1px #030303 inset, 0 1px 17px -9px black;
}
.form_info {
border: 1px solid #1f1f1f;
background: #000;
}
.foot {
border-bottom: 1px solid #1C242B;
background: #12171B;
}
}

/* G */

Expand Down Expand Up @@ -367,6 +409,9 @@ textarea:focus {
.ind_cont {
background-color: #000;
}
.invert-image {
filter: invert(1); /* 图片反色 */
}
}

/* K */
Expand Down Expand Up @@ -604,6 +649,12 @@ b.count {
background: url("images/bgs_dark.png") repeat-x #4C6F97;
border: 1px solid #252525;
}
.mains {
border: 1px solid #252525;
}
.main2 {
background: url("images/ma2_dark.png") repeat-y #000;
}
.mm_counter {
background-color: #12181E;
}
Expand Down Expand Up @@ -635,6 +686,10 @@ b.count {
word-wrap: break-word;
}
@media (prefers-color-scheme: dark) {
.nav1, .nav2 {
background-color: #000;
border-bottom: 1px solid #111;
}
.nav3 {
background-image: url("images/menu-list-b-dark.jpg");
border-bottom: 1px solid #111111;
Expand Down Expand Up @@ -663,13 +718,7 @@ td.oline_user {
}
@media (prefers-color-scheme: dark) {
td.oline_user {
width:60px;
height:70px;
vertical-align:top;
border:1px solid DarkGray;
text-align:center;
display:inline-table;
margin:2px;
}
}

Expand Down Expand Up @@ -765,6 +814,17 @@ img.sto500 {
-moz-border-radius: 1px;
word-wrap: break-word;
}
@media (prefers-color-scheme: dark) {
.str {
color: #FFF;
}
.st_1 {
border-color: transparent transparent #343461 transparent;
}
.st_2 {
background-color: #343461;
}
}

/* T */
.tpanel {
Expand Down Expand Up @@ -919,6 +979,11 @@ textarea {
background-color: #6eabe8;
text-decoration: none;
}
@media (prefers-color-scheme: dark) {
.webmenu a {
border-bottom: 1px solid #3A3A3A;
}
}

/* X */

Expand Down
79 changes: 41 additions & 38 deletions style/themes/web/style_dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ input:focus {

.accordion-heading {
padding: 9px 13px;
background-color: #f2f2f2;
background-image: -moz-linear-gradient(top, #fff, #e6e6e6);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fff), to(#e6e6e6));
background-image: -webkit-linear-gradient(top, #fff, #e6e6e6);
background-image: -o-linear-gradient(top, #fff, #e6e6e6);
background-image: linear-gradient(to bottom, #fff, #e6e6e6);
border: 1px solid #fff;
background-color: #0d0d0d;
background-image: -moz-linear-gradient(top, #000, #191919);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#000), to(#191919));
background-image: -webkit-linear-gradient(top, #000, #191919);
background-image: -o-linear-gradient(top, #000, #191919);
background-image: linear-gradient(to bottom, #000, #191919);
border: 1px solid #000;
border-radius: 3px;
box-shadow: 0 1px 3px #b2bbc3;
box-shadow: 0 1px 3px #3C444D;
position: relative;
z-index: 1;
}
Expand All @@ -53,7 +53,7 @@ input:focus {

.accordion-group {
margin-bottom: 2px;
border: 1px solid #e5e5e5;
border: 1px solid #1a1a1a;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
Expand All @@ -70,18 +70,18 @@ input:focus {
}

a.activ {
color: #686868;
text-shadow: 0px -1px 0px white;
background: -moz-linear-gradient(top, #dfdfdf, #ffffff);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #dfdfdf), color-stop(100%, #ffffff));
background: -webkit-linear-gradient(top, #dfdfdf, #ffffff);
background: -o-linear-gradient(top, #dfdfdf, #ffffff);
background: -ms-linear-gradient(top, #dfdfdf, #ffffff);
background: linear-gradient(top, #dfdfdf, #ffffff);
filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#dfdfdf', endColorstr='#ffffff');
border-top: 1px solid #C5C5C5;
border-right: 1px solid #C5C5C5;
border-left: 1px solid #C5C5C5;
color: #979797;
text-shadow: 0px -1px 0px black;
background: -moz-linear-gradient(top, #202020, #000);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #202020), color-stop(100%, #000));
background: -webkit-linear-gradient(top, #202020, #000);
background: -o-linear-gradient(top, #202020, #000);
background: -ms-linear-gradient(top, #202020, #000);
background: linear-gradient(top, #202020, #000);
filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#202020', endColorstr='#000');
border-top: 1px solid #3A3A3A;
border-right: 1px solid #3A3A3A;
border-left: 1px solid #3A3A3A;
border-top-left-radius: 6px;
border-top-right-radius: 6px;
border-bottom: none !important;
Expand Down Expand Up @@ -159,15 +159,15 @@ div.pager {
-moz-border-radius: 5px;
padding: 5px;
color: white;
text-shadow: 1px 1px 3px #D15757;
background: #ffc1c1;
background: -moz-linear-gradient(top, #ffd7d7, #ffaaaa);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffd7d7), color-stop(100%, #ffaaaa));
background: -webkit-linear-gradient(top, #ffd7d7, #ffaaaa);
background: -o-linear-gradient(top, #ffd7d7, #ffaaaa);
background: -ms-linear-gradient(top, #ffd7d7, #ffaaaa);
background: linear-gradient(top, #ffd7d7, #ffaaaa);
filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#ffd7d7', endColorstr='#ffaaaa');
text-shadow: 1px 1px 3px #000000; /* 黑色文字阴影,让文字更清晰 */
background: #8b0000; /* 深红色作为基础背景 */
background: -moz-linear-gradient(top, #a00000, #600000); /* 渐变:从较亮的红色到较深的红色 */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #a00000), color-stop(100%, #600000));
background: -webkit-linear-gradient(top, #a00000, #600000);
background: -o-linear-gradient(top, #a00000, #600000);
background: -ms-linear-gradient(top, #a00000, #600000);
background: linear-gradient(to bottom, #a00000, #600000); /* 标准语法,top 替换为 to bottom */
filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#a00000', endColorstr='#600000');
font-weight: bold;
text-align: center;
}
Expand Down Expand Up @@ -207,8 +207,8 @@ form label:hover {
}
.form_info {
cursor: pointer;
border: 1px solid #e0e0e0;
background: #fff;
border: 1px solid #1f1f1f;
background: #000;
padding: 4px;
text-align: center;
}
Expand Down Expand Up @@ -339,6 +339,9 @@ textarea:focus {
border-bottom: 1px dotted #a6a6a6;
padding: 2px 0;
}
.invert-image {
filter: invert(1); /* 图片反色 */
}

/* K */

Expand Down Expand Up @@ -505,7 +508,7 @@ b.count {

color: black;
background: url("images/nature-background.jpg") repeat-x #4C6F97;
border: 1px solid #DADADA;
border: 1px solid #252525;
margin: 2px;
padding: 9px 6px 9px 6px;
word-wrap: break-word;
Expand All @@ -514,7 +517,7 @@ b.count {
}
.main2 {
color: black;
background: url("images/ma2.png") repeat-y #fff;
background: url("images/ma2_dark.png") repeat-y #000;
margin: 2px;
padding: 4px 6px 4px 6px;
word-wrap: break-word;
Expand Down Expand Up @@ -667,11 +670,11 @@ img.sto500 {
}
.st_1 {
/* Оформление статуса юзера */

margin-left: 20px;
margin-bottom: 0;
border-style: solid;
border-color: transparent transparent #c3c3ff transparent;
border-color: transparent transparent #343461 transparent;
border-width: 0 10px 10px 0;
height: 0px;
width: 0px;
Expand All @@ -681,7 +684,7 @@ img.sto500 {
margin-top: 0;
padding: 5px;
color: #000;
background-color: #c3c3ff;
background-color: #343461;
-o-border-radius: 10px;
border-radius: 1px;
-moz-border-radius: 1px;
Expand Down Expand Up @@ -824,7 +827,7 @@ textarea {
.webmenu a {
display: block;
min-width: 62px;
border-bottom: 1px solid #C5C5C5;
border-bottom: 1px solid #3A3A3A;
padding: 3px 10px 3px 10px;
text-decoration: none;
text-align: center;
Expand Down
10 changes: 7 additions & 3 deletions style/themes/web/tables.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@

.block_menu /* ���� ���� � �������� */
{
background: url(images/stripe2.png) white;
background: url(images/stripe2.png) black;
vertical-align: top;
background-color: #fff;
background-color: black;
text-align: left;
color: #000;
color: white;
width: 200px;
}

Expand Down Expand Up @@ -80,4 +80,8 @@
#footer {
background: url("images/mhead_bg_dark.png") repeat-x #4C6F97;
}
.block_info {
background: url(images/stripe2.png) black;
color: #fff;
}
}

0 comments on commit 10bdbd4

Please sign in to comment.