Skip to content

Commit 0a4299e

Browse files
committed
tango-light еще в виде отдельной темы
а не только как часть tango-auto
1 parent 830398f commit 0a4299e

9 files changed

Lines changed: 284 additions & 119 deletions

File tree

pom.xml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@
598598
<insertNewLine>true</insertNewLine>
599599
<output>${project.build.directory}/${project.build.finalName}/tango/combined.css</output>
600600
<includes>
601-
<include>${project.build.directory}/${project.build.finalName}/tango/main.css</include>
601+
<include>${project.build.directory}/${project.build.finalName}/tango/dark.css</include>
602602
<include>${project.build.directory}/${project.build.finalName}/tango/syntax.css</include>
603603
<include>${project.build.directory}/${project.build.finalName}/tango/popover.css</include>
604604
<include>${project.build.directory}/${project.build.finalName}/js/META-INF/resources/webjars/swiffy-slider/${swiffy-slider.version}/dist/css/swiffy-slider.min.css</include>
@@ -609,10 +609,20 @@
609609
<insertNewLine>true</insertNewLine>
610610
<output>${project.build.directory}/${project.build.finalName}/tango-auto/combined.css</output>
611611
<includes>
612-
<include>${project.build.directory}/${project.build.finalName}/tango/main.css</include>
612+
<include>${project.build.directory}/${project.build.finalName}/tango/auto.css</include>
613+
<include>${project.build.directory}/${project.build.finalName}/tango/syntax.css</include>
614+
<include>${project.build.directory}/${project.build.finalName}/tango/popover.css</include>
615+
<include>${project.build.directory}/${project.build.finalName}/js/META-INF/resources/webjars/swiffy-slider/${swiffy-slider.version}/dist/css/swiffy-slider.min.css</include>
616+
</includes>
617+
</aggregation>
618+
<aggregation>
619+
<removeIncluded>false</removeIncluded>
620+
<insertNewLine>true</insertNewLine>
621+
<output>${project.build.directory}/${project.build.finalName}/tango-light/combined.css</output>
622+
<includes>
623+
<include>${project.build.directory}/${project.build.finalName}/tango/light.css</include>
613624
<include>${project.build.directory}/${project.build.finalName}/tango/syntax.css</include>
614625
<include>${project.build.directory}/${project.build.finalName}/tango/popover.css</include>
615-
<include>${project.build.directory}/${project.build.finalName}/tango/auto.css</include>
616626
<include>${project.build.directory}/${project.build.finalName}/js/META-INF/resources/webjars/swiffy-slider/${swiffy-slider.version}/dist/css/swiffy-slider.min.css</include>
617627
</includes>
618628
</aggregation>
@@ -621,7 +631,7 @@
621631
<insertNewLine>true</insertNewLine>
622632
<output>${project.build.directory}/${project.build.finalName}/qrerror/combined.css</output>
623633
<includes>
624-
<include>${project.build.directory}/${project.build.finalName}/tango/main.css</include>
634+
<include>${project.build.directory}/${project.build.finalName}/tango/dark.css</include>
625635
</includes>
626636
</aggregation>
627637
<aggregation>

