Skip to content

Commit ab3ad07

Browse files
committed
feat: add icon on toolbar
1 parent 1aef20e commit ab3ad07

File tree

3 files changed

+29
-10
lines changed

3 files changed

+29
-10
lines changed

src/assets/logo.png

13.3 KB
Loading

src/assets/logo.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/components/Navigation/NavBarComponent.vue

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,20 @@
22
<div>
33
<v-toolbar fixed elevation="5" height="80px">
44
<div class="manu-wrapper">
5-
<v-btn @click.stop="drawer = !drawer">
5+
<v-btn icon @click.stop="drawer = !drawer">
66
<v-icon>mdi-menu-open</v-icon>
77
</v-btn>
8+
<div @click="backToTimeline" role="button" class="logo-nav">
9+
<img class="icon" src="../../assets/logo.png" alt="logo" />
10+
</div>
811
<div class="swish-theme">
912
<v-switch
1013
v-model="$vuetify.theme.dark"
1114
:append-icon="themeIcon"
1215
inset
13-
>
14-
</v-switch>
16+
/>
1517
</div>
1618
</div>
17-
<ButtonDeleteAll v-if="isOnTimeline" :delete-all="deleteAllPosts" />
1819
</v-toolbar>
1920
<v-sheet height="100%" width="344" class="overflow-hidden">
2021
<v-navigation-drawer v-model="drawer" absolute temporary>
@@ -55,12 +56,7 @@
5556
</template>
5657

5758
<script>
58-
import ButtonDeleteAll from "../ButtonDeleteAll.vue";
59-
6059
export default {
61-
components: {
62-
ButtonDeleteAll,
63-
},
6460
props: {
6561
user: Object,
6662
deleteAllPosts: Function,
@@ -114,6 +110,9 @@ export default {
114110
Logout() {
115111
this.$store.dispatch("logout");
116112
},
113+
backToTimeline() {
114+
if (this.$route.path !== "/") this.$router.push("/");
115+
},
117116
},
118117
};
119118
</script>
@@ -156,4 +155,25 @@ export default {
156155
color: white;
157156
text-decoration: none !important;
158157
}
158+
159+
.logo-nav {
160+
width: 48px;
161+
height: 48px;
162+
display: flex;
163+
border-radius: 50%;
164+
justify-content: center;
165+
align-items: center;
166+
167+
:hover {
168+
opacity: 50%;
169+
cursor: pointer;
170+
}
171+
}
172+
173+
.icon {
174+
width: 24px;
175+
height: 24px;
176+
-webkit-filter: drop-shadow(1px 1px 0 black) drop-shadow(-1px -1px 0 black);
177+
filter: drop-shadow(1px 1px 0 black) drop-shadow(-1px -1px 0 black);
178+
}
159179
</style>

0 commit comments

Comments
 (0)