Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn committed Apr 27, 2024
1 parent 7d2b692 commit d73d273
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 1 deletion.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
_site/
.sass-cache/
.jekyll-metadata
assets/

5 changes: 5 additions & 0 deletions docs/assets/core.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
# Front matter comment to ensure Jekyll properly reads file.
---

@import 'main';
Binary file added docs/assets/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions docs/assets/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
(function (document) {
document.addEventListener('DOMContentLoaded', function () {

var switcher = document.querySelector('#color-switcher')
var html = document.querySelector('html')
var images = document.querySelectorAll('.image-switchable')

switcher.addEventListener('click', function () {
// Reload images:
for (var i = 0; i < images.length; i++) {
var srcNext = images[i].getAttribute('data-src')
var srcCurrent = images[i].getAttribute('src')
images[i].setAttribute('src', srcNext)
images[i].setAttribute('data-src', srcCurrent)
}

// Toggle styles:
html.classList.toggle('dark-mode')
html.classList.toggle('white-mode')

// Set button text:
var textNext = switcher.getAttribute('data-text')
var textCurrent = switcher.innerText

switcher.innerText = textNext
switcher.setAttribute('data-text', textCurrent)
})
})
})(document)
Binary file added docs/assets/touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d73d273

Please sign in to comment.