Skip to content

Commit

Permalink
feat: add icon on toolbar
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiohdljr committed Dec 10, 2023
1 parent 1aef20e commit ab3ad07
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 10 deletions.
Binary file modified src/assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion src/assets/logo.svg

This file was deleted.

38 changes: 29 additions & 9 deletions src/components/Navigation/NavBarComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,20 @@
<div>
<v-toolbar fixed elevation="5" height="80px">
<div class="manu-wrapper">
<v-btn @click.stop="drawer = !drawer">
<v-btn icon @click.stop="drawer = !drawer">
<v-icon>mdi-menu-open</v-icon>
</v-btn>
<div @click="backToTimeline" role="button" class="logo-nav">
<img class="icon" src="../../assets/logo.png" alt="logo" />
</div>
<div class="swish-theme">
<v-switch
v-model="$vuetify.theme.dark"
:append-icon="themeIcon"
inset
>
</v-switch>
/>
</div>
</div>
<ButtonDeleteAll v-if="isOnTimeline" :delete-all="deleteAllPosts" />
</v-toolbar>
<v-sheet height="100%" width="344" class="overflow-hidden">
<v-navigation-drawer v-model="drawer" absolute temporary>
Expand Down Expand Up @@ -55,12 +56,7 @@
</template>

<script>
import ButtonDeleteAll from "../ButtonDeleteAll.vue";
export default {
components: {
ButtonDeleteAll,
},
props: {
user: Object,
deleteAllPosts: Function,
Expand Down Expand Up @@ -114,6 +110,9 @@ export default {
Logout() {
this.$store.dispatch("logout");
},
backToTimeline() {
if (this.$route.path !== "/") this.$router.push("/");
},
},
};
</script>
Expand Down Expand Up @@ -156,4 +155,25 @@ export default {
color: white;
text-decoration: none !important;
}
.logo-nav {
width: 48px;
height: 48px;
display: flex;
border-radius: 50%;
justify-content: center;
align-items: center;
:hover {
opacity: 50%;
cursor: pointer;
}
}
.icon {
width: 24px;
height: 24px;
-webkit-filter: drop-shadow(1px 1px 0 black) drop-shadow(-1px -1px 0 black);
filter: drop-shadow(1px 1px 0 black) drop-shadow(-1px -1px 0 black);
}
</style>

0 comments on commit ab3ad07

Please sign in to comment.