From 5620419d0508bdbd727178a238e700125f938910 Mon Sep 17 00:00:00 2001 From: Nicolas Giard Date: Sun, 5 Aug 2018 23:03:46 -0400 Subject: [PATCH] feat: view page layout (wip) + footer component + fixes --- client/app.js | 1 + client/components/admin.vue | 24 +-------- client/components/common/nav-footer.vue | 35 +++++++++++++ client/components/profile.vue | 20 +------- client/store/site.js | 1 + server/controllers/common.js | 14 +++++- server/core/config.js | 11 ++++- server/core/kernel.js | 7 ++- server/setup.js | 6 +++ server/views/main/admin.pug | 5 +- themes/default/views/page.pug | 65 +++++++++++++++++++++++++ 11 files changed, 139 insertions(+), 50 deletions(-) create mode 100644 client/components/common/nav-footer.vue create mode 100644 themes/default/views/page.pug diff --git a/client/app.js b/client/app.js index e2984492..e81002bc 100644 --- a/client/app.js +++ b/client/app.js @@ -110,6 +110,7 @@ Vue.prototype.Velocity = Velocity Vue.component('admin', () => import(/* webpackChunkName: "admin" */ './components/admin.vue')) Vue.component('editor', () => import(/* webpackChunkName: "editor" */ './components/editor.vue')) Vue.component('login', () => import(/* webpackMode: "eager" */ './components/login.vue')) +Vue.component('nav-footer', () => import(/* webpackMode: "eager" */ './components/common/nav-footer.vue')) Vue.component('nav-header', () => import(/* webpackMode: "eager" */ './components/common/nav-header.vue')) Vue.component('profile', () => import(/* webpackChunkName: "profile" */ './components/profile.vue')) Vue.component('setup', () => import(/* webpackChunkName: "setup" */ './components/setup.vue')) diff --git a/client/components/admin.vue b/client/components/admin.vue index cc4dea76..d8ccea6d 100644 --- a/client/components/admin.vue +++ b/client/components/admin.vue @@ -75,26 +75,11 @@ transition(name='admin-router') router-view - v-footer.py-2.justify-center(app, absolute, :color='darkMode ? "" : "grey lighten-3"', inset, height='auto') - .caption.grey--text.text--darken-1 - span(v-if='company && company.length > 0') {{ $t('common:footer.copyright', { company: company, year: currentYear }) }} |  - span {{ $t('common:footer.poweredBy') }} Wiki.js - - v-snackbar( - :color='notification.style' - bottom, - right, - multi-line, - v-model='notificationState' - ) - .text-xs-left - v-icon.mr-3(dark) {{ notification.icon }} - span {{ notification.message }} + nav-footer diff --git a/client/components/common/nav-footer.vue b/client/components/common/nav-footer.vue new file mode 100644 index 00000000..4cd41032 --- /dev/null +++ b/client/components/common/nav-footer.vue @@ -0,0 +1,35 @@ + + + diff --git a/client/components/profile.vue b/client/components/profile.vue index adf5be53..0ac591e5 100644 --- a/client/components/profile.vue +++ b/client/components/profile.vue @@ -22,24 +22,11 @@ transition(name='profile-router') router-view - v-footer.py-2.justify-center(app, absolute, :color='darkMode ? "" : "grey lighten-3"', inset, height='auto') - .caption.grey--text.text--darken-1 Powered by Wiki.js - - v-snackbar( - :color='notification.style' - bottom, - right, - multi-line, - v-model='notificationState' - ) - .text-xs-left - v-icon.mr-3(dark) {{ notification.icon }} - span {{ notification.message }} + nav-footer