Skip to content
This repository was archived by the owner on Aug 20, 2025. It is now read-only.

Commit bccb4ec

Browse files
committed
Style: implement light/dark aka day/night mode. Fixes #3.
1 parent d306236 commit bccb4ec

File tree

3 files changed

+30
-13
lines changed

3 files changed

+30
-13
lines changed

_includes/header.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
<nav class="site-nav">
55
<a href="#" class="menu-icon">
66
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 18 15" enable-background="new 0 0 18 15" xml:space="preserve">
7-
<path fill="white" d="M18,1.484c0,0.82-0.665,1.484-1.484,1.484H1.484C0.665,2.969,0,2.304,0,1.484l0,0C0,0.665,0.665,0,1.484,0h15.031C17.335,0,18,0.665,18,1.484L18,1.484z"/>
8-
<path fill="white" d="M18,7.516C18,8.335,17.335,9,16.516,9H1.484C0.665,9,0,8.335,0,7.516l0,0c0-0.82,0.665-1.484,1.484-1.484h15.031C17.335,6.031,18,6.696,18,7.516L18,7.516z"/>
9-
<path fill="white" d="M18,13.516C18,14.335,17.335,15,16.516,15H1.484C0.665,15,0,14.335,0,13.516l0,0c0-0.82,0.665-1.484,1.484-1.484h15.031C17.335,12.031,18,12.696,18,13.516L18,13.516z"/>
7+
<path d="M18,1.484c0,0.82-0.665,1.484-1.484,1.484H1.484C0.665,2.969,0,2.304,0,1.484l0,0C0,0.665,0.665,0,1.484,0h15.031C17.335,0,18,0.665,18,1.484L18,1.484z"/>
8+
<path d="M18,7.516C18,8.335,17.335,9,16.516,9H1.484C0.665,9,0,8.335,0,7.516l0,0c0-0.82,0.665-1.484,1.484-1.484h15.031C17.335,6.031,18,6.696,18,7.516L18,7.516z"/>
9+
<path d="M18,13.516C18,14.335,17.335,15,16.516,15H1.484C0.665,15,0,14.335,0,13.516l0,0c0-0.82,0.665-1.484,1.484-1.484h15.031C17.335,12.031,18,12.696,18,13.516L18,13.516z"/>
1010
</svg>
1111
</a>
1212
<div class="trigger">

_includes/privacy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# [Privacy first, features second.](Privacy)
1+
# [Privacy](#Privacy)
22

33
OpenTracks and OSM Dashboard:
44
* _do not contain any in-app analytics_

static/main.css

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,12 @@ html, body {
66
font-size: 1em;
77
line-height: 1.5;
88

9-
color: white;
10-
background-color: #0E0E0E;
11-
129
scroll-behavior: smooth;
1310
}
1411

1512
a {
1613
text-decoration: none;
17-
color: white;
14+
color: black;
1815
}
1916

2017
a:hover
@@ -30,10 +27,8 @@ h3 {
3027
margin-top: 3rem;
3128
}
3229

33-
3430
/* Site header */
3531
header {
36-
border-top: 0.2em solid #333;
3732
border-bottom: 0.1em solid #e8e8e8;
3833
min-height: 3em;
3934

@@ -58,6 +53,7 @@ header {
5853

5954
.site-nav .menu-icon {
6055
display: none;
56+
color: #505050;
6157
}
6258

6359
.site-nav .page-link {
@@ -105,7 +101,6 @@ header {
105101
.site-nav .menu-icon {
106102
display: block;
107103
font-size: 1.5em;
108-
color: #505050;
109104
float: right;
110105
width: 2em;
111106
text-align: center;
@@ -122,13 +117,20 @@ header {
122117
margin-bottom: 5px;
123118
display: none;
124119

125-
background-color: darkgray;
126120
border-radius: 5px;
127-
box-shadow: 0.1em 0.1em #0E0E0E;
128121
}
129122

130123
.site-nav:hover .trigger {
131124
display: block;
125+
background-color: #FFCF99; /* Slightly ligher than holo accent color FF8800 */
126+
127+
border-radius: 5px;
128+
box-shadow: 0.1em 0.1em #0E0E0E;
129+
}
130+
@media (prefers-color-scheme: dark) {
131+
.site-nav:hover .trigger {
132+
background-color: #FF8800 !important;
133+
}
132134
}
133135

134136
.site-nav .page-link {
@@ -139,3 +141,18 @@ header {
139141
margin: 0;
140142
}
141143
}
144+
145+
@media (prefers-color-scheme: dark) {
146+
html, body {
147+
color: white;
148+
background-color: #0E0E0E;
149+
}
150+
151+
a {
152+
color: white;
153+
}
154+
155+
.site-nav .menu-icon svg path {
156+
fill: white;
157+
}
158+
}

0 commit comments

Comments
 (0)