]> source.dussan.org Git - nextcloud-server.git/commitdiff
Sticky header background
authorJulius Härtl <jus@bitgrid.net>
Wed, 12 Aug 2020 05:39:46 +0000 (07:39 +0200)
committerJan C. Borchardt <hey@jancborchardt.net>
Wed, 19 Aug 2020 11:55:07 +0000 (13:55 +0200)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
apps/dashboard/src/App.vue

index fdf9f1e716f7cb176af6c4e4313db465a6e0dc43..32179f66313df9729f7cd08477291bc5c02357f2 100644 (file)
@@ -162,6 +162,13 @@ export default {
                                }
                        }
                },
+               backgroundImage: {
+                       immediate: true,
+                       handler() {
+                               const header = document.getElementById('header')
+                               header.style.backgroundImage = `url(${this.backgroundImage})`
+                       },
+               },
        },
        mounted() {
                setInterval(() => {
@@ -242,7 +249,10 @@ export default {
 <style lang="scss">
 // Show Dashboard background image beneath header
 #body-user #header {
-       background: none;
+       background-size: cover;
+       background-position: center 50%;
+       background-repeat: no-repeat;
+       background-attachment: fixed;
 }
 
 #content {