Skip to content

Commit

Permalink
fix pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
hongee committed May 19, 2019
1 parent a2523d6 commit 3282e28
Show file tree
Hide file tree
Showing 7 changed files with 585 additions and 690 deletions.
4 changes: 4 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
set -o allexport
source .env
set +o allexport

19 changes: 12 additions & 7 deletions kerckhoff/assets/js/MainModule.vue
Original file line number Diff line number Diff line change
@@ -1,23 +1,28 @@
<template>
<div class="main">
<Navbar />
<Navbar v-bind:authenticated="isAuthenticated"/>
<router-view></router-view>
<PageFoot />
</div>
</template>

<script>
import Navbar from './components/Navbar'
import PageFoot from './components/Footer'
import Profile from './components/UserProfile'
import Navbar from "./components/Navbar";
import PageFoot from "./components/Footer";
import Profile from "./components/UserProfile";
export default {
props: ['type'],
props: ["type"],
components: {
Navbar,
PageFoot,
Profile
},
name: 'mainModule'
}
computed: {
isAuthenticated: function() {
return this.$router.currentRoute.fullPath.includes("/manage/");
}
},
name: "mainModule"
};
</script>
36 changes: 19 additions & 17 deletions kerckhoff/assets/js/components/Manage.vue
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
<template>
<div class="container-fluid mt-2">
<div class="row mb-2">
<div class="col col-sm-12">
<h1 class="mt-2">Sites Manager</h1>
<div class="container-fluid mt-2">
<div class="row mb-2">
<div class="col col-sm-12">
<h1 class="mt-2">Sites Manager</h1>
</div>
</div>
</div>
<div class="row mb-3">
<div class="col col-md-2">
<b-list-group>
<b-list-group-item to="/manage/packages">Packages</b-list-group-item>
<b-list-group-item href="#" disabled>Static Sites</b-list-group-item>
</b-list-group>
</div>
<div class="col col-md-10">
<router-view></router-view>
<div class="row mb-3">
<div class="col col-md-2">
<b-list-group>
<b-list-group-item to="/manage/packages">Packages</b-list-group-item>
<b-list-group-item href="#" disabled>Static Sites</b-list-group-item>
</b-list-group>
</div>
<div class="col col-md-10">
<keep-alive include="manage-display-view">
<router-view></router-view>
</keep-alive>
</div>
</div>
</div>
</div>
</template>

<script>
export default {
name: 'manage-view'
}
name: "manage-view"
};
</script>
53 changes: 38 additions & 15 deletions kerckhoff/assets/js/components/Navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,58 @@

<b-link class="navbar-brand" href="/">
<div class="d-flex align-items-center branding">
<img class="logo pr-1 mr-2" src="/static/img/db_logo.svg" />
<span class="title font-weight-bold">
KERCKHOFF
</span>
<img class="logo pr-1 mr-2" src="/static/img/db_logo.svg">
<span class="title font-weight-bold">KERCKHOFF</span>
</div>
</b-link>

<b-collapse is-nav id="nav_collapse">

<b-nav is-nav-bar>
<b-nav-item>Pages</b-nav-item>
<b-nav-item>Team</b-nav-item>
<b-nav-item href="/manage">Manage</b-nav-item>
</b-nav>

<b-nav is-nav-bar class="ml-auto">
<b-nav-item>
<icon name="search"></icon>
</b-nav-item>
</b-nav>
<!-- <b-nav is-nav-bar class="ml-auto" v-if="authenticated">
<b-nav-item-dropdown v-bind:text="currentPackage || 'Select a Package Set'" right>
<b-dropdown-item v-for="context in contexts">{{ context }}</b-dropdown-item>
</b-nav-item-dropdown>
</b-nav>-->
</b-collapse>

</div>
</b-navbar>
</template>

<script>
import { axios } from "../util";
export default {
name: 'navbar'
}
name: "navbar",
data: function() {
return {
contexts: []
};
},
computed: {
currentPackage: function() {
const contextRegex = /\/manage\/([\w-]+)/m;
const matches = this.$route.path.match(contextRegex);
if (matches != null) {
if (this.contexts.includes(matches[1])) return matches[1];
}
return null;
}
},
props: {
authenticated: {
type: Boolean,
default: false
}
}
// beforeMount: function() {
// axios.get("/api/v2/package-set").then(d => {
// this.contexts = d.data.map(i => i.slug);
// });
// }
};
</script>

<style lang="scss" scoped>
Expand Down
Loading

0 comments on commit 3282e28

Please sign in to comment.