From 730722259f6f079c930f6fcce1c2f1e715d3df63 Mon Sep 17 00:00:00 2001 From: rstular Date: Sun, 17 May 2020 20:25:10 +0200 Subject: CSS --- assets/css/styles.css | 104 +++++++++++++++++++++++++++++++++++ assets/js/lib/themes.js | 35 +++++++++++- assets/js/teachers.js | 8 +-- assets/pages-src/about.bvr | 2 +- assets/pages-src/absences.bvr | 2 +- assets/pages-src/changelog.bvr | 2 +- assets/pages-src/chats.bvr | 2 +- assets/pages-src/grades.bvr | 2 +- assets/pages-src/gradings.bvr | 2 +- assets/pages-src/jitsi.bvr | 2 +- assets/pages-src/meals.bvr | 2 +- assets/pages-src/messaging.bvr | 2 +- assets/pages-src/misc/navigation.bvr | 3 +- assets/pages-src/privacypolicy.bvr | 2 +- assets/pages-src/settings.bvr | 2 +- assets/pages-src/teachers.bvr | 2 +- assets/pages-src/timetable.bvr | 2 +- assets/pages-src/tos.bvr | 2 +- dist/css/styles.css | 104 +++++++++++++++++++++++++++++++++++ dist/js/lib/themes.js | 35 +++++++++++- dist/js/teachers.js | 8 +-- dist/pages/about.html | 7 +-- dist/pages/absences.html | 5 +- dist/pages/changelog.html | 2 +- dist/pages/chats.html | 5 +- dist/pages/grades.html | 5 +- dist/pages/gradings.html | 5 +- dist/pages/jitsi.html | 5 +- dist/pages/meals.html | 5 +- dist/pages/messaging.html | 5 +- dist/pages/privacypolicy.html | 2 +- dist/pages/settings.html | 5 +- dist/pages/teachers.html | 5 +- dist/pages/timetable.html | 5 +- dist/pages/tos.html | 2 +- dist/sw.js | 4 +- 36 files changed, 325 insertions(+), 67 deletions(-) diff --git a/assets/css/styles.css b/assets/css/styles.css index 5144bda..a1509f4 100644 --- a/assets/css/styles.css +++ b/assets/css/styles.css @@ -6,6 +6,20 @@ --color-invalid: rgba(192, 0, 0, 1); --background-color: rgba(255, 255, 255, 1); --background-accent: rgba(0, 156, 101, 0.2); + + --color-header-bold: rgba(255, 255, 255, 1); + --color-header-span: rgba(255, 255, 255, 1); + + --color-text: rgba(0, 0, 0, 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); } body { @@ -203,4 +217,94 @@ a.collection-item { .flag-icon { height: 1vw; +} + +.app-header-bold { + color: var(--color-header-bold) !important; +} + +.app-header-span { + color: var(--color-header-span) !important; +} + +table > thead > tr > th { + color: var(--color-text) !important; +} + +table > tbody > tr > td { + color: var(--color-text) !important; +} + +table.highlight > tbody > tr:hover { + background-color: var(--color-table-hover) !important; +} + +.sidenav { + background-color: var(--background-color) !important; +} + +.sidenav li > a { + color: var(--color-sidenav-text) !important; +} + +.sidenav-beziapp-subheader { + color: var(---color-sidenav-header) !important; +} + +.divider { + background-color: var(--color-divider) !important; +} + +.sidenav li>a>i.material-icons { + color: var(--color-sidenav-text); +} + +.collapsible-header { + background-color: var(--background-color); +} + +.collapsible-body { + border-bottom-color: var(--color-divider); +} + +span { + color: var(--color-text); +} + +div { + color: var(--color-text); +} + +h5.subheader { + color: var(--color-text); +} + +.collection-item, .collection-header { + background-color: var(--background-color) !important; + color: var(--color-text) !important; + border-bottom-color: var(--color-divider) !important; +} + +.collection { + border-top-color: var(--color-divider) !important; + border-bottom-color: var(--color-divider) !important; + border-left-color: var(--color-divider) !important; + border-right-color: var(--color-divider) !important; +} + +.modal-content { + background-color: var(--background-color); +} + +.modal-footer { + background-color: var(--background-color) !important; + border-top-color: var(--color-divider) !important; +} + +.modal-close.btn-flat { + color: var(--color-btn-flat) !important; +} + +.modal-close.btn-flat:disabled { + color: var(--color-btn-flat-disabled) !important; } \ No newline at end of file diff --git a/assets/js/lib/themes.js b/assets/js/lib/themes.js index d8a7ca1..5eaec7d 100644 --- a/assets/js/lib/themes.js +++ b/assets/js/lib/themes.js @@ -5,8 +5,24 @@ const THEME_COLOR_SCHEMES = { "color-accent": "rgba(0, 156, 101, 1)", "color-primary-light": "rgba(230, 250, 231, 1)", "color-invalid": "rgba(192, 0, 0, 1)", + "background-color": "rgba(255, 255, 255, 1)", - "background-accent": "rgba(0, 156, 101, 0.2)" + "background-accent": "rgba(0, 156, 101, 0.2)", + + "color-header-bold": "rgba(255, 255, 255, 1)", + "color-header-span": "rgba(255, 255, 255, 1)", + + "color-text": "rgba(0, 0, 0, 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)", @@ -14,8 +30,23 @@ const THEME_COLOR_SCHEMES = { "color-accent": "rgba(20, 117, 83, 1)", "color-primary-light": "rgba(230, 250, 231, 1)", "color-invalid": "rgba(192, 0, 0, 1)", + "background-color": "rgba(31, 31, 31, 1)", - "background-accent": "rgba(0, 92, 44, 0.2)" + "background-accent": "rgba(0, 92, 44, 0.2)", + + "color-header-bold": "rgba(255, 255, 255, 1)", + "color-header-span": "rgba(255, 255, 255, 1)", + + "color-text": "rgba(255, 255, 255, 1)", + "color-table-hover": "rgba(70, 70, 70, 0.5)", + + "color-sidenav-background": "rgba(31, 31, 31, 1)", + "color-sidenav-text": "rgba(255, 255, 255, 1)", + "color-sidenav-header": "rgba(255, 255, 255, 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)", } } diff --git a/assets/js/teachers.js b/assets/js/teachers.js index da69e96..da0a62d 100644 --- a/assets/js/teachers.js +++ b/assets/js/teachers.js @@ -35,8 +35,8 @@ async function loadTeachers(force_refresh = false) { await gsecInstance.login(username, password); gsecInstance.fetchTeachers().then( (value) => { teachers = value; - localforage.setItem("teachers", value).then(() => { - displayData(); + localforage.setItem("teachers", value).then((saved_teachers) => { + displayData(saved_teachers); setLoading(false); }); setLoading(false); @@ -49,13 +49,13 @@ async function loadTeachers(force_refresh = false) { setLoading(false); } } else { - displayData(); + displayData(teachers); setLoading(false); } } // Function for displaying data -function displayData() { +function displayData(teachers) { for(const teacher of Object.keys(teachers)) { // Create row let row = document.createElement("tr"); diff --git a/assets/pages-src/about.bvr b/assets/pages-src/about.bvr index 56fa810..dd42b82 100644 --- a/assets/pages-src/about.bvr +++ b/assets/pages-src/about.bvr @@ -35,7 +35,7 @@