mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
Deploying to gh-pages from @ vagrant-libvirt/vagrant-libvirt@fddc9c32d6 🚀
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
{"files":{"js/site_constants-e1ac483f8cbbb2d44940348129b4f096317606c1e27aa57fe14734259e395fe6.js":{"logical_path":"js/site_constants.js","mtime":"2022-10-30T11:29:43+00:00","size":98,"digest":"e1ac483f8cbbb2d44940348129b4f096317606c1e27aa57fe14734259e395fe6","integrity":"sha256-4axIP4y7stRJQDSBKbTwljF2BsHieqV/4Uc0JZ45X+Y="}},"assets":{"js/site_constants.js":"js/site_constants-e1ac483f8cbbb2d44940348129b4f096317606c1e27aa57fe14734259e395fe6.js"}}
|
||||
{"files":{"js/site_constants-e1ac483f8cbbb2d44940348129b4f096317606c1e27aa57fe14734259e395fe6.js":{"logical_path":"js/site_constants.js","mtime":"2022-11-02T13:43:27+00:00","size":98,"digest":"e1ac483f8cbbb2d44940348129b4f096317606c1e27aa57fe14734259e395fe6","integrity":"sha256-4axIP4y7stRJQDSBKbTwljF2BsHieqV/4Uc0JZ45X+Y="}},"assets":{"js/site_constants.js":"js/site_constants-e1ac483f8cbbb2d44940348129b4f096317606c1e27aa57fe14734259e395fe6.js"}}
|
||||
63
assets/js/color_scheme.js
Normal file
63
assets/js/color_scheme.js
Normal file
@@ -0,0 +1,63 @@
|
||||
function setTheme(theme) {
|
||||
if (theme === "dark") {
|
||||
jtd.setTheme('dark');
|
||||
document.documentElement.setAttribute('data-theme', 'dark');
|
||||
window.localStorage.setItem('theme', 'dark');
|
||||
} else {
|
||||
jtd.setTheme('light');
|
||||
document.documentElement.setAttribute('data-theme', 'light');
|
||||
window.localStorage.setItem('theme', 'light');
|
||||
}
|
||||
}
|
||||
|
||||
if (window.matchMedia) {
|
||||
window.matchMedia('(prefers-color-scheme: dark)')
|
||||
.addEventListener('change', event => {
|
||||
if (event.matches) {
|
||||
setTheme('dark');
|
||||
} else {
|
||||
setTheme('light');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function getUserThemePreference() {
|
||||
return localStorage.getItem('theme') || getComputedStyle(document.documentElement).getPropertyValue('content') || 'system';
|
||||
}
|
||||
|
||||
function saveUserThemePreference(preference) {
|
||||
localStorage.setItem('theme', preference);
|
||||
}
|
||||
|
||||
function getAppliedMode(preference) {
|
||||
if (preference === 'dark') {
|
||||
return 'dark';
|
||||
}
|
||||
if (preference === 'light') {
|
||||
return 'light';
|
||||
}
|
||||
// system
|
||||
if (matchMedia('(prefers-color-scheme: dark)').matches) {
|
||||
return 'dark';
|
||||
}
|
||||
return 'light';
|
||||
}
|
||||
|
||||
const colorScheme = document.querySelector('meta[name="color-scheme"]');
|
||||
function setAppliedMode(mode) {
|
||||
setTheme(mode);
|
||||
}
|
||||
|
||||
function modeSwitcher() {
|
||||
let currentMode = document.documentElement.getAttribute('data-theme');
|
||||
if (currentMode === "dark") {
|
||||
setAppliedMode('light');
|
||||
document.getElementById("theme-toggle").innerHTML = "Dark Mode";
|
||||
} else {
|
||||
setAppliedMode('dark');
|
||||
document.getElementById("theme-toggle").innerHTML = "Light Mode";
|
||||
}
|
||||
}
|
||||
|
||||
let theme = getUserThemePreference();
|
||||
setAppliedMode(getAppliedMode(theme));
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
feed.xml
2
feed.xml
@@ -1 +1 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.9.2">Jekyll</generator><link href="https://vagrant-libvirt.github.io/vagrant-libvirt/feed.xml" rel="self" type="application/atom+xml" /><link href="https://vagrant-libvirt.github.io/vagrant-libvirt/" rel="alternate" type="text/html" /><updated>2022-10-30T11:30:32+00:00</updated><id>https://vagrant-libvirt.github.io/vagrant-libvirt/feed.xml</id><title type="html">Vagrant Libvirt Documentation</title><subtitle>Create and manage Vagrant machines using Libvirt/QEMU</subtitle></feed>
|
||||
<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.9.2">Jekyll</generator><link href="https://vagrant-libvirt.github.io/vagrant-libvirt/feed.xml" rel="self" type="application/atom+xml" /><link href="https://vagrant-libvirt.github.io/vagrant-libvirt/" rel="alternate" type="text/html" /><updated>2022-11-02T13:44:19+00:00</updated><id>https://vagrant-libvirt.github.io/vagrant-libvirt/feed.xml</id><title type="html">Vagrant Libvirt Documentation</title><subtitle>Create and manage Vagrant machines using Libvirt/QEMU</subtitle></feed>
|
||||
17
index.html
17
index.html
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
packaging.html
Normal file
1
packaging.html
Normal file
File diff suppressed because one or more lines are too long
1
troubleshooting.html
Normal file
1
troubleshooting.html
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user