Navbar.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <template>
  2. <header>
  3. <router-link to="/" v-slot="{ href, navigate, isExactActive }">
  4. <a :class="{ 'active': isExactActive }" :href="href" @click="navigate">
  5. Homepage
  6. </a>
  7. </router-link>
  8. <router-link to="/accounts" v-slot="{ href, navigate, isExactActive }">
  9. <a :class="{ 'active': isExactActive }" :href="href" @click="navigate">
  10. Accounts
  11. </a>
  12. </router-link>
  13. <router-link to="/schemas" v-slot="{ href, navigate, isExactActive }">
  14. <a :class="{ 'active': isExactActive }" :href="href" @click="navigate">
  15. Schemas
  16. </a>
  17. </router-link>
  18. <router-link to="/convert" v-slot="{ href, navigate, isExactActive }">
  19. <a :class="{ 'active': isExactActive }" :href="href" @click="navigate">
  20. Convert
  21. </a>
  22. </router-link>
  23. <router-link to="/options" v-slot="{ href, navigate, isExactActive }">
  24. <a :class="{ 'active': isExactActive }" :href="href" @click="navigate">
  25. Options
  26. </a>
  27. </router-link>
  28. </header>
  29. </template>
  30. <script>
  31. export default {
  32. components: {},
  33. data: () => {
  34. return {
  35. }
  36. },
  37. methods: {
  38. },
  39. mounted() {
  40. }
  41. };
  42. </script>
  43. <style lang="scss" scoped>
  44. header {
  45. display: flex;
  46. width: 100%;
  47. height: 60px;
  48. background-color: green;
  49. flex-direction: row;
  50. a {
  51. text-align: center;
  52. padding: 10px;
  53. vertical-align: middle;
  54. line-height: 40px;
  55. text-decoration: none;
  56. color: white;
  57. font-size: 20px;
  58. &.active {
  59. background-color: darkgreen;
  60. }
  61. }
  62. }
  63. </style>