Skip to content

Commit 54b52de

Browse files
Dark mode (#3025)
1 parent 79fbeb1 commit 54b52de

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+534
-349
lines changed

Diff for: _static/custom.css

+153-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
.row-odd {
22
background-color: #f3f6f6;
33
}
4+
45
.table-center tr.row-even > td {
56
text-align: center;
7+
vertical-align: top;
68
}
79

810
div.document {
@@ -26,6 +28,7 @@ img.component-image {
2628
height: 85px;
2729
object-fit: contain;
2830
border-radius: 10px;
31+
max-width: 190px;
2932
}
3033

3134
table.docutils {
@@ -36,6 +39,7 @@ table.docutils {
3639
-webkit-animation: 2s linear infinite blink_effect;
3740
animation: 2s linear infinite blink_effect;
3841
}
42+
3943
@-webkit-keyframes blink_effect {
4044
0% {
4145
visibility: hidden;
@@ -47,6 +51,7 @@ table.docutils {
4751
visibility: visible;
4852
}
4953
}
54+
5055
@keyframes blink_effect {
5156
0% {
5257
visibility: hidden;
@@ -74,10 +79,12 @@ table.docutils {
7479
z-index: 9999;
7580
display: none;
7681
}
82+
7783
.footer-button-container {
7884
margin: 0 60px 0 10px;
7985
float: right;
8086
}
87+
8188
.footer-button {
8289
background-color: #b3b3b3;
8390
color: #4e4e4e;
@@ -88,6 +95,7 @@ table.docutils {
8895
cursor: pointer;
8996
text-decoration: none;
9097
}
98+
9199
.not-hidden {
92100
display: block !important;
93101
}
@@ -133,7 +141,6 @@ div.index-shields {
133141
}
134142

135143
.guide-card {
136-
color: #004b6b;
137144
display: block;
138145
height: auto;
139146
width: 300px;
@@ -149,17 +156,20 @@ div.index-shields {
149156
margin: 16px !important;
150157
}
151158

152-
.guide-code {
153-
padding: 8px 16px;
154-
margin: 8px;
155-
color: black;
159+
.guide-card .example {
160+
margin: 10px;
161+
}
162+
163+
.guide-card pre {
156164
white-space: pre-line;
165+
padding: 15px;
157166
}
158167

159-
@media screen and (min-width: 870px) {
168+
@media screen and (min-width: 875px) {
160169
.guide-card:first-child {
161170
z-index: 100;
162171
}
172+
163173
.guide-card:nth-child(2) {
164174
z-index: 50;
165175
}
@@ -170,23 +180,159 @@ div.index-shields {
170180
}
171181
}
172182

173-
@media screen and (max-width: 870px) {
183+
@media screen and (max-width: 875px) {
184+
185+
div.sphinxsidebar {
186+
width: 100%;
187+
background: #fff;
188+
color: #000;
189+
border-bottom: 1px solid #444;
190+
}
191+
192+
div.sphinxsidebar p.logo {
193+
display: initial;
194+
}
195+
196+
div.sphinxsidebar a, div.sphinxsidebar h3, div.sphinxsidebar h3 a {
197+
color: #444;
198+
}
199+
174200
.guide-container {
175201
flex-direction: column;
176202
}
203+
177204
.guide-card {
178205
width: 100%;
179206
margin: 8px 0;
180207
padding: 0px;
181208
}
209+
182210
.guide-card:not(:first-child) {
183211
margin-left: 0;
184212
}
213+
185214
.guide-card ul {
186215
margin-left: 32px;
187216
}
217+
218+
img.component-image {
219+
max-width: 80px;
220+
}
188221
}
189222

190223
.breadcrumbs li {
191224
display: inline;
192225
}
226+
227+
a {
228+
color: #004B6B;
229+
text-decoration: none;
230+
border-bottom: 1px dotted #004B6B;
231+
}
232+
233+
a:hover {
234+
color: #999999;
235+
text-decoration: none;
236+
border-bottom: 1px dotted #999999;
237+
}
238+
239+
a:hover code {
240+
background: none;
241+
}
242+
243+
div.body p, div.body dd, div.body li, div.body blockquote {
244+
hyphens: none;
245+
}
246+
247+
/* dark theme */
248+
@media (prefers-color-scheme: dark) {
249+
250+
@media screen and (max-width: 875px) {
251+
div.documentwrapper {
252+
background-color: #212121;
253+
}
254+
255+
div.sphinxsidebar {
256+
background: #212121;
257+
color: #ececec;
258+
}
259+
260+
}
261+
262+
body, div.body {
263+
color: #ececec;
264+
background-color: #212121;
265+
}
266+
267+
img.dark-invert, img.logo {
268+
filter: invert(1);
269+
}
270+
271+
.row-odd {
272+
background-color: #282828;
273+
}
274+
275+
table.docutils {
276+
-webkit-box-shadow: 2px 2px 4px #3b3838;
277+
box-shadow: 2px 2px 4px #3b3838;
278+
}
279+
280+
div.body {
281+
color: #ececec;
282+
background-color: #212121;
283+
}
284+
285+
a, a.reference, a:visited {
286+
color: #00bfff;
287+
border-bottom: 1px dotted #00bfff;
288+
}
289+
290+
a:hover {
291+
color: #87ceeb;
292+
border-bottom: 1px solid #87ceeb;
293+
}
294+
295+
.toctree-wrapper a code {
296+
color: #00bfff;
297+
}
298+
299+
div.sphinxsidebar h3, div.sphinxsidebar h3 a {
300+
color: #ececec;
301+
}
302+
303+
div.sphinxsidebar ul {
304+
color: #ececec;
305+
}
306+
307+
div.sphinxsidebar a, .breadcrumbs a {
308+
color: #ececec;
309+
border-bottom: 1px dotted #ececec;
310+
}
311+
312+
div.sphinxsidebar a:hover, .breadcrumbs a:hover {
313+
border-bottom: 1px solid #ececec;
314+
}
315+
316+
.guide-card {
317+
background-color: #393939;
318+
}
319+
320+
pre {
321+
background-color: #0d1117;
322+
}
323+
324+
code {
325+
background-color: #424242;
326+
color: #e2e2e2;
327+
}
328+
329+
div.note {
330+
background-color: #2d2c2c;
331+
border: 1px solid #808080;
332+
}
333+
334+
div.warning {
335+
background-color: #5d1616;
336+
}
337+
338+
}

Diff for: _themes/esphome/theme.conf

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[theme]
2+
inherit = alabaster
3+
pygments_style = xcode
4+
pygments_dark_style = github-dark

Diff for: changelog/2021.10.0.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ ESPHome 2021.10.0 - 20th October 2021
1111
:columns: 3
1212

1313
AirThings Wave Mini, components/sensor/airthings_ble, airthings_logo.png
14-
Current-Based Cover, components/cover/current_based, flash.svg
14+
Current-Based Cover, components/cover/current_based, flash.svg, dark-invert
1515
Daly BMS, components/sensor/daly_bms, daly_bms.jpg
1616
EPEVER Tracer, cookbook/tracer-an, tracer-an.jpg
1717
LTR390, components/sensor/ltr390, ltr390.jpg
1818
Modbus Controller, components/modbus_controller, modbus.png
19-
Safe Mode Switch, components/switch/safe_mode, restart-alert.svg
19+
Safe Mode Switch, components/switch/safe_mode, restart-alert.svg, dark-invert
2020
SCD4X, components/sensor/scd4x, scd4x.jpg
2121
Tuya Cover, components/cover/tuya, tuya.png
2222

Diff for: changelog/2021.11.0.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ ESPHome 2021.11.0 - 17th November 2021
1212

1313
CSE7761, components/sensor/cse7761, cse7761.svg
1414
CAP1188 Capacitive Touch Sensor, components/binary_sensor/cap1188, cap1188.jpg
15-
ESP32 Camera Web Server, components/esp32_camera_web_server, camera.svg
16-
Improv via Serial, components/improv_serial, improv.svg
15+
ESP32 Camera Web Server, components/esp32_camera_web_server, camera.svg, dark-invert
16+
Improv via Serial, components/improv_serial, improv.svg, dark-invert
1717

1818

1919
State of the Open Smart Home

Diff for: changelog/2021.12.0.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ ESPHome 2021.12.0 - 11th December 2021
1010
.. imgtable::
1111
:columns: 3
1212

13-
Button Core, components/button/index, folder-open.svg
14-
Template Button, components/button/template, description.svg
15-
Restart Button, components/button/restart, restart.svg
16-
BLE Binary Output, components/output/ble_client, bluetooth.svg
13+
Button Core, components/button/index, folder-open.svg, dark-invert
14+
Template Button, components/button/template, description.svg, dark-invert
15+
Restart Button, components/button/restart, restart.svg, dark-invert
16+
BLE Binary Output, components/output/ble_client, bluetooth.svg, dark-invert
1717
Tuya Text Sensor, components/text_sensor/tuya, tuya.png
1818
SDP800 Series, components/sensor/sdp3x, sdp31.jpg, Pressure
1919

Diff for: changelog/2021.8.0.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ ESPHome 2021.8.0 - 18th August 2021
1212

1313
AM43, components/sensor/am43, am43.jpg
1414
AM43 Cover, components/cover/am43, am43.jpg
15-
Color Temperature Light, components/light/color_temperature, brightness-medium.svg
16-
Demo, components/demo, description.svg
15+
Color Temperature Light, components/light/color_temperature, brightness-medium.svg, dark-invert
16+
Demo, components/demo, description.svg, dark-invert
1717
DSMR, components/sensor/dsmr, dsmr.svg
1818
HRXL MaxSonar WR, components/sensor/hrxl_maxsonar_wr, hrxl_maxsonar_wr.jpg
1919
PipSolar - compatible PV Inverter, components/pipsolar, pipsolar.jpg
@@ -24,8 +24,8 @@ ESPHome 2021.8.0 - 18th August 2021
2424
Selec Meter, components/sensor/selec_meter, selec_meter_em2m.jpg
2525
T6613/15, components/sensor/t6615, t6615.jpg
2626
TLC5947, components/output/tlc5947, tlc5947.jpg
27-
Select Core, components/select/index, folder-open.svg
28-
Template Select, components/select/template, description.svg
27+
Select Core, components/select/index, folder-open.svg, dark-invert
28+
Template Select, components/select/template, description.svg, dark-invert
2929
TSL2591, components/sensor/tsl2591, tsl2591.jpg
3030

3131

Diff for: changelog/2021.9.0.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ESPHome 2021.9.0 - 15th September 2021
1111
:columns: 3
1212

1313
AirThings BLE, components/sensor/airthings_ble, airthings_logo.png
14-
H-bridge Fan, components/fan/hbridge, fan.svg
14+
H-bridge Fan, components/fan/hbridge, fan.svg, dark-invert
1515
ST7920, components/display/st7920, st7920.jpg
1616

1717

Diff for: changelog/2022.1.0.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ ESPHome 2022.1.0 - 19th January 2022
1717
Growatt Solar, components/sensor/growatt_solar, growatt.jpg
1818
INA260, components/sensor/ina260, ina260.jpg
1919
Inkplate 10, components/display/inkplate6, inkplate6.jpg
20-
Kalman Combinator, components/sensor/kalman_combinator, function.svg
20+
Kalman Combinator, components/sensor/kalman_combinator, function.svg, dark-invert
2121
MCP3204, components/sensor/mcp3204, mcp3204.jpg
2222
MCP47A1, components/output/mcp47a1, mcp47a1.svg
23-
Midea IR Climate, components/climate/ir_climate, air-conditioner-ir.svg
24-
Safe Mode Button, components/button/safe_mode, restart-alert.svg
25-
Shutdown Button, components/button/shutdown, power_settings.svg
23+
Midea IR Climate, components/climate/ir_climate, air-conditioner-ir.svg, dark-invert
24+
Safe Mode Button, components/button/safe_mode, restart-alert.svg, dark-invert
25+
Shutdown Button, components/button/shutdown, power_settings.svg, dark-invert
2626
Tuya Number, components/number/tuya, tuya.png
2727

2828

Diff for: changelog/2022.10.0.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ ESPHome 2022.10.0 - 19th October 2022
1010
.. imgtable::
1111
:columns: 2
1212

13-
BLE Client RSSI Sensor, components/sensor/ble_client, bluetooth.svg
14-
ZHLT01 IR Climate, components/climate/climate_ir, air-conditioner-ir.svg
13+
BLE Client RSSI Sensor, components/sensor/ble_client, bluetooth.svg, dark-invert
14+
ZHLT01 IR Climate, components/climate/climate_ir, air-conditioner-ir.svg, dark-invert
1515

1616

1717

Diff for: changelog/2022.11.0.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ ESPHome 2022.11.0 - 16th November 2022
1111
:columns: 4
1212

1313
RP2040, components/rp2040, rp2040.svg
14-
WL-134 Pet Tag Sensor , components/text_sensor/wl_134, fingerprint.svg
15-
Ethernet Info, components/text_sensor/ethernet_info, ethernet.svg
14+
WL-134 Pet Tag Sensor , components/text_sensor/wl_134, fingerprint.svg, dark-invert
15+
Ethernet Info, components/text_sensor/ethernet_info, ethernet.svg, dark-invert
1616
Atlas Scientific Peristaltic Pump, components/ezo_pmp, ezo-pmp.jpg
1717
ADC128S102, components/sensor/adc128s102, adc128s102.png
18-
Daikin BRC, components/climate/climate_ir, air-conditioner-ir.svg
19-
Display Menu Core, components/display_menu/index, folder-open.svg
18+
Daikin BRC, components/climate/climate_ir, air-conditioner-ir.svg, dark-invert
19+
Display Menu Core, components/display_menu/index, folder-open.svg, dark-invert
2020
LCD Menu, components/display_menu/lcd_menu, lcd_menu.png
2121

2222

Diff for: changelog/2022.12.0.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ESPHome 2022.12.0 - 14th December 2022
1111
:columns: 3
1212

1313
ESP32, components/esp32, esp32.svg
14-
Bluetooth Proxy, components/bluetooth_proxy, bluetooth.svg
14+
Bluetooth Proxy, components/bluetooth_proxy, bluetooth.svg, dark-invert
1515
SN74HC165 I/O Expander, components/sn74hc165, sn74hc595.jpg
1616

1717
The festive holidays are coming early and bring you an ESPHome release 1 week earlier than normal.

0 commit comments

Comments
 (0)