Skip to content

armgit / dashy

Public Imported from GitHub
0

πŸš€ A self-hostable personal dashboard built for you. Includes status-checking, widgets, themes, icon packs, a UI editor and tons more!

Solve background image resize

BySempron728eb0256ee6
diff --git a/src/mixins/HomeMixin.js b/src/mixins/HomeMixin.js
index 97c249f1..3a030055 100644
--- a/src/mixins/HomeMixin.js
+++ b/src/mixins/HomeMixin.js
@@ -149,7 +149,7 @@ const HomeMixin = {
/* If user has a background image, then generate CSS attributes */
getBackgroundImage() {
if (this.appConfig && this.appConfig.backgroundImg) {
- return `background: url('${this.appConfig.backgroundImg}');background-size:cover;`;
+ return `background: url('${this.appConfig.backgroundImg}') no-repeat center fixed;background-size:cover;`;
}
return '';
},
diff --git a/src/views/Minimal.vue b/src/views/Minimal.vue
index 4cde1465..44e29e8c 100644
--- a/src/views/Minimal.vue
+++ b/src/views/Minimal.vue
@@ -118,7 +118,7 @@ export default {
/* Make CSS styles to apply the users custom background image */
getBackgroundImage() {
if (this.appConfig && this.appConfig.backgroundImg) {
- return `background: url('${this.appConfig.backgroundImg}');background-size:cover;`;
+ return `background: url('${this.appConfig.backgroundImg}') no-repeat center fixed;background-size:cover;`;
}
return '';
},