From 1d64b7621176e25fedd98553c282c56242d38571 Mon Sep 17 00:00:00 2001
From: Roger Braun <roger@rogerbraun.net>
Date: Tue, 14 Feb 2017 22:21:23 +0100
Subject: Add basic configuration module, make it work for title and theme.

---
 src/App.vue | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src/App.vue')

diff --git a/src/App.vue b/src/App.vue
index 5d5463fb..d2b07d2b 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -3,7 +3,7 @@
     <nav class='container base01-background base04'>
       <div class='inner-nav'>
         <div class='item'>
-          <a route-to='friends-timeline' href="#">Pleroma FE</a>
+          <a route-to='friends-timeline' href="#">{{sitename}}</a>
         </div>
         <style-switcher></style-switcher>
       </div>
-- 
cgit v1.2.3-70-g09d2


From ce5b3d4c924d6e94b6fbde3c50fdb209e4ec1fab Mon Sep 17 00:00:00 2001
From: Roger Braun <roger@rogerbraun.net>
Date: Thu, 16 Feb 2017 17:44:36 +0100
Subject: Add logo.

---
 src/App.js         |   1 +
 src/App.scss       |   4 ++++
 src/App.vue        |   2 +-
 src/main.js        |   3 ++-
 static/config.json |   3 ++-
 static/logo.png    | Bin 0 -> 2411 bytes
 6 files changed, 10 insertions(+), 3 deletions(-)
 create mode 100644 static/logo.png

(limited to 'src/App.vue')

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 })
   })
diff --git a/static/config.json b/static/config.json
index d522e7e2..fb8d4015 100644
--- a/static/config.json
+++ b/static/config.json
@@ -1,5 +1,6 @@
 {
   "name": "Pleroma FE",
   "theme": "base16-ashes.css",
-  "background": "/static/bg.jpg"
+  "background": "/static/bg.jpg",
+  "logo": "/static/logo.png"
 }
diff --git a/static/logo.png b/static/logo.png
new file mode 100644
index 00000000..f83d923b
Binary files /dev/null and b/static/logo.png differ
-- 
cgit v1.2.3-70-g09d2

