Skip to content

Commit

Permalink
Refactor default_theme paths/structure and prep for swapping out imag…
Browse files Browse the repository at this point in the history
…e for rebrand
  • Loading branch information
marcellamaki authored and rtibbles committed May 24, 2024
1 parent 095c5b4 commit 3212631
Show file tree
Hide file tree
Showing 11 changed files with 7 additions and 185 deletions.
2 changes: 1 addition & 1 deletion kolibri/core/assets/src/styles/themeSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export default {
},
scrimOpacity: {
type: Number,
default: 0.7,
default: 0.2,
validator(opacity) {
if (opacity < 0 || opacity > 1) {
logging.error(`Scrim opacity '${opacity}' is not in range [0,1]`);
Expand Down
File renamed without changes.
10 changes: 5 additions & 5 deletions kolibri/plugins/default_theme/kolibri_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@ class DefaultThemeHook(theme_hook.ThemeHook):
def theme(self):
return {
"signIn": {
"background": static("background.jpg"),
"background": static("assets/default_theme/background.jpg"),
"backgroundImgCredit": "Thomas Van Den Driessche",
"topLogo": {
"style": "padding-left: 64px; padding-right: 64px; margin-bottom: 8px; margin-top: 8px",
},
},
"logos": [
{
"src": static("assets/logo.ico"),
"src": static("assets/default_theme/logo.ico"),
"content_type": "image/vnd.microsoft.icon",
"size": "32x32",
},
{
"src": static("assets/kolibri-logo.svg"),
"src": static("assets/default_theme/kolibri-logo.svg"),
"content_type": "image/svg+xml",
# See https://web.dev/maskable-icon/ for details on what
# icons count as maskable. The default Kolibri logo is not,
Expand All @@ -41,12 +41,12 @@ def theme(self):
"size": "any",
},
{
"src": static("assets/kolibri-logo-192.png"),
"src": static("assets/default_theme/kolibri-logo-192.png"),
"content_type": "image/png",
"size": "192x192",
},
{
"src": static("assets/kolibri-logo-512.png"),
"src": static("assets/default_theme/kolibri-logo-512.png"),
"content_type": "image/png",
"size": "512x512",
},
Expand Down
Binary file not shown.
Binary file not shown.
178 changes: 0 additions & 178 deletions kolibri/plugins/default_theme/static/kolibri-logo.svg

This file was deleted.

2 changes: 1 addition & 1 deletion kolibri/plugins/user_auth/assets/src/views/AuthBase.vue
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
const scrimOpacity =
this.themeConfig.signIn.scrimOpacity !== undefined
? this.themeConfig.signIn.scrimOpacity
: 0.7;
: 0.2;
return {
backgroundColor: this.$themeTokens.primary,
backgroundImage: `linear-gradient(rgba(0, 0, 0, ${scrimOpacity}), rgba(0, 0, 0, ${scrimOpacity})), url(${this.themeConfig.signIn.background})`,
Expand Down

0 comments on commit 3212631

Please sign in to comment.