mirror of
https://github.com/getnamingo/registry.git
synced 2025-08-25 02:13:26 +02:00
Initial upload of the control panel
This commit is contained in:
parent
f21bd93fbc
commit
7eab26586c
791 changed files with 312718 additions and 0 deletions
32
cp/public/assets/js/demo-theme.js
Normal file
32
cp/public/assets/js/demo-theme.js
Normal file
|
@ -0,0 +1,32 @@
|
|||
/*!
|
||||
* Tabler v1.0.0-beta16 (https://tabler.io)
|
||||
* @version 1.0.0-beta16
|
||||
* @link https://tabler.io
|
||||
* Copyright 2018-2022 The Tabler Authors
|
||||
* Copyright 2018-2022 codecalm.net Paweł Kuna
|
||||
* Licensed under MIT (https://github.com/tabler/tabler/blob/master/LICENSE)
|
||||
*/
|
||||
(function (factory) {
|
||||
typeof define === 'function' && define.amd ? define(factory) :
|
||||
factory();
|
||||
})((function () { 'use strict';
|
||||
|
||||
var themeStorageKey = 'tablerTheme';
|
||||
var defaultTheme = 'light';
|
||||
var selectedTheme;
|
||||
var params = new Proxy(new URLSearchParams(window.location.search), {
|
||||
get: function get(searchParams, prop) {
|
||||
return searchParams.get(prop);
|
||||
}
|
||||
});
|
||||
if (!!params.theme) {
|
||||
localStorage.setItem(themeStorageKey, params.theme);
|
||||
selectedTheme = params.theme;
|
||||
} else {
|
||||
var storedTheme = localStorage.getItem(themeStorageKey);
|
||||
selectedTheme = storedTheme ? storedTheme : defaultTheme;
|
||||
}
|
||||
document.body.classList.remove('theme-dark', 'theme-light');
|
||||
document.body.classList.add("theme-".concat(selectedTheme));
|
||||
|
||||
}));
|
Loading…
Add table
Add a link
Reference in a new issue