diff options
author | Patryk Niedźwiedziński <pniedzwiedzinski19@gmail.com> | 2019-08-13 12:18:46 +0200 |
---|---|---|
committer | Patryk Niedźwiedziński <pniedzwiedzinski19@gmail.com> | 2019-08-13 12:18:46 +0200 |
commit | 2f904e75381bfa8651f71b1412645653e7245758 (patch) | |
tree | 33cf63126d71665bcf16925564d2a4bb02ed8b64 /src/components | |
parent | 91baeba409e8480d1762c3aa8edfb121cff062d5 (diff) | |
download | puszcza-2f904e75381bfa8651f71b1412645653e7245758.tar.gz puszcza-2f904e75381bfa8651f71b1412645653e7245758.zip |
Fix logo in navbar
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/NavBar.vue | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/components/NavBar.vue b/src/components/NavBar.vue index 6497804..3410627 100644 --- a/src/components/NavBar.vue +++ b/src/components/NavBar.vue @@ -2,7 +2,7 @@ <nav class="navbar"> <div class="title"> <img v-if="logo" class="logo" :src="logo" /> - <router-link class="title-name" to="/">{{ title }}</router-link> + <router-link :class="titleClass" to="/">{{ title }}</router-link> </div> <div class="space"></div> <button @click="toggleMenu" class="menu-toggler">Menu</button> @@ -33,6 +33,14 @@ export default { title: String, logo: String }, + computed: { + titleClass() { + if (this.logo) { + return "title-name margin"; + } + return "title-name"; + } + }, data: function() { return { menuCollapsed: true @@ -79,12 +87,15 @@ export default { } .title-name { - margin-left: 120px; text-decoration: none; color: #181818; padding: 10px; } +.title-name.margin { + margin-left: 120px; +} + .links { display: flex; flex-direction: row; |