diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..fb6f6b3 Binary files /dev/null and b/.DS_Store differ diff --git a/template/.DS_Store b/template/.DS_Store new file mode 100644 index 0000000..c2ba3f0 Binary files /dev/null and b/template/.DS_Store differ diff --git a/template/static/.DS_Store b/template/static/.DS_Store new file mode 100644 index 0000000..e36d3e1 Binary files /dev/null and b/template/static/.DS_Store differ diff --git a/template/static/css/colors.css b/template/static/css/colors.css index 46357d9..e40f80c 100644 --- a/template/static/css/colors.css +++ b/template/static/css/colors.css @@ -1,23 +1,27 @@ +/* Colors inspired by "day/night-fox" schemes */ :root { - --background-color-light: #f4e8e9; - --background-color-light-2: #f5e6f3; - --text-color-light: #333; - --confirm-color-light: #91d9bb; - --link-color-light: #d291bc; - --container-bg-light: #fff7f87a; - --border-color-light: #692fcc; - --error-color-light: #a83254; + /* Light mode colors */ + --background-color-light: #f6f2ee; /* base00 */ + --background-color-light-2: #dbd1dd; /* base01 */ + --text-color-light: #3d2b5a; /* base05 */ + --confirm-color-light: #396847; /* base0B */ + --link-color-light: #6e33ce; /* base0E */ + --container-bg-light: #f4ece6; /* base07 */ + --border-color-light: #2848a9; /* base0D */ + --error-color-light: #a5222f; /* base08 */ - --background-color-dark: #333; - --background-color-dark-2: #2c2c2c; - --text-color-dark: #f4e8e9; - --confirm-color-dark: #4d8f73; - --link-color-dark: #b86b77; - --container-bg-dark: #424242ea; - --border-color-dark: #956ade; - --error-color-dark: #851736; + /* Dark mode colors */ + --background-color-dark: #192330; /* base00 */ + --background-color-dark-2: #212e3f; /* base01 */ + --text-color-dark: #cdcecf; /* base05 */ + --confirm-color-dark: #81b29a; /* base0B */ + --link-color-dark: #9d79d6; /* base0E */ + --container-bg-dark: #29394f; /* base02 */ + --border-color-dark: #719cd6; /* base0D */ + --error-color-dark: #c94f6d; /* base08 */ } + [data-theme="DARK"] { --background-color: var(--background-color-dark); --background-color-2: var(--background-color-dark-2); diff --git a/template/static/css/styles.css b/template/static/css/styles.css index 6252898..f5d4f78 100644 --- a/template/static/css/styles.css +++ b/template/static/css/styles.css @@ -2,12 +2,17 @@ @import "/static/css/form.css"; @import "/static/css/table.css"; +@font-face { + font-family: 'GeistMono'; + src: url('/static/fonts/GeistMono-Medium.ttf') format('truetype'); +} + * { box-sizing: border-box; color: var(--text-color); + font-family: GeistMono; } body { - font-family: "Roboto", sans-serif; background-color: var(--background-color); } diff --git a/template/static/fonts/.DS_Store b/template/static/fonts/.DS_Store new file mode 100644 index 0000000..aa99597 Binary files /dev/null and b/template/static/fonts/.DS_Store differ diff --git a/template/static/fonts/GeistMono-Medium.ttf b/template/static/fonts/GeistMono-Medium.ttf new file mode 100644 index 0000000..4284eb4 Binary files /dev/null and b/template/static/fonts/GeistMono-Medium.ttf differ diff --git a/template/static/js/components/formatDate.js b/template/static/js/components/formatDate.js new file mode 100644 index 0000000..a12f04f --- /dev/null +++ b/template/static/js/components/formatDate.js @@ -0,0 +1,7 @@ +const timeElements = document.querySelectorAll(".time"); +timeElements.forEach((timeElement) => { + const dateStr = timeElement.textContent.split(" ").slice(0, 3).join(" "); + const date = new Date(dateStr); + + timeElement.textContent = date.toLocaleString(); +}); diff --git a/template/static/js/components/infoBanners.js b/template/static/js/components/infoBanners.js new file mode 100644 index 0000000..6a19864 --- /dev/null +++ b/template/static/js/components/infoBanners.js @@ -0,0 +1,6 @@ +const infoBanners = document.querySelectorAll(".info"); +Array.from(infoBanners).forEach((infoBanner) => { + infoBanner.addEventListener("click", () => { + infoBanner.remove(); + }); +}); diff --git a/template/static/js/components/themeSwitcher.js b/template/static/js/components/themeSwitcher.js new file mode 100644 index 0000000..e5497f0 --- /dev/null +++ b/template/static/js/components/themeSwitcher.js @@ -0,0 +1,27 @@ +const THEMES = { + DARK: "DARK", + LIGHT: "LIGHT", +}; + +const flipFlopTheme = (theme) => + THEMES[theme] === THEMES.DARK ? THEMES.LIGHT : THEMES.DARK; + +const themePickerText = { + DARK: "light mode.", + LIGHT: "dark mode.", +}; + +const themeSwitcher = document.getElementById("theme-switcher"); + +const setTheme = (theme) => { + themeSwitcher.textContent = `${themePickerText[theme]}`; + + document.documentElement.setAttribute("data-theme", theme); + localStorage.setItem("theme", theme); +}; + +themeSwitcher.addEventListener("click", () => + setTheme(flipFlopTheme(document.documentElement.getAttribute("data-theme"))), +); + +setTheme(localStorage.getItem("theme") || THEMES.LIGHT); diff --git a/template/static/js/require.js b/template/static/js/require.js new file mode 100644 index 0000000..a4203f0 --- /dev/null +++ b/template/static/js/require.js @@ -0,0 +1,5 @@ +/** vim: et:ts=4:sw=4:sts=4 + * @license RequireJS 2.3.6 Copyright jQuery Foundation and other contributors. + * Released under MIT license, https://github.com/requirejs/requirejs/blob/master/LICENSE + */ +var requirejs,require,define;!function(global,setTimeout){var req,s,head,baseElement,dataMain,src,interactiveScript,currentlyAddingScript,mainScript,subPath,version="2.3.6",commentRegExp=/\/\*[\s\S]*?\*\/|([^:"'=]|^)\/\/.*$/gm,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,currDirRegExp=/^\.\//,op=Object.prototype,ostring=op.toString,hasOwn=op.hasOwnProperty,isBrowser=!("undefined"==typeof window||"undefined"==typeof navigator||!window.document),isWebWorker=!isBrowser&&"undefined"!=typeof importScripts,readyRegExp=isBrowser&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,defContextName="_",isOpera="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),contexts={},cfg={},globalDefQueue=[],useInteractive=!1;function commentReplace(e,t){return t||""}function isFunction(e){return"[object Function]"===ostring.call(e)}function isArray(e){return"[object Array]"===ostring.call(e)}function each(e,t){var i;if(e)for(i=0;i {{ template "content" . }} + {{ end }}