aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoger Braun <roger@rogerbraun.net>2017-02-16 17:44:36 +0100
committerRoger Braun <roger@rogerbraun.net>2017-02-16 17:44:36 +0100
commitce5b3d4c924d6e94b6fbde3c50fdb209e4ec1fab (patch)
tree1ab3d018a65d8b13196bed48fa40e16e400e9fdf /src
parenta3b2be09b3acab977682cc4cc4cebc7d9229f036 (diff)
Add logo.
Diffstat (limited to 'src')
-rw-r--r--src/App.js1
-rw-r--r--src/App.scss4
-rw-r--r--src/App.vue2
-rw-r--r--src/main.js3
4 files changed, 8 insertions, 2 deletions
diff --git a/src/App.js b/src/App.js
index 736755ea..06634adb 100644
--- a/src/App.js
+++ b/src/App.js
@@ -19,6 +19,7 @@ export default {
background () {
return this.currentUser.background_image || this.$store.state.config.background
},
+ logoStyle () { return { 'background-image': `url(${this.$store.state.config.logo})` } },
style () { return { 'background-image': `url(${this.background})` } },
sitename () { return this.$store.state.config.name }
},
diff --git a/src/App.scss b/src/App.scss
index c820779a..d39fc749 100644
--- a/src/App.scss
+++ b/src/App.scss
@@ -63,6 +63,10 @@ nav {
align-items: center;
flex-basis: 920px;
margin: auto;
+ height: 50px;
+ background-repeat: no-repeat;
+ background-position: center;
+ background-size: contain;
}
}
diff --git a/src/App.vue b/src/App.vue
index d2b07d2b..a22307a6 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -1,7 +1,7 @@
<template>
<div id="app" v-bind:style="style" class="base02-background">
<nav class='container base01-background base04'>
- <div class='inner-nav'>
+ <div class='inner-nav' :style="logoStyle">
<div class='item'>
<a route-to='friends-timeline' href="#">{{sitename}}</a>
</div>
diff --git a/src/main.js b/src/main.js
index 68653c37..0e43518d 100644
--- a/src/main.js
+++ b/src/main.js
@@ -71,8 +71,9 @@ new Vue({
window.fetch('/static/config.json')
.then((res) => res.json())
- .then(({name, theme, background}) => {
+ .then(({name, theme, background, logo}) => {
store.dispatch('setOption', { name: 'name', value: name })
store.dispatch('setOption', { name: 'theme', value: theme })
store.dispatch('setOption', { name: 'background', value: background })
+ store.dispatch('setOption', { name: 'logo', value: logo })
})