diff options
Diffstat (limited to '')
-rw-r--r-- | assets/js/lib/themes.js | 28 | ||||
-rw-r--r-- | assets/js/settings.js | 3 | ||||
-rwxr-xr-x | dist/js/app.js | 2 | ||||
-rw-r--r-- | dist/js/lib/themes.js | 2 | ||||
-rw-r--r-- | dist/js/settings.js | 2 | ||||
-rwxr-xr-x | dist/pages/about.html | 2 | ||||
-rwxr-xr-x | dist/sw.js | 4 |
7 files changed, 36 insertions, 7 deletions
diff --git a/assets/js/lib/themes.js b/assets/js/lib/themes.js index c021e26..0415fd2 100644 --- a/assets/js/lib/themes.js +++ b/assets/js/lib/themes.js @@ -139,6 +139,34 @@ const THEME_COLOR_SCHEMES = { "color-btn-flat": "rgba(52, 52, 52, 1)", "color-btn-flat-disabled": "rgba(178, 178, 178, 1)" + }, + piratska: { + "color-primary": "rgba(246, 143, 53, 1)", + "color-secondary": "rgba(250, 165, 61, 1)", + "color-accent": "rgba(0, 0, 0, 1)", + "color-primary-light": "rgba(195, 191, 255, 1)", + "color-invalid": "rgba(192, 0, 0, 1)", + "color-primary-transparent": "rgba(252, 195, 126, 0.3)", + + "background-color": "rgba(255, 255, 255, 1)", + "background-accent": "rgba(158, 119, 0, 0.2)", + "background-accent-1": "rgb(215, 219, 192, 1)", + + "color-header-bold": "rgba(255, 255, 255, 1)", + "color-header-span": "rgba(255, 255, 255, 1)", + + "color-text": "rgba(0, 0, 0, 1)", + "color-text-light": "rgba(97, 97, 97, 1)", + "color-label-text": "rgba(158, 158, 158, 1)", + "color-table-hover": "rgba(242, 242, 242, 0.5)", + + "color-sidenav-background": "rgba(255, 255, 255, 1)", + "color-sidenav-text": "rgba(0, 0, 0, 0.87)", + "color-sidenav-header": "rgba(0, 0, 0, 0.54)", + "color-divider": "rgba(224, 224, 224, 1)", + + "color-btn-flat": "rgba(52, 52, 52, 1)", + "color-btn-flat-disabled": "rgba(178, 178, 178, 1)" } } diff --git a/assets/js/settings.js b/assets/js/settings.js index 2cc6029..3106f14 100644 --- a/assets/js/settings.js +++ b/assets/js/settings.js @@ -33,7 +33,8 @@ function shuffleArray(array) { function setUIAdditionalOptions(state) { var SENSITIVE_THEMES = { "left": "Left / leva", - "right": "Right / desna" + "right": "Right / desna", + "piratska": "Pirate / piratska" }; if (state === true) { var theme_keys = Object.keys(SENSITIVE_THEMES); diff --git a/dist/js/app.js b/dist/js/app.js index 422fb81..e8c2043 100755 --- a/dist/js/app.js +++ b/dist/js/app.js @@ -3,7 +3,7 @@ const app_version = "1.0.14-beta"; -const previous_commit = "1ce5c8b9f3c2e63dca9fb4a142b6494986196dad"; +const previous_commit = "c531b85798fde63320e0f6dd21cabc199cbb62d3"; if ("serviceWorker" in navigator) { navigator.serviceWorker.register("/sw.js") diff --git a/dist/js/lib/themes.js b/dist/js/lib/themes.js index e525a0f..1996b9f 100644 --- a/dist/js/lib/themes.js +++ b/dist/js/lib/themes.js @@ -1,4 +1,4 @@ -const THEME_COLOR_SCHEMES={light:{"color-primary":"rgba(0, 128, 83, 1)","color-secondary":"rgba(0, 77, 50, 1)","color-accent":"rgba(0, 156, 101, 1)","color-primary-light":"rgba(230, 250, 231, 1)","color-invalid":"rgba(192, 0, 0, 1)","color-primary-transparent":"rgba(0, 128, 83, 0.3)","background-color":"rgba(255, 255, 255, 1)","background-accent":"rgba(0, 156, 101, 0.2)","background-accent-1":"rgb(192, 219, 207, 1)","color-header-bold":"rgba(255, 255, 255, 1)","color-header-span":"rgba(255, 255, 255, 1)","color-text":"rgba(0, 0, 0, 1)","color-text-light":"rgba(97, 97, 97, 1)","color-label-text":"rgba(158, 158, 158, 1)","color-table-hover":"rgba(242, 242, 242, 0.5)","color-sidenav-background":"rgba(255, 255, 255, 1)","color-sidenav-text":"rgba(0, 0, 0, 0.87)","color-sidenav-header":"rgba(0, 0, 0, 0.54)","color-divider":"rgba(224, 224, 224, 1)","color-btn-flat":"rgba(52, 52, 52, 1)","color-btn-flat-disabled":"rgba(178, 178, 178, 1)"},dark:{"color-primary":"rgba(0, 128, 83, 1)","color-secondary":"rgba(0, 94, 61, 1)","color-accent":"rgba(20, 117, 83, 1)","color-primary-light":"rgba(6, 137, 9, 1)","color-invalid":"rgba(192, 0, 0, 1)","color-primary-transparent":"rgba(0, 128, 83, 0.3)","background-color":"rgba(31, 31, 31, 1)","background-accent":"rgba(0, 92, 44, 0.2)","background-accent-1":"rgb(26, 43, 32, 1)","color-header-bold":"rgba(255, 255, 255, 1)","color-header-span":"rgba(255, 255, 255, 1)","color-text":"rgba(189, 189, 189, 1)","color-text-light":"rgba(160, 160, 160, 1)","color-label-text":"rgba(158, 158, 158, 1)","color-table-hover":"rgba(70, 70, 70, 0.5)","color-sidenav-background":"rgba(31, 31, 31, 1)","color-sidenav-text":"rgba(189, 189, 189, 1)","color-sidenav-header":"rgba(189, 189, 189, 0.54)","color-divider":"rgba(80, 80, 80, 1)","color-btn-flat":"rgba(178, 178, 178, 1)","color-btn-flat-disabled":"rgba(52, 52, 52, 1)"},night:{"color-primary":"rgba(0, 79, 51, 1)","color-secondary":"rgba(0, 94, 61, 1)","color-accent":"rgba(28, 107, 79, 1)","color-primary-light":"rgba(0, 77, 2, 1)","color-invalid":"rgba(138, 0, 0, 1)","color-primary-transparent":"rgba(0, 79, 51, 0.3)","background-color":"rgba(0, 0, 0, 1)","background-accent":"rgba(0, 38, 18, 0.2)","background-accent-1":"rgb(20, 33, 25, 1)","color-header-bold":"rgba(255, 255, 255, 1)","color-header-span":"rgba(255, 255, 255, 1)","color-text":"rgba(255, 255, 255, 1)","color-text-light":"rgba(200, 200, 200, 1)","color-label-text":"rgba(158, 158, 158, 1)","color-table-hover":"rgba(43, 43, 43, 0.5)","color-sidenav-background":"rgba(0, 0, 0, 1)","color-sidenav-text":"rgba(255, 255, 255, 1)","color-sidenav-header":"rgba(255, 255, 255, 0.54)","color-divider":"rgba(50, 50, 50, 1)","color-btn-flat":"rgba(178, 178, 178, 1)","color-btn-flat-disabled":"rgba(52, 52, 52, 1)"},left:{"color-primary":"rgba(173, 0, 0, 1)","color-secondary":"rgba(148, 15, 15, 1)","color-accent":"rgba(181, 42, 42, 1)","color-primary-light":"rgba(250, 230, 230, 1)","color-invalid":"rgba(120, 0, 108, 1)","color-primary-transparent":"rgba(173, 0, 0, 0.3)","background-color":"rgba(255, 255, 255, 1)","background-accent":"rgba(199, 38, 38, 0.2)","background-accent-1":"rgb(219, 192, 192, 1)","color-header-bold":"rgba(255, 255, 255, 1)","color-header-span":"rgba(255, 255, 255, 1)","color-text":"rgba(0, 0, 0, 1)","color-text-light":"rgba(97, 97, 97, 1)","color-label-text":"rgba(158, 158, 158, 1)","color-table-hover":"rgba(242, 242, 242, 0.5)","color-sidenav-background":"rgba(255, 255, 255, 1)","color-sidenav-text":"rgba(0, 0, 0, 0.87)","color-sidenav-header":"rgba(0, 0, 0, 0.54)","color-divider":"rgba(224, 224, 224, 1)","color-btn-flat":"rgba(52, 52, 52, 1)","color-btn-flat-disabled":"rgba(178, 178, 178, 1)"},right:{"color-primary":"rgba(7, 0, 105, 1)","color-secondary":"rgba(0, 94, 156, 1)","color-accent":"rgba(217, 214, 80, 1)","color-primary-light":"rgba(195, 191, 255, 1)","color-invalid":"rgba(192, 0, 0, 1)","color-primary-transparent":"rgba(7, 0, 105, 0.3)","background-color":"rgba(255, 255, 255, 1)","background-accent":"rgba(0, 60, 156, 0.2)","background-accent-1":"rgb(215, 219, 192, 1)","color-header-bold":"rgba(255, 255, 255, 1)","color-header-span":"rgba(255, 255, 255, 1)","color-text":"rgba(0, 0, 0, 1)","color-text-light":"rgba(97, 97, 97, 1)","color-label-text":"rgba(158, 158, 158, 1)","color-table-hover":"rgba(242, 242, 242, 0.5)","color-sidenav-background":"rgba(255, 255, 255, 1)","color-sidenav-text":"rgba(0, 0, 0, 0.87)","color-sidenav-header":"rgba(0, 0, 0, 0.54)","color-divider":"rgba(224, 224, 224, 1)","color-btn-flat":"rgba(52, 52, 52, 1)","color-btn-flat-disabled":"rgba(178, 178, 178, 1)"}} +const THEME_COLOR_SCHEMES={light:{"color-primary":"rgba(0, 128, 83, 1)","color-secondary":"rgba(0, 77, 50, 1)","color-accent":"rgba(0, 156, 101, 1)","color-primary-light":"rgba(230, 250, 231, 1)","color-invalid":"rgba(192, 0, 0, 1)","color-primary-transparent":"rgba(0, 128, 83, 0.3)","background-color":"rgba(255, 255, 255, 1)","background-accent":"rgba(0, 156, 101, 0.2)","background-accent-1":"rgb(192, 219, 207, 1)","color-header-bold":"rgba(255, 255, 255, 1)","color-header-span":"rgba(255, 255, 255, 1)","color-text":"rgba(0, 0, 0, 1)","color-text-light":"rgba(97, 97, 97, 1)","color-label-text":"rgba(158, 158, 158, 1)","color-table-hover":"rgba(242, 242, 242, 0.5)","color-sidenav-background":"rgba(255, 255, 255, 1)","color-sidenav-text":"rgba(0, 0, 0, 0.87)","color-sidenav-header":"rgba(0, 0, 0, 0.54)","color-divider":"rgba(224, 224, 224, 1)","color-btn-flat":"rgba(52, 52, 52, 1)","color-btn-flat-disabled":"rgba(178, 178, 178, 1)"},dark:{"color-primary":"rgba(0, 128, 83, 1)","color-secondary":"rgba(0, 94, 61, 1)","color-accent":"rgba(20, 117, 83, 1)","color-primary-light":"rgba(6, 137, 9, 1)","color-invalid":"rgba(192, 0, 0, 1)","color-primary-transparent":"rgba(0, 128, 83, 0.3)","background-color":"rgba(31, 31, 31, 1)","background-accent":"rgba(0, 92, 44, 0.2)","background-accent-1":"rgb(26, 43, 32, 1)","color-header-bold":"rgba(255, 255, 255, 1)","color-header-span":"rgba(255, 255, 255, 1)","color-text":"rgba(189, 189, 189, 1)","color-text-light":"rgba(160, 160, 160, 1)","color-label-text":"rgba(158, 158, 158, 1)","color-table-hover":"rgba(70, 70, 70, 0.5)","color-sidenav-background":"rgba(31, 31, 31, 1)","color-sidenav-text":"rgba(189, 189, 189, 1)","color-sidenav-header":"rgba(189, 189, 189, 0.54)","color-divider":"rgba(80, 80, 80, 1)","color-btn-flat":"rgba(178, 178, 178, 1)","color-btn-flat-disabled":"rgba(52, 52, 52, 1)"},night:{"color-primary":"rgba(0, 79, 51, 1)","color-secondary":"rgba(0, 94, 61, 1)","color-accent":"rgba(28, 107, 79, 1)","color-primary-light":"rgba(0, 77, 2, 1)","color-invalid":"rgba(138, 0, 0, 1)","color-primary-transparent":"rgba(0, 79, 51, 0.3)","background-color":"rgba(0, 0, 0, 1)","background-accent":"rgba(0, 38, 18, 0.2)","background-accent-1":"rgb(20, 33, 25, 1)","color-header-bold":"rgba(255, 255, 255, 1)","color-header-span":"rgba(255, 255, 255, 1)","color-text":"rgba(255, 255, 255, 1)","color-text-light":"rgba(200, 200, 200, 1)","color-label-text":"rgba(158, 158, 158, 1)","color-table-hover":"rgba(43, 43, 43, 0.5)","color-sidenav-background":"rgba(0, 0, 0, 1)","color-sidenav-text":"rgba(255, 255, 255, 1)","color-sidenav-header":"rgba(255, 255, 255, 0.54)","color-divider":"rgba(50, 50, 50, 1)","color-btn-flat":"rgba(178, 178, 178, 1)","color-btn-flat-disabled":"rgba(52, 52, 52, 1)"},left:{"color-primary":"rgba(173, 0, 0, 1)","color-secondary":"rgba(148, 15, 15, 1)","color-accent":"rgba(181, 42, 42, 1)","color-primary-light":"rgba(250, 230, 230, 1)","color-invalid":"rgba(120, 0, 108, 1)","color-primary-transparent":"rgba(173, 0, 0, 0.3)","background-color":"rgba(255, 255, 255, 1)","background-accent":"rgba(199, 38, 38, 0.2)","background-accent-1":"rgb(219, 192, 192, 1)","color-header-bold":"rgba(255, 255, 255, 1)","color-header-span":"rgba(255, 255, 255, 1)","color-text":"rgba(0, 0, 0, 1)","color-text-light":"rgba(97, 97, 97, 1)","color-label-text":"rgba(158, 158, 158, 1)","color-table-hover":"rgba(242, 242, 242, 0.5)","color-sidenav-background":"rgba(255, 255, 255, 1)","color-sidenav-text":"rgba(0, 0, 0, 0.87)","color-sidenav-header":"rgba(0, 0, 0, 0.54)","color-divider":"rgba(224, 224, 224, 1)","color-btn-flat":"rgba(52, 52, 52, 1)","color-btn-flat-disabled":"rgba(178, 178, 178, 1)"},right:{"color-primary":"rgba(7, 0, 105, 1)","color-secondary":"rgba(0, 94, 156, 1)","color-accent":"rgba(217, 214, 80, 1)","color-primary-light":"rgba(195, 191, 255, 1)","color-invalid":"rgba(192, 0, 0, 1)","color-primary-transparent":"rgba(7, 0, 105, 0.3)","background-color":"rgba(255, 255, 255, 1)","background-accent":"rgba(0, 60, 156, 0.2)","background-accent-1":"rgb(215, 219, 192, 1)","color-header-bold":"rgba(255, 255, 255, 1)","color-header-span":"rgba(255, 255, 255, 1)","color-text":"rgba(0, 0, 0, 1)","color-text-light":"rgba(97, 97, 97, 1)","color-label-text":"rgba(158, 158, 158, 1)","color-table-hover":"rgba(242, 242, 242, 0.5)","color-sidenav-background":"rgba(255, 255, 255, 1)","color-sidenav-text":"rgba(0, 0, 0, 0.87)","color-sidenav-header":"rgba(0, 0, 0, 0.54)","color-divider":"rgba(224, 224, 224, 1)","color-btn-flat":"rgba(52, 52, 52, 1)","color-btn-flat-disabled":"rgba(178, 178, 178, 1)"},piratska:{"color-primary":"rgba(246, 143, 53, 1)","color-secondary":"rgba(250, 165, 61, 1)","color-accent":"rgba(0, 0, 0, 1)","color-primary-light":"rgba(195, 191, 255, 1)","color-invalid":"rgba(192, 0, 0, 1)","color-primary-transparent":"rgba(252, 195, 126, 0.3)","background-color":"rgba(255, 255, 255, 1)","background-accent":"rgba(158, 119, 0, 0.2)","background-accent-1":"rgb(215, 219, 192, 1)","color-header-bold":"rgba(255, 255, 255, 1)","color-header-span":"rgba(255, 255, 255, 1)","color-text":"rgba(0, 0, 0, 1)","color-text-light":"rgba(97, 97, 97, 1)","color-label-text":"rgba(158, 158, 158, 1)","color-table-hover":"rgba(242, 242, 242, 0.5)","color-sidenav-background":"rgba(255, 255, 255, 1)","color-sidenav-text":"rgba(0, 0, 0, 0.87)","color-sidenav-header":"rgba(0, 0, 0, 0.54)","color-divider":"rgba(224, 224, 224, 1)","color-btn-flat":"rgba(52, 52, 52, 1)","color-btn-flat-disabled":"rgba(178, 178, 178, 1)"}} function applyTheme(themeName){for(const[property,value]of Object.entries(THEME_COLOR_SCHEMES[themeName])){document.documentElement.style.setProperty(`--${property}`,value);}} document.addEventListener("DOMContentLoaded",()=>{localforage.getItem("theme").then((selectedTheme)=>{if(selectedTheme==null){let isOsDarkTheme=window.matchMedia&&window.matchMedia('(prefers-color-scheme: dark)').matches;applyTheme(isOsDarkTheme?"dark":"light");}else{applyTheme(selectedTheme);}});});
\ No newline at end of file diff --git a/dist/js/settings.js b/dist/js/settings.js index 8af2848..9e52861 100644 --- a/dist/js/settings.js +++ b/dist/js/settings.js @@ -3,7 +3,7 @@ async function setLanguage(langCode){localforage.setItem("chosenLang",langCode). async function setTheme(targetTheme){localforage.setItem("theme",targetTheme).then((value)=>{console.log("Theme set: "+value);UIAlert(D("themeSet"),"setTheme(): themeSet");});} async function setErrorReporting(targetE){localforage.setItem("errorReporting",targetE).then((value)=>{console.log("ErrorReporing set: "+value);UIAlert(D("errorReportingSet"),"setErrorReporting(): errorReportingSet");});} function shuffleArray(array){for(var i=array.length-1;i>0;i--){var j=Math.floor(Math.random()*(i+1));var temp=array[i];array[i]=array[j];array[j]=temp;}} -function setUIAdditionalOptions(state){var SENSITIVE_THEMES={"left":"Left / leva","right":"Right / desna"};if(state===true){var theme_keys=Object.keys(SENSITIVE_THEMES);shuffleArray(theme_keys);theme_keys.forEach((item)=>{var option_element=$(`<option value="${item}" id="option-${item}" data-theme="${item}">${SENSITIVE_THEMES[item]}</option>`);$("#select-theme").append(option_element);});}else{Object.keys(SENSITIVE_THEMES).forEach((item)=>{$("#option-"+item).remove();});} +function setUIAdditionalOptions(state){var SENSITIVE_THEMES={"left":"Left / leva","right":"Right / desna","piratska":"Pirate / piratska"};if(state===true){var theme_keys=Object.keys(SENSITIVE_THEMES);shuffleArray(theme_keys);theme_keys.forEach((item)=>{var option_element=$(`<option value="${item}" id="option-${item}" data-theme="${item}">${SENSITIVE_THEMES[item]}</option>`);$("#select-theme").append(option_element);});}else{Object.keys(SENSITIVE_THEMES).forEach((item)=>{$("#option-"+item).remove();});} var elems=document.querySelectorAll('#select-theme');M.FormSelect.init(elems,{});} async function setAdditionalOptions(state){localforage.setItem("triggerWarningAccepted",state).then((value)=>{console.log("TriggerWarning set: "+value);UIAlert(D("triggerWarningSet"),"setAdditionalOptions(): triggerWarningSet");setUIAdditionalOptions(value);});} document.addEventListener("DOMContentLoaded",async()=>{$("#triggered-checkbox").change(function(){if(this.checked){setAdditionalOptions(true);}else{setAdditionalOptions(false);}});$("#select-language").on("change",function(){setLanguage($(this).find(":selected").val());});$("#select-theme").on("change",function(){setTheme($(this).find(":selected").val());});$("#select-errorreporting").on("change",function(){setErrorReporting($(this).find(":selected").val());});localforage.getItem("chosenLang").then((value)=>{let selectedLanguage=value;if(value==null||value.length<1){selectedLanguage="sl";} diff --git a/dist/pages/about.html b/dist/pages/about.html index e0af917..4f8ec1b 100755 --- a/dist/pages/about.html +++ b/dist/pages/about.html @@ -142,7 +142,7 @@ <div class="row"> <p> <small> - ^HEAD 1ce5c8b9f3c2e63dca9fb4a142b6494986196dad + ^HEAD c531b85798fde63320e0f6dd21cabc199cbb62d3 </small> </p> </div> @@ -3,8 +3,8 @@ // Change version to cause cache refresh -const static_cache_name = "site-static-1.0.14-beta-1ce5c8b"; -// commit before the latest is 1ce5c8b9f3c2e63dca9fb4a142b6494986196dad +const static_cache_name = "site-static-1.0.14-beta-c531b85"; +// commit before the latest is c531b85798fde63320e0f6dd21cabc199cbb62d3 // Got them with find . -not -path '*/\.*' | sed "s/.*/\"&\",/" | grep -v sw.js // sw.js NE SME BITI CACHAN, ker vsebuje verzijo! |