Skip to content

Commit

Permalink
feat(app): added support for user defined theme
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewcourtice committed Aug 18, 2021
1 parent da93d25 commit 86af320
Show file tree
Hide file tree
Showing 3 changed files with 120 additions and 10 deletions.
8 changes: 4 additions & 4 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
"date-fns": "^2.23.0",
"date-fns-tz": "^1.1.6",
"flex-layout-attribute": "^1.0.3",
"vue": "^3.2.2"
"vue": "^3.2.4"
},
"devDependencies": {
"@vitejs/plugin-vue": "^1.3.0",
"@vue/compiler-sfc": "^3.2.2",
"vite": "^2.4.4"
"@vitejs/plugin-vue": "^1.4.0",
"@vue/compiler-sfc": "^3.2.4",
"vite": "^2.5.0"
}
}
16 changes: 13 additions & 3 deletions app/src/assets/styles/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,26 @@
--animation__easing: cubic-bezier(0.165, 0.84, 0.44, 1);
}

[theme="dark"] {
@mixin dark-mode {
--background__colour: #333333;
--background__colour--inverse: #333333;
--background__colour--shade: rgba(0, 0, 0, 0.75);
--foreground__colour: #666666;
--foreground__colour--dark: #888888;

--font__colour: #EEEEEE;
--font__colour--meta: #CCCCCC;
--font__colour--inverse: #FFFFFF;

--border__colour: #666666;
}

[theme="dark"] {
@include dark-mode();
}

--border__colour: #666666;
@media (prefers-color-scheme: dark) {
:root {
@include dark-mode();
}
}
106 changes: 103 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2065,7 +2065,7 @@
"@typescript-eslint/types" "4.29.1"
eslint-visitor-keys "^2.0.0"

"@vitejs/plugin-vue@^1.3.0":
"@vitejs/plugin-vue@^1.3.0", "@vitejs/plugin-vue@^1.4.0":
version "1.4.0"
resolved "https://registry.yarnpkg.com/@vitejs/plugin-vue/-/plugin-vue-1.4.0.tgz#962ae01b7fd16ad4007898c64ed639136e12215b"
integrity sha512-RkqfJHz9wdLKBp5Yi+kQL8BAljdrvPoccQm2PTZc/UcL4EjD11xsv2PPCduYx2oV1a/bpSKA3sD5sxOHFhz+LA==
Expand All @@ -2081,6 +2081,17 @@
estree-walker "^2.0.1"
source-map "^0.6.1"

"@vue/[email protected]":
version "3.2.4"
resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.2.4.tgz#a98d295771998c1e8dccc4ee3d52feb14b02aea9"
integrity sha512-c8NuQq7mUXXxA4iqD5VUKpyVeklK53+DMbojYMyZ0VPPrb0BUWrZWFiqSDT+MFDv0f6Hv3QuLiHWb1BWMXBbrw==
dependencies:
"@babel/parser" "^7.12.0"
"@babel/types" "^7.12.0"
"@vue/shared" "3.2.4"
estree-walker "^2.0.1"
source-map "^0.6.1"

"@vue/[email protected]":
version "3.2.2"
resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.2.2.tgz#26e198498746c53047c3744d26fc95e670692ab7"
Expand All @@ -2089,7 +2100,15 @@
"@vue/compiler-core" "3.2.2"
"@vue/shared" "3.2.2"

"@vue/compiler-sfc@^3.1.5", "@vue/compiler-sfc@^3.2.2":
"@vue/[email protected]":
version "3.2.4"
resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.2.4.tgz#3a43de243eba127abbe57e796a0b969d2df78c08"
integrity sha512-uj1nwO4794fw2YsYas5QT+FU/YGrXbS0Qk+1c7Kp1kV7idhZIghWLTjyvYibpGoseFbYLPd+sW2/noJG5H04EQ==
dependencies:
"@vue/compiler-core" "3.2.4"
"@vue/shared" "3.2.4"

"@vue/compiler-sfc@^3.1.5":
version "3.2.2"
resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.2.2.tgz#5b7b13b07689be8e4880d856f72d1be500785be9"
integrity sha512-hrtqpQ5L6IPn5v7yVRo7uvLcQxv0z1+KBjZBWMBOcrXz4t+PKUxU/SWd6Tl9T8FDmYlunzKUh6lcx+2CLo6f5A==
Expand All @@ -2112,6 +2131,29 @@
postcss-selector-parser "^6.0.4"
source-map "^0.6.1"

"@vue/compiler-sfc@^3.2.4":
version "3.2.4"
resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.2.4.tgz#9807868cc950291f163c3930a81bb16e870df097"
integrity sha512-GM+ouDdDzhqgkLmBH4bgq4kiZxJQArSppJiZHWHIx9XRaefHLmc1LBNPmN8ivm4SVfi2i7M2t9k8ZnjsScgzPQ==
dependencies:
"@babel/parser" "^7.13.9"
"@babel/types" "^7.13.0"
"@types/estree" "^0.0.48"
"@vue/compiler-core" "3.2.4"
"@vue/compiler-dom" "3.2.4"
"@vue/compiler-ssr" "3.2.4"
"@vue/shared" "3.2.4"
consolidate "^0.16.0"
estree-walker "^2.0.1"
hash-sum "^2.0.0"
lru-cache "^5.1.1"
magic-string "^0.25.7"
merge-source-map "^1.1.0"
postcss "^8.1.10"
postcss-modules "^4.0.0"
postcss-selector-parser "^6.0.4"
source-map "^0.6.1"

"@vue/[email protected]":
version "3.2.2"
resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.2.2.tgz#633bb8e01f00a969c35ca12db32be7fe4c7185a9"
Expand All @@ -2120,6 +2162,14 @@
"@vue/compiler-dom" "3.2.2"
"@vue/shared" "3.2.2"

"@vue/[email protected]":
version "3.2.4"
resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.2.4.tgz#be51f219c2042b3e530373e60bc126ada6bb1cc0"
integrity sha512-bKZuXu9/4XwsFHFWIKQK+5kN7mxIIWmMmT2L4VVek7cvY/vm3p4WTsXYDGZJy0htOTXvM2ifr6sflg012T0hsw==
dependencies:
"@vue/compiler-dom" "3.2.4"
"@vue/shared" "3.2.4"

"@vue/devtools-api@^6.0.0-beta.14", "@vue/devtools-api@^6.0.0-beta.15":
version "6.0.0-beta.15"
resolved "https://registry.yarnpkg.com/@vue/devtools-api/-/devtools-api-6.0.0-beta.15.tgz#ad7cb384e062f165bcf9c83732125bffbc2ad83d"
Expand All @@ -2132,6 +2182,13 @@
dependencies:
"@vue/shared" "3.2.2"

"@vue/[email protected]":
version "3.2.4"
resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.2.4.tgz#a020ad7e50f674219a07764b105b5922e61597ea"
integrity sha512-ljWTR0hr8Tn09hM2tlmWxZzCBPlgGLnq/k8K8X6EcJhtV+C8OzFySnbWqMWataojbrQOocThwsC8awKthSl2uQ==
dependencies:
"@vue/shared" "3.2.4"

"@vue/[email protected]":
version "3.2.2"
resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.2.2.tgz#b9a7250783de19dd8dd6febf008084b0f9144586"
Expand All @@ -2140,6 +2197,14 @@
"@vue/reactivity" "3.2.2"
"@vue/shared" "3.2.2"

"@vue/[email protected]":
version "3.2.4"
resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.2.4.tgz#da5dde3dc1e48df99dd31ea9a972f5c02acdc3f5"
integrity sha512-W6PtEOs8P8jKYPo3JwaMAozZQivxInUleGfNwI2pK1t8ZLZIxn4kAf7p4VF4jJdQB8SZBzpfWdLUc06j7IOmpQ==
dependencies:
"@vue/reactivity" "3.2.4"
"@vue/shared" "3.2.4"

"@vue/[email protected]":
version "3.2.2"
resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.2.2.tgz#6d0da23ed1cfc702477f4b8c5dc4f9335c94e119"
Expand All @@ -2149,6 +2214,15 @@
"@vue/shared" "3.2.2"
csstype "^2.6.8"

"@vue/[email protected]":
version "3.2.4"
resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.2.4.tgz#1025595f2ae99a12fe0e1e6bce8df6761efec24b"
integrity sha512-HcVtLyn2SGwsf6BFPwkvDPDOhOqkOKcfHDpBp5R1coX+qMsOFrY8lJnGXIY+JnxqFjND00E9+u+lq5cs/W7ooA==
dependencies:
"@vue/runtime-core" "3.2.4"
"@vue/shared" "3.2.4"
csstype "^2.6.8"

"@vue/server-renderer@^3.1.5":
version "3.2.2"
resolved "https://registry.yarnpkg.com/@vue/server-renderer/-/server-renderer-3.2.2.tgz#686a77891d2d2ced8737d18e0d1564efe94205e5"
Expand All @@ -2162,6 +2236,11 @@
resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.2.2.tgz#6104185ebd57af5a14ac51c1f491b2205fc24054"
integrity sha512-dvYb318tk9uOzHtSaT3WII/HscQSIRzoCZ5GyxEb3JlkEXASpAUAQwKnvSe2CudnF8XHFRTB7VITWSnWNLZUtA==

"@vue/[email protected]":
version "3.2.4"
resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.2.4.tgz#ba2a09527afff27b28d08f921b4a597e9504ca7a"
integrity sha512-j2j1MRmjalVKr3YBTxl/BClSIc8UQ8NnPpLYclxerK65JIowI4O7n8O8lElveEtEoHxy1d7BelPUDI0Q4bumqg==

"@vuepress/[email protected]":
version "2.0.0-beta.23"
resolved "https://registry.yarnpkg.com/@vuepress/bundler-vite/-/bundler-vite-2.0.0-beta.23.tgz#a821d98448d59154cfdbb121e6da1e2ff4e43be3"
Expand Down Expand Up @@ -9436,6 +9515,18 @@ vite@^2.4.4:
optionalDependencies:
fsevents "~2.3.2"

vite@^2.5.0:
version "2.5.0"
resolved "https://registry.yarnpkg.com/vite/-/vite-2.5.0.tgz#111ba3679432d426e44566acf480005a7914cbd6"
integrity sha512-Dn4B+g54PJsMG5WCc4QeFy1ygMXRdTtFrUPegqfk4+vzVQcbF/DqqmI/1bxezArzbujBJg/67QeT5wz8edfJVQ==
dependencies:
esbuild "^0.12.17"
postcss "^8.3.6"
resolve "^1.20.0"
rollup "^2.38.5"
optionalDependencies:
fsevents "~2.3.2"

vue-loader@^16.4.0:
version "16.5.0"
resolved "https://registry.yarnpkg.com/vue-loader/-/vue-loader-16.5.0.tgz#09c4e0712466899e34b99a686524f19165fb2892"
Expand All @@ -9452,7 +9543,7 @@ vue-router@^4.0.10:
dependencies:
"@vue/devtools-api" "^6.0.0-beta.14"

vue@^3.1.5, vue@^3.2.0, vue@^3.2.2:
vue@^3.1.5, vue@^3.2.0:
version "3.2.2"
resolved "https://registry.yarnpkg.com/vue/-/vue-3.2.2.tgz#11715cb71a02baefd0f6e6552dc623680eb1bf32"
integrity sha512-D/LuzAV30CgNJYGyNheE/VUs5N4toL2IgmS6c9qeOxvyh0xyn4exyRqizpXIrsvfx34zG9x5gCI2tdRHCGvF9w==
Expand All @@ -9461,6 +9552,15 @@ vue@^3.1.5, vue@^3.2.0, vue@^3.2.2:
"@vue/runtime-dom" "3.2.2"
"@vue/shared" "3.2.2"

vue@^3.2.4:
version "3.2.4"
resolved "https://registry.yarnpkg.com/vue/-/vue-3.2.4.tgz#d94d88675e41c050d3a722d0848a7063b5e87a60"
integrity sha512-rNCFmoewm8IwmTK0nj3ysKq53iRpNEFKoBJ4inar6tIh7Oj7juubS39RI8UI+VE7x+Cs2z6PBsadtZu7z2qppg==
dependencies:
"@vue/compiler-dom" "3.2.4"
"@vue/runtime-dom" "3.2.4"
"@vue/shared" "3.2.4"

vuepress-vite@^2.0.0-beta.23:
version "2.0.0-beta.23"
resolved "https://registry.yarnpkg.com/vuepress-vite/-/vuepress-vite-2.0.0-beta.23.tgz#b17e65b1589b7f860fd5a00e644322259201f962"
Expand Down

0 comments on commit 86af320

Please sign in to comment.