Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
web-three-twitter-boilerplate/src/App.vue
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
81 lines (71 sloc)
1.68 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div id="app"> | |
<div sm="3" class="col-md-4" > | |
<div id="nav"> | |
<b-nav vertical class="w-30"> | |
<b-nav-item> <img src="./assets/dogbark.png" alt="DogBark logo" width="100px"></b-nav-item> | |
<b-nav-item> <router-link to="/">Home</router-link> </b-nav-item> | |
<b-nav-item> <router-link to="/about">About</router-link></b-nav-item> | |
<b-nav-item id="specialpad"> <router-link to="/login" v-if="!authenticated">Log in</router-link> | |
<a href="#" v-if="authenticated" @click="$store.dispatch('signOut')">Log out</a> </b-nav-item> | |
</b-nav> | |
</div> | |
</div> | |
<div id="othervues" sm="7" class="col-md-7" > | |
<router-view/> | |
</div> | |
</div> | |
</template> | |
<script> | |
import Vue from 'vue' | |
import { BootstrapVue, IconsPlugin } from 'bootstrap-vue' | |
Vue.use(BootstrapVue) | |
Vue.use(IconsPlugin) | |
export default { | |
name: 'app', | |
computed: { | |
authenticated(){ | |
return this.$store.getters.isAuthenticated; | |
} | |
}, | |
mounted() { | |
// console.log(this.authenticated); | |
} | |
} | |
</script> | |
<style lang="scss"> | |
#app { | |
font-family: Helvetica, Arial, sans-serif; | |
-webkit-font-smoothing: antialiased; | |
-moz-osx-font-smoothing: grayscale; | |
text-align: center; | |
color: #2c3e50; | |
display: flex; | |
} | |
#nav { | |
padding-left: 1.4em; | |
padding-top: 2em; | |
font-size: 22pt; | |
a { | |
font-weight: bold; | |
color: #2c3e50; | |
&.router-link-exact-active { | |
color: #db4337; | |
} | |
} | |
border-right: 2px grey solid; | |
height: 100vh; | |
} | |
a.nav-link { | |
padding-bottom: 40px; | |
} | |
#specialpad{ | |
padding-top: 40vh; | |
} | |
router-view { | |
padding-top: 70px; | |
} | |
#othervues{ | |
padding-top: 70px; | |
} | |
</style> |