aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Braun <roger@rogerbraun.net>2017-02-16 16:59:06 +0100
committerRoger Braun <roger@rogerbraun.net>2017-02-16 16:59:06 +0100
commita3b2be09b3acab977682cc4cc4cebc7d9229f036 (patch)
tree7ab6b2900354e04b0ee137f40f28ca56dc61df82
parentd7c9261dab6ad2cfedd4042ddd595cd3efee542d (diff)
Add /cyb/ background by sonyam.
-rw-r--r--src/App.js5
-rw-r--r--src/main.js3
-rw-r--r--static/bg.jpgbin0 -> 229574 bytes
-rw-r--r--static/bgalt.jpgbin0 -> 330583 bytes
-rw-r--r--static/config.json3
5 files changed, 8 insertions, 3 deletions
diff --git a/src/App.js b/src/App.js
index c326ddfc..736755ea 100644
--- a/src/App.js
+++ b/src/App.js
@@ -16,7 +16,10 @@ export default {
}),
computed: {
currentUser () { return this.$store.state.users.currentUser },
- style () { return { 'background-image': `url(${this.currentUser.background_image})` } },
+ background () {
+ return this.currentUser.background_image || this.$store.state.config.background
+ },
+ style () { return { 'background-image': `url(${this.background})` } },
sitename () { return this.$store.state.config.name }
},
methods: {
diff --git a/src/main.js b/src/main.js
index 20489d42..68653c37 100644
--- a/src/main.js
+++ b/src/main.js
@@ -71,7 +71,8 @@ new Vue({
window.fetch('/static/config.json')
.then((res) => res.json())
- .then(({name, theme}) => {
+ .then(({name, theme, background}) => {
store.dispatch('setOption', { name: 'name', value: name })
store.dispatch('setOption', { name: 'theme', value: theme })
+ store.dispatch('setOption', { name: 'background', value: background })
})
diff --git a/static/bg.jpg b/static/bg.jpg
new file mode 100644
index 00000000..60e2311a
--- /dev/null
+++ b/static/bg.jpg
Binary files differ
diff --git a/static/bgalt.jpg b/static/bgalt.jpg
new file mode 100644
index 00000000..fdb666ff
--- /dev/null
+++ b/static/bgalt.jpg
Binary files differ
diff --git a/static/config.json b/static/config.json
index 058c9875..d522e7e2 100644
--- a/static/config.json
+++ b/static/config.json
@@ -1,4 +1,5 @@
{
"name": "Pleroma FE",
- "theme": "base16-ashes.css"
+ "theme": "base16-ashes.css",
+ "background": "/static/bg.jpg"
}