akkoma-fe/src/components/nav_panel/nav_panel.vue

74 lines
1.5 KiB
Vue
Raw Normal View History

2016-11-06 19:10:20 +00:00
<template>
<div class="nav-panel">
<div class="panel panel-default">
<ul>
<li v-if='currentUser'>
<router-link to='/main/friends'>
2017-11-07 14:14:37 +00:00
{{ $t("nav.timeline") }}
2016-11-06 19:10:20 +00:00
</router-link>
</li>
<li v-if='currentUser'>
<router-link :to="{ name: 'mentions', params: { username: currentUser.screen_name } }">
2017-11-07 14:14:37 +00:00
{{ $t("nav.mentions") }}
</router-link>
</li>
2016-11-06 19:10:20 +00:00
<li>
<router-link to='/main/public'>
2017-11-07 14:14:37 +00:00
{{ $t("nav.public_tl") }}
2016-11-06 19:10:20 +00:00
</router-link>
</li>
2016-11-06 20:46:01 +00:00
<li>
<router-link to='/main/all'>
2017-11-07 14:14:37 +00:00
{{ $t("nav.twkn") }}
2016-11-06 20:46:01 +00:00
</router-link>
</li>
2016-11-06 19:10:20 +00:00
</ul>
</div>
</div>
</template>
<script src="./nav_panel.js" ></script>
<style lang="scss">
.nav-panel ul {
list-style: none;
margin: 0;
padding: 0;
}
2016-11-06 19:10:20 +00:00
.nav-panel li {
border-bottom: 1px solid;
border-color: var(--border);
background-color: var(--bg);
padding: 0;
&:first-child a {
border-top-right-radius: 10px;
border-top-left-radius: 10px;
}
&:last-child a {
border-bottom-right-radius: 10px;
border-bottom-left-radius: 10px;
}
}
2016-11-06 19:10:20 +00:00
.nav-panel li:last-child {
border: none;
}
2016-11-06 19:10:20 +00:00
.nav-panel a {
display: block;
padding: 0.8em 0.85em;
&:hover {
background-color: var(--lightBg);
}
&.router-link-active {
font-weight: bolder;
background-color: var(--lightBg);
&:hover {
text-decoration: underline;
}
}
2016-11-06 19:10:20 +00:00
}
</style>