src/main/java/ru/org/linux/site/Theme.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 1998-2024 Linux.org.ru
2+
* Copyright 1998-2026 Linux.org.ru
33
* Licensed under the Apache License, Version 2.0 (the "License");
44
* you may not use this file except in compliance with the License.
55
* You may obtain a copy of the License at
@@ -22,11 +22,13 @@ public class Theme {
2222
private static final Theme WHITE2 = new Theme("white2", "white2/head-main.jsp", "white2/head-main.jsp", true);
2323
private static final Theme TANGO = new Theme("tango", "tango/head-main.jsp", "tango/head-main.jsp");
2424
private static final Theme TANGO_AUTO = new Theme("tango-auto", "tango/head-main.jsp", "tango/head-main.jsp");
25+
private static final Theme TANGO_LIGHT = new Theme("tango-light", "tango/head-main.jsp", "tango/head-main.jsp");
2526
private static final Theme WALTZ = new Theme("waltz", "tango/head-main.jsp", "tango/head-main.jsp");
2627
private static final Theme ZOMG_PONIES = new Theme("zomg_ponies", "zomg_ponies/head-main.jsp", "zomg_ponies/head-main.jsp", true);
2728

2829
public static final ImmutableList<Theme> THEMES = ImmutableList.of(
2930
TANGO,
31+
TANGO_LIGHT,
3032
TANGO_AUTO,
3133
BLACK,
3234
WHITE2,
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
/*
2+
* Copyright 1998-2026 Linux.org.ru
3+
* Licensed under the Apache License, Version 2.0 (the "License");
4+
* you may not use this file except in compliance with the License.
5+
* You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software
10+
* distributed under the License is distributed on an "AS IS" BASIS,
11+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
* See the License for the specific language governing permissions and
13+
* limitations under the License.
14+
*/
15+
16+
@use "sass:color";
17+
18+
$heatmap_max: #73d216;
19+
$heatmap_scale: 1.5;
20+
21+
@media (prefers-color-scheme: light) {
22+
:root {
23+
--main-background: #d3d7cf;
24+
--text-color: #3b4245;
25+
--link-color: #204a87;
26+
--site-title-color: #171b1c;
27+
--header-color: #232829;
28+
--blockquote-color: #555753;
29+
--table-border-color: #babdb6;
30+
--table-link-color: #171b1c;
31+
--table-hover-background: #ad7fa8;
32+
--tag-color: #ce5c00;
33+
--main-menu-color: #8f5902;
34+
--signature-user-color: #4e9a06;
35+
--signature-remark-color: #444444;
36+
--article-background: #eeeeec;
37+
--button-border-color: #171b1c;
38+
--button-selected-text-color: white;
39+
--button-primary-background: #729fcf;
40+
--button-danger-background: #cc0000;
41+
--button-danger-text-color: #d3d7cf;
42+
--icon-button-active-color: #c17d11;
43+
--tagpage-group-label-background: #e9b96e;
44+
--icon-reply-color: #729fcf;
45+
--unread-marker-color: #3465a4;
46+
--icon-pin-color: #c4a000;
47+
--preview-border-color: #c4a000;
48+
49+
--heatmap-empty: #babdb6;
50+
--heatmap-max: #{color.adjust($heatmap_max, $lightness: -20%*$heatmap_scale)};
51+
--heatmap-q4: #{color.adjust($heatmap_max, $lightness: -15%*$heatmap_scale)};
52+
--heatmap-q3: #{color.adjust($heatmap_max, $lightness: -10%*$heatmap_scale)};
53+
--heatmap-q2: #{color.adjust($heatmap_max, $lightness: -5%*$heatmap_scale)};
54+
--heatmap-q1: #{$heatmap_max};
55+
56+
.swiffy-slider {
57+
--swiffy-slider-nav-light: #171b1c;
58+
}
59+
60+
.swiffy-slider .slider-indicators>* {
61+
filter: invert(1);
62+
}
63+
/*
64+
65+
Atom One Light by Daniel Gamage
66+
Original One Light Syntax theme from https://github.com/atom/one-light-syntax
67+
68+
base: #fafafa
69+
mono-1: #383a42
70+
mono-2: #686b77
71+
mono-3: #a0a1a7
72+
hue-1: #0184bb
73+
hue-2: #4078f2
74+
hue-3: #a626a4
75+
hue-4: #50a14f
76+
hue-5: #e45649
77+
hue-5-2: #c91243
78+
hue-6: #986801
79+
hue-6-2: #c18401
80+
81+
*/
82+
--syntax-mono-1: #383a42;
83+
--syntax-mono-3: #a0a1a7;
84+
--syntax-hue-1: #0184bb;
85+
--syntax-hue-2: #4078f2;
86+
--syntax-hue-3: #a626a4;
87+
--syntax-hue-4: #50a14f;
88+
--syntax-hue-5: #e45649;
89+
--syntax-hue-6: #986801;
90+
--syntax-hue-6-2: #c18401;
91+
}
92+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/*
2+
* Copyright 1998-2026 Linux.org.ru
3+
* Licensed under the Apache License, Version 2.0 (the "License");
4+
* you may not use this file except in compliance with the License.
5+
* You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software
10+
* distributed under the License is distributed on an "AS IS" BASIS,
11+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
* See the License for the specific language governing permissions and
13+
* limitations under the License.
14+
*/
15+
16+
:root {
17+
--main-background: #2e3436;
18+
--text-color: #babdb6;
19+
--link-color: #729fcf;
20+
--site-title-color: #eeeeec;
21+
--header-color: #d3d7cf;
22+
--blockquote-color: #909090;
23+
24+
--table-border-color: #555753;
25+
--table-link-color: #eeeeec;
26+
--table-hover-background: #5c3566;
27+
28+
--tag-color: #fcaf3e;
29+
--main-menu-color: #e9b96e;
30+
--signature-user-color: #8ae234;
31+
--signature-remark-color: #AAAAAA;
32+
--article-background: #272C2D;
33+
34+
--button-border-color: #babdb6;
35+
--button-selected-text-color: black;
36+
37+
--button-primary-background: #204a87;
38+
--button-danger-background: #a40000;
39+
--button-danger-text-color: #eeeeec;
40+
41+
--icon-button-active-color: #c17d11;
42+
43+
--tagpage-group-label-background: #8f5902;
44+
45+
--icon-reply-color: #729fcf;
46+
--unread-marker-color: #729fcf;
47+
--icon-pin-color: #e9b96e;
48+
49+
--preview-border-color: #c4a000;
50+
}
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
/*
2+
* Copyright 1998-2026 Linux.org.ru
3+
* Licensed under the Apache License, Version 2.0 (the "License");
4+
* you may not use this file except in compliance with the License.
5+
* You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software
10+
* distributed under the License is distributed on an "AS IS" BASIS,
11+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
* See the License for the specific language governing permissions and
13+
* limitations under the License.
14+
*/
15+
16+
@use "sass:color";
17+
18+
$heatmap_max: #73d216;
19+
$heatmap_scale: 1.5;
20+
21+
:root {
22+
--main-background: #d3d7cf;
23+
--text-color: #3b4245;
24+
--link-color: #204a87;
25+
--site-title-color: #171b1c;
26+
--header-color: #232829;
27+
--blockquote-color: #555753;
28+
--table-border-color: #babdb6;
29+
--table-link-color: #171b1c;
30+
--table-hover-background: #ad7fa8;
31+
--tag-color: #ce5c00;
32+
--main-menu-color: #8f5902;
33+
--signature-user-color: #4e9a06;
34+
--signature-remark-color: #444444;
35+
--article-background: #eeeeec;
36+
--button-border-color: #171b1c;
37+
--button-selected-text-color: white;
38+
--button-primary-background: #729fcf;
39+
--button-danger-background: #cc0000;
40+
--button-danger-text-color: #d3d7cf;
41+
--icon-button-active-color: #c17d11;
42+
--tagpage-group-label-background: #e9b96e;
43+
--icon-reply-color: #729fcf;
44+
--unread-marker-color: #3465a4;
45+
--icon-pin-color: #c4a000;
46+
--preview-border-color: #c4a000;
47+
48+
--heatmap-empty: #babdb6;
49+
--heatmap-max: #{color.adjust($heatmap_max, $lightness: -20%*$heatmap_scale)};
50+
--heatmap-q4: #{color.adjust($heatmap_max, $lightness: -15%*$heatmap_scale)};
51+
--heatmap-q3: #{color.adjust($heatmap_max, $lightness: -10%*$heatmap_scale)};
52+
--heatmap-q2: #{color.adjust($heatmap_max, $lightness: -5%*$heatmap_scale)};
53+
--heatmap-q1: #{$heatmap_max};
54+
55+
.swiffy-slider {
56+
--swiffy-slider-nav-light: #171b1c;
57+
}
58+
59+
.swiffy-slider .slider-indicators>* {
60+
filter: invert(1);
61+
}
62+
63+
/*
64+
65+
Atom One Light by Daniel Gamage
66+
Original One Light Syntax theme from https://github.com/atom/one-light-syntax
67+
68+
base: #fafafa
69+
mono-1: #383a42
70+
mono-2: #686b77
71+
mono-3: #a0a1a7
72+
hue-1: #0184bb
73+
hue-2: #4078f2
74+
hue-3: #a626a4
75+
hue-4: #50a14f
76+
hue-5: #e45649
77+
hue-5-2: #c91243
78+
hue-6: #986801
79+
hue-6-2: #c18401
80+
81+
*/
82+
--syntax-mono-1: #383a42;
83+
--syntax-mono-3: #a0a1a7;
84+
--syntax-hue-1: #0184bb;
85+
--syntax-hue-2: #4078f2;
86+
--syntax-hue-3: #a626a4;
87+
--syntax-hue-4: #50a14f;
88+
--syntax-hue-5: #e45649;
89+
--syntax-hue-6: #986801;
90+
--syntax-hue-6-2: #c18401;
91+
}

src/main/webapp/sass/tango/_tango-dark.scss renamed to src/main/webapp/sass/tango/_colors-vars.scss

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -13,42 +13,6 @@
1313
* limitations under the License.
1414
*/
1515

16-
:root {
17-
--main-background: #2e3436;
18-
--text-color: #babdb6;
19-
--link-color: #729fcf;
20-
--site-title-color: #eeeeec;
21-
--header-color: #d3d7cf;
22-
--blockquote-color: #909090;
23-
24-
--table-border-color: #555753;
25-
--table-link-color: #eeeeec;
26-
--table-hover-background: #5c3566;
27-
28-
--tag-color: #fcaf3e;
29-
--main-menu-color: #e9b96e;
30-
--signature-user-color: #8ae234;
31-
--signature-remark-color: #AAAAAA;
32-
--article-background: #272C2D;
33-
34-
--button-border-color: #babdb6;
35-
--button-selected-text-color: black;
36-
37-
--button-primary-background: #204a87;
38-
--button-danger-background: #a40000;
39-
--button-danger-text-color: #eeeeec;
40-
41-
--icon-button-active-color: #c17d11;
42-
43-
--tagpage-group-label-background: #8f5902;
44-
45-
--icon-reply-color: #729fcf;
46-
--unread-marker-color: #729fcf;
47-
--icon-pin-color: #e9b96e;
48-
49-
--preview-border-color: #c4a000;
50-
}
51-
5216
$main_background: var(--main-background);
5317
$text_color: var(--text-color);
5418
$link_color: var(--link-color);

0 commit comments

Comments
 (0)