aboutsummaryrefslogtreecommitdiff
path: root/packages/client/src/components/RepositoryNavbar.vue
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2021-06-05 19:37:52 +0200
committerHampusM <hampus@hampusmat.com>2021-06-05 19:37:52 +0200
commit4da3272bf7893760f6710c9a1ec7de02358136e6 (patch)
tree92eb961bf20a7ef9f7c0650ba288baf512986fca /packages/client/src/components/RepositoryNavbar.vue
parent4e3074dfd752dd52951d300090c642aee76cfaac (diff)
Reorganized into a monorepo, refactored the frontend again, goodbye Parcel
Diffstat (limited to 'packages/client/src/components/RepositoryNavbar.vue')
-rw-r--r--packages/client/src/components/RepositoryNavbar.vue59
1 files changed, 59 insertions, 0 deletions
diff --git a/packages/client/src/components/RepositoryNavbar.vue b/packages/client/src/components/RepositoryNavbar.vue
new file mode 100644
index 0000000..c69762f
--- /dev/null
+++ b/packages/client/src/components/RepositoryNavbar.vue
@@ -0,0 +1,59 @@
+<template>
+ <div id="navbar">
+ <div id="repo-navbar" class="ms-4 ps-4">
+ <nav class="navbar navbar-expand navbar-dark">
+ <div class="container-fluid px-0">
+ <div class="collapse navbar-collapse">
+ <ul class="navbar-nav align-items-center flex-fill">
+ <li
+ v-for="(item, index) in ['log', 'refs', 'tree']" :key="index"
+ class="nav-item">
+ <router-link
+ class="nav-link fs-4" :class="{ active: activePage === item }"
+ :aria-current="(activePage === item) ? 'page' : ''" :to="'/' + repository + '/' + item">
+ {{ item }}
+ </router-link>
+ </li>
+ <li class="nav-item ms-auto me-4">
+ <RepositoryCloneDropdown :repository="repository" class="d-block" />
+ </li>
+ </ul>
+ </div>
+ </div>
+ </nav>
+ </div>
+ </div>
+</template>
+
+<script>
+import RepositoryCloneDropdown from "@/components/RepositoryCloneDropdown";
+
+export default {
+ name: "RepositoryNavbar",
+ props: {
+ repository: {
+ type: String,
+ required: true
+ },
+ activePage: {
+ type: String,
+ required: true
+ }
+ },
+ components: {
+ RepositoryCloneDropdown
+ }
+};
+</script>
+
+<style lang="scss" scoped>
+@use "../scss/colors";
+@import "../scss/bootstrap";
+
+@import "~bootstrap/scss/nav";
+@import "~bootstrap/scss/navbar";
+
+#navbar {
+ line-height: 0;
+}
+</style>