more fixes for broken achievements and small bugs
This commit is contained in:
parent
f103dc5c38
commit
9775b97893
11 changed files with 39 additions and 26 deletions
|
@ -1,13 +1,19 @@
|
|||
import { enable, disable, auto, setFetchMethod } from 'darkreader';
|
||||
import { darkmode } from "@params";
|
||||
import * as params from "@params";
|
||||
|
||||
const {
|
||||
defaultColorScheme,
|
||||
theme,
|
||||
fixes,
|
||||
} = darkmode.darkreader;
|
||||
|
||||
setFetchMethod(window.fetch)
|
||||
const darkreader = params?.darkmode?.darkreader || {};
|
||||
const defaultColorScheme = darkreader.defaultColorScheme || 'system';
|
||||
const theme = {
|
||||
brightness: 100,
|
||||
contrast: 100,
|
||||
sepia: 0,
|
||||
...(darkreader.theme || {}),
|
||||
};
|
||||
const fixes = {
|
||||
invert: ['img[src$=".svg"]'],
|
||||
...(darkreader.fixes || {}),
|
||||
};
|
||||
setFetchMethod(window.fetch);
|
||||
|
||||
export function setSchemeDark() {
|
||||
enable(theme, fixes);
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import { getDeviceState } from '../core';
|
||||
|
||||
function fourColumRow(gallery, entries, i) {
|
||||
let entry1 = document.createElement("div");
|
||||
entry1.classList.add("col-lg-6", "m-0", "p-0");
|
||||
|
@ -123,6 +125,7 @@ function singleColumnRow(gallery, entries, i) {
|
|||
}
|
||||
|
||||
function showAchievements() {
|
||||
const { isLaptop, isTablet } = getDeviceState()
|
||||
// show achievements from achievements-holder div
|
||||
let gallery = document.getElementById("gallery");
|
||||
if (gallery == null) {
|
||||
|
@ -204,8 +207,8 @@ function showAchievements() {
|
|||
this.children["caption"].classList.toggle("hidden");
|
||||
}
|
||||
if (this.children["enlarge-icon"] != undefined) {
|
||||
this.children["enlarge-icon"].classList.toggle("fa-search-plus");
|
||||
this.children["enlarge-icon"].classList.toggle("fa-times");
|
||||
this.getElementsByClassName('fa-xmark')[0].classList.toggle('hidden');
|
||||
this.getElementsByClassName('fa-magnifying-glass-plus')[0].classList.toggle('hidden');
|
||||
}
|
||||
if (this.children["achievement-title"] != undefined) {
|
||||
this.children["achievement-title"].classList.toggle("hidden");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue