From 728eb0256ee65e9a3e16c007959ededbf3e5322a Mon Sep 17 00:00:00 2001 From: BySempron Date: Tue, 10 Jan 2023 20:21:51 +0100 Subject: [PATCH] Solve background image resize --- src/mixins/HomeMixin.js | 2 +- src/views/Minimal.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 ''; },