From e067fe3abd82830d1de6191690061541dc193cd7 Mon Sep 17 00:00:00 2001 From: Nicolas Giard Date: Mon, 12 Nov 2018 00:51:34 -0500 Subject: [PATCH] feat: UI improvements --- client/components/common/nav-header.vue | 7 +- client/components/common/page-selector.vue | 77 +++++++++++++++------- client/components/editor.vue | 11 ++-- client/themes/default/components/page.vue | 36 ++++++++-- 4 files changed, 96 insertions(+), 35 deletions(-) diff --git a/client/components/common/nav-header.vue b/client/components/common/nav-header.vue index f4977932..dbc451a0 100644 --- a/client/components/common/nav-header.vue +++ b/client/components/common/nav-header.vue @@ -106,6 +106,8 @@ v-list-tile(@click='logout') v-list-tile-action: v-icon(color='red') exit_to_app v-list-tile-title Logout + + page-selector(mode='create', v-model='newPageModal') + + diff --git a/client/components/editor.vue b/client/components/editor.vue index 1dc575a9..f09244e5 100644 --- a/client/components/editor.vue +++ b/client/components/editor.vue @@ -39,13 +39,13 @@ .subheading {{ $t('editor:save.processing') }} .caption.blue--text.text--lighten-3 {{ $t('editor:save.pleaseWait') }} v-dialog(v-model='dialogEditorSelector', persistent, max-width='550') - v-card(color='blue darken-3', dark) + v-card.radius-7(color='blue darken-3', dark) v-card-text.text-xs-center.py-4 - .subheading Which editor do you want to use? + .subheading Which editor do you want to use for this page? v-container(grid-list-lg, fluid) v-layout(row, wrap, justify-center) v-flex(xs4) - v-card( + v-card.radius-7( hover light ripple @@ -54,7 +54,7 @@ v-icon(large, color='primary') code .body-2.mt-2 Code v-flex(xs4) - v-card( + v-card.radius-7( hover light ripple @@ -63,7 +63,7 @@ v-icon(large, color='primary') list_alt .body-2.mt-2 Markdown v-flex(xs4) - v-card.grey( + v-card.radius-7.grey( hover light ripple @@ -71,6 +71,7 @@ v-card-text.text-xs-center(@click='selectEditor("wysiwyg")') v-icon(large, color='grey darken-1') web .body-2.mt-2.grey--text.text--darken-2 Visual Builder + .caption.blue--text.text--lighten-2 This cannot be changed later. v-snackbar( :color='notification.style' diff --git a/client/themes/default/components/page.vue b/client/themes/default/components/page.vue index a750f45d..1eeda870 100644 --- a/client/themes/default/components/page.vue +++ b/client/themes/default/components/page.vue @@ -19,12 +19,14 @@ v-btn.pl-0(v-if='$vuetify.breakpoint.xsOnly', flat, @click='toggleNavigation') v-icon(color='grey darken-2', left) menu span Navigation - v-breadcrumbs.pl-0(v-else, divider='/') - v-breadcrumbs-item: v-icon home - v-breadcrumbs-item Universe - v-breadcrumbs-item Galaxy - v-breadcrumbs-item Solar System - v-breadcrumbs-item Planet Earth + v-breadcrumbs.breadcrumbs-nav.pl-0( + v-else + :items='breadcrumbs' + divider='/' + ) + template(slot='item', slot-scope='props') + v-icon(v-if='props.item.path === "/"', small) home + v-btn.ma-0(v-else, :href='props.item.path', small, flat) {{props.item.name}} template(v-if='!isPublished') v-spacer .caption.red--text Unpublished @@ -150,6 +152,13 @@ export default { data() { return { navOpen: false, + breadcrumbs: [ + { path: '/', name: 'Home' }, + { path: '/universe', name: 'Universe' }, + { path: '/universe/galaxy', name: 'Galaxy' }, + { path: '/universe/galaxy/solar-system', name: 'Solar System' }, + { path: '/universe/galaxy/solar-system/planet-earth', name: 'Planet Earth' } + ], toc: [ { name: 'Introduction', @@ -220,4 +229,19 @@ export default {