Dark mode README

This commit is contained in:
be5invis 2022-01-14 01:49:55 -08:00
parent 5c910ffc7f
commit 57b45643d5
2747 changed files with 1021 additions and 1030 deletions

View file

@ -11,7 +11,7 @@ ipc.on("scroll", function () {
onScroll.apply(this, arguments);
setTimeout(function () {
ipc.send("snapshot", "scroll-done");
}, 500);
}, 100);
});
let onComplete = function () {};
ipc.on("complete", function () {
@ -110,6 +110,9 @@ function cbAmendCharacterVariantContents(element, p) {
function captureElement(options, callback) {
window.scroll(0, 0);
setTimeout(function () {
// Set theme
document.querySelector("body").className = `color-${options.theme}`;
const element = document.querySelector(options.el);
if (options.applyClass) {
element.className = options.applyClass;
@ -149,7 +152,17 @@ function captureElement(options, callback) {
}
window.onload = function () {
const snapshotTasks = [...auxData.readmeSnapshotTasks, ...packagingTasks];
const snapshotTasksRaw = [...auxData.readmeSnapshotTasks, ...packagingTasks];
let snapshotTasks = [];
for (const task of snapshotTasksRaw) {
for (const theme of ["dark", "light"]) {
snapshotTasks.push({
...task,
theme,
name: task.name + "." + theme
});
}
}
let current = 0;
const step = function () {
const doit = function () {