Skip to content

Commit

Permalink
Merge pull request #45 from lynnpepin/light-themes
Browse files Browse the repository at this point in the history
feat: Added a light version and an automatic (light/dark) version for…
  • Loading branch information
pawroman committed Jun 23, 2023
2 parents 6e91e64 + 2b55b76 commit 910e50b
Show file tree
Hide file tree
Showing 15 changed files with 237 additions and 11 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,14 @@ of your `config.toml`:
[extra]

# One of: blue, green, orange, pink, red.
# Defaults to blue.
# Defaults to blue.
# Append -light for light themes, e.g. blue-light
# Or append -auto, e.g. blue-auto
accent_color = "green"

# One of: blue, dark, green, orange, pink, red.
# Enabling dark background will also modify primary font color
# to be darker.
# Defaults to accent color (or, if not accent color specified, to blue).
# One of: blue, dark, green, orange, pink, red, light, auto
# Enabling dark background will also modify primary font color to be darker.
# Defaults to accent color (or, if not accent color specified, to blue).
background_color = "dark"
```

Expand Down
7 changes: 4 additions & 3 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ highlight_theme = "boron"

# One of: blue, green, orange, pink, red.
# Defaults to blue.
# Append -light for light themes, e.g. blue-light
# Or append -auto, e.g. blue-auto
accent_color = "blue"

# One of: blue, dark, green, orange, pink, red.
# Enabling dark background will also modify primary font color
# to be darker.
# One of: blue, dark, green, orange, pink, red, light, auto
# Enabling dark background will also modify primary font color to be darker.
# Defaults to accent color (or, if not accent color specified, to blue).
background_color = "blue"

Expand Down
14 changes: 14 additions & 0 deletions sass/color/background_auto.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
:root {

@media (prefers-color-scheme: light) {
--background: white;

--color: #101010;
}

@media (prefers-color-scheme: dark) {
--background: #101010;

--color: #A9B7C6;
}
}
3 changes: 3 additions & 0 deletions sass/color/background_light.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
:root {
--background: #f0f0f0;
}
29 changes: 29 additions & 0 deletions sass/color/blue-auto.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
:root {
@media (prefers-color-scheme: dark) {
--accent: rgb(35,176,255);
--accent-alpha-70: rgba(35,176,255,.7);
--accent-alpha-20: rgba(35,176,255,.2);

--background: #101010;
--color: #f0f0f0;
--border-color: rgba(255,240,224,.125);

div.logo {
color: black;
}

}
@media (prefers-color-scheme: light) {
--accent: rgb(32,128,192);
--accent-alpha-70: rgba(32,128,192,.7);
--accent-alpha-20: rgba(32,128,192,.2);

--background: white;
--color: #201030;
--border-color: rgba(0,0,16,.125);

div.logo {
color: white;
}
}
}
12 changes: 12 additions & 0 deletions sass/color/blue-light.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
:root {
--accent: rgb(32,128,192);
--accent-alpha-70: rgba(32,128,192,.7);
--accent-alpha-20: rgba(32,128,192,.2);

--background: white;
--color: #1D212C;
--border-color: rgba(0, 0, 0, .1);
div.logo {
color: white;
}
}
29 changes: 29 additions & 0 deletions sass/color/green-auto.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
:root {
@media (prefers-color-scheme: dark) {
--accent: rgb(120,226,160);
--accent-alpha-70: rgba(120,226,160,.7);
--accent-alpha-20: rgba(120,226,160,.2);

--background: #101010;
--color: #f0f0f0;
--border-color: rgba(255,240,224,.125);

div.logo {
color: black;
}

}
@media (prefers-color-scheme: light) {
--accent: rgb(24, 192, 128);
--accent-alpha-70: rgba(24, 192, 128,.7);
--accent-alpha-20: rgba(24, 192, 128,.2);

--background: white;
--color: #201030;
--border-color: rgba(0,0,16,.125);

div.logo {
color: white;
}
}
}
12 changes: 12 additions & 0 deletions sass/color/green-light.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
:root {
--accent: rgb(24, 192, 128);
--accent-alpha-70: rgba(24, 192, 128,.7);
--accent-alpha-20: rgba(24, 192, 128,.2);

--background: white;
--color: #1D212C;
--border-color: rgba(0, 0, 0, .1);
div.logo {
color: white;
}
}
29 changes: 29 additions & 0 deletions sass/color/orange-auto.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
:root {
@media (prefers-color-scheme: dark) {
--accent: rgb(255,168,106);
--accent-alpha-70: rgba(255,168,106,.7);
--accent-alpha-20: rgba(255,168,106,.2);

--background: #101010;
--color: #f0f0f0;
--border-color: rgba(255,240,224,.125);

div.logo {
color: black;
}

}
@media (prefers-color-scheme: light) {
--accent: rgb(240,128,48);
--accent-alpha-70: rgba(240,128,48,.7);
--accent-alpha-20: rgba(240,128,48,.2);

--background: white;
--color: #201030;
--border-color: rgba(0,0,16,.125);

div.logo {
color: white;
}
}
}
12 changes: 12 additions & 0 deletions sass/color/orange-light.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
:root {
--accent: rgb(240,128,48);
--accent-alpha-70: rgba(240,128,48,.7);
--accent-alpha-20: rgba(240,128,48,.2);

--background: white;
--color: #1D212C;
--border-color: rgba(0, 0, 0, .1);
div.logo {
color: white;
}
}
29 changes: 29 additions & 0 deletions sass/color/pink-auto.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
:root {
@media (prefers-color-scheme: dark) {
--accent: rgb(224,64,192);
--accent-alpha-70: rgba(224,64,192);
--accent-alpha-20: rgba(224,64,192,.2);

--background: #101010;
--color: #f0f0f0;
--border-color: rgba(255,240,224,.125);

div.logo {
color: black;
}

}
@media (prefers-color-scheme: light) {
--accent: rgb(238,114,241);
--accent-alpha-70: rgba(238,114,241,.7);
--accent-alpha-20: rgba(238,114,241,.2);

--background: white;
--color: #201030;
--border-color: rgba(0,0,16,.125);

div.logo {
color: white;
}
}
}
12 changes: 12 additions & 0 deletions sass/color/pink-light.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
:root {
--accent: rgb(224,64,192);
--accent-alpha-70: rgba(224,64,192);
--accent-alpha-20: rgba(224,64,192,.2);

--background: white;
--color: #1D212C;
--border-color: rgba(0, 0, 0, .1);
div.logo {
color: white;
}
}
29 changes: 29 additions & 0 deletions sass/color/red-auto.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
:root {
@media (prefers-color-scheme: dark) {
--accent: rgb(255,98,102);
--accent-alpha-70: rgba(255,98,102,.7);
--accent-alpha-20: rgba(255,98,102,.2);

--background: #101010;
--color: #f0f0f0;
--border-color: rgba(255,240,224,.125);

div.logo {
color: black;
}

}
@media (prefers-color-scheme: light) {
--accent: rgb(240,48,64);
--accent-alpha-70: rgba(240,48,64,.7);
--accent-alpha-20: rgba(240,48,64,.2);

--background: white;
--color: #201030;
--border-color: rgba(0,0,16,.125);

div.logo {
color: white;
}
}
}
12 changes: 12 additions & 0 deletions sass/color/red-light.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
:root {
--accent: rgb(240,48,64);
--accent-alpha-70: rgba(240,48,64,.7);
--accent-alpha-20: rgba(240,48,64,.2);

--background: white;
--color: #1D212C;
--border-color: rgba(0, 0, 0, .1);
div.logo {
color: white;
}
}
8 changes: 5 additions & 3 deletions theme.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ repo = "https://github.com/panr/hugo-theme-terminal"
[extra]

# One of: blue, green, orange, pink, red.
# Defaults to blue.
# Append -light for light themes, e.g. blue-light
# Or append -auto, e.g. blue-auto
accent_color = "blue"

# One of: blue, dark, green, orange, pink, red.
# Enabling dark background will also modify primary font color
# to be darker.
# One of: blue, dark, green, orange, pink, red, light, auto
# Enabling dark background will also modify primary font color to be darker.
# Defaults to accent color (or, if not accent color specified, to blue).
background_color = "blue"

Expand Down

0 comments on commit 910e50b

Please sign in to comment.