Skip to content

Commit

Permalink
Remove unintended dashes at bottom of page
Browse files Browse the repository at this point in the history
  • Loading branch information
afterdusk committed Apr 17, 2021
1 parent a926b7b commit 68040f5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions _includes/dark_mode.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
---
---
<script>
const darkModeQuery = '(prefers-color-scheme: dark)';
const darkModeClass = 'dark-mode'

{% assign dark_mode = site.dark_mode | default: "system" %}

{% if dark_mode == "system"%}
{% if dark_mode == "system" %}
// set initial theme based on system preferences
if (window.matchMedia && window.matchMedia(darkModeQuery).matches) {
document.body.classList.add(darkModeClass);
Expand All @@ -18,12 +16,12 @@
});
{% endif %}

{% if dark_mode == "always"%}
{% if dark_mode == "always" %}
// set dark mode
document.body.classList.add(darkModeClass);
{% endif %}

{% if dark_mode == "never"%}
// do nothing, since light mode is by default
{% if dark_mode == "never" %}
// do nothing, since dark mode is off by default
{% endif %}
</script>
2 changes: 1 addition & 1 deletion namecard.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Gem::Specification.new do |spec|
spec.name = "namecard"
spec.version = "0.1.2"
spec.version = "0.1.3"
spec.authors = ["afterdusk"]
spec.email = ["[email protected]"]

Expand Down

0 comments on commit 68040f5

Please sign in to comment.