2018-08-09 04:07:15 +00:00
|
|
|
<template lang="pug">
|
|
|
|
v-app
|
|
|
|
nav-header
|
2018-08-11 01:00:20 +00:00
|
|
|
v-navigation-drawer.primary(
|
|
|
|
dark
|
|
|
|
app
|
|
|
|
clipped
|
|
|
|
:mini-variant='$vuetify.breakpoint.md || $vuetify.breakpoint.sm'
|
|
|
|
mini-variant-width='80'
|
|
|
|
mobile-break-point='600'
|
|
|
|
:temporary='$vuetify.breakpoint.xs'
|
|
|
|
v-model='navShown'
|
|
|
|
)
|
2018-09-23 04:14:01 +00:00
|
|
|
nav-sidebar
|
2018-08-09 04:07:15 +00:00
|
|
|
|
|
|
|
v-content
|
|
|
|
v-toolbar(color='grey lighten-3', flat, dense)
|
2018-08-11 01:00:20 +00:00
|
|
|
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='/')
|
2018-09-23 04:14:01 +00:00
|
|
|
v-breadcrumbs-item: v-icon home
|
2018-08-09 04:07:15 +00:00
|
|
|
v-breadcrumbs-item Universe
|
|
|
|
v-breadcrumbs-item Galaxy
|
|
|
|
v-breadcrumbs-item Solar System
|
|
|
|
v-breadcrumbs-item Planet Earth
|
2018-08-20 05:02:57 +00:00
|
|
|
template(v-if='!isPublished')
|
|
|
|
v-spacer
|
|
|
|
.caption.red--text Unpublished
|
|
|
|
status-indicator.ml-3(negative, pulse)
|
2018-08-09 04:07:15 +00:00
|
|
|
v-divider
|
|
|
|
v-layout(row)
|
2018-08-11 01:00:20 +00:00
|
|
|
v-flex(xs12, lg9, xl10)
|
2018-08-09 04:07:15 +00:00
|
|
|
v-toolbar(color='grey lighten-4', flat, :height='90')
|
|
|
|
div
|
|
|
|
.headline.grey--text.text--darken-3 {{title}}
|
|
|
|
.caption.grey--text.text--darken-1 {{description}}
|
2018-08-11 22:16:56 +00:00
|
|
|
v-divider
|
2018-09-17 02:30:24 +00:00
|
|
|
.contents(ref='container')
|
2018-08-09 04:07:15 +00:00
|
|
|
slot(name='contents')
|
2018-09-04 04:46:24 +00:00
|
|
|
|
2018-08-11 01:00:20 +00:00
|
|
|
v-flex(lg3, xl2, fill-height, v-if='$vuetify.breakpoint.lgAndUp')
|
2018-08-09 04:07:15 +00:00
|
|
|
v-toolbar(color='grey lighten-4', flat, :height='90')
|
|
|
|
div
|
|
|
|
.caption.grey--text.text--lighten-1 Last edited by
|
2018-08-20 05:02:57 +00:00
|
|
|
.body-2.grey--text.text--darken-3 {{ authorName }}
|
|
|
|
.caption.grey--text.text--darken-1 {{ updatedAt | moment('calendar') }}
|
2018-08-09 04:07:15 +00:00
|
|
|
v-spacer
|
2018-08-20 05:02:57 +00:00
|
|
|
v-tooltip(left)
|
|
|
|
v-btn(icon, slot='activator', :href='"/e/" + path')
|
2018-08-11 01:00:20 +00:00
|
|
|
v-icon(color='grey') edit
|
|
|
|
span Edit Page
|
2018-08-11 22:16:56 +00:00
|
|
|
v-divider
|
|
|
|
v-list.grey.lighten-3.pb-3(dense)
|
|
|
|
v-subheader.pl-4.primary--text Table of contents
|
|
|
|
vue-tree-navigation.treenav(:items='toc', :defaultOpenLevel='1')
|
|
|
|
v-divider
|
|
|
|
v-list.grey.lighten-4(dense)
|
2018-09-04 04:46:24 +00:00
|
|
|
v-subheader.pl-4.yellow--text.text--darken-4 Rating
|
|
|
|
.text-xs-center
|
|
|
|
v-rating(
|
|
|
|
v-model='rating'
|
|
|
|
color='yellow darken-3'
|
|
|
|
background-color='grey lighten-1'
|
|
|
|
half-increments
|
|
|
|
hover
|
|
|
|
)
|
|
|
|
.pb-2.caption.grey--text 5 votes
|
|
|
|
v-divider
|
|
|
|
v-list.grey.lighten-3(dense)
|
2018-08-11 22:16:56 +00:00
|
|
|
v-subheader.pl-4.teal--text Tags
|
2018-08-09 04:07:15 +00:00
|
|
|
v-list-tile
|
2018-08-11 22:16:56 +00:00
|
|
|
v-list-tile-avatar: v-icon(color='teal') label
|
|
|
|
v-list-tile-title Astrophysics
|
|
|
|
v-divider(inset)
|
2018-08-09 04:07:15 +00:00
|
|
|
v-list-tile
|
2018-08-11 22:16:56 +00:00
|
|
|
v-list-tile-avatar: v-icon(color='teal') label
|
|
|
|
v-list-tile-title Space
|
|
|
|
v-divider(inset)
|
2018-08-09 04:07:15 +00:00
|
|
|
v-list-tile
|
2018-08-11 22:16:56 +00:00
|
|
|
v-list-tile-avatar: v-icon(color='teal') label
|
|
|
|
v-list-tile-title Planets
|
|
|
|
v-divider
|
2018-09-04 04:46:24 +00:00
|
|
|
v-toolbar(color='grey lighten-4', flat, dense)
|
2018-08-11 22:16:56 +00:00
|
|
|
v-spacer
|
2018-08-20 05:02:57 +00:00
|
|
|
v-tooltip(bottom)
|
|
|
|
v-btn(icon, slot='activator'): v-icon(color='grey') bookmark
|
|
|
|
span Bookmark
|
|
|
|
v-tooltip(bottom)
|
|
|
|
v-btn(icon, slot='activator'): v-icon(color='grey') share
|
|
|
|
span Share
|
|
|
|
v-tooltip(bottom)
|
|
|
|
v-btn(icon, slot='activator'): v-icon(color='grey') print
|
|
|
|
span Print Format
|
2018-08-11 22:16:56 +00:00
|
|
|
v-spacer
|
2018-08-09 04:07:15 +00:00
|
|
|
nav-footer
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2018-08-11 22:16:56 +00:00
|
|
|
import { StatusIndicator } from 'vue-status-indicator'
|
2018-09-17 02:30:24 +00:00
|
|
|
import Prism from '@/libs/prism/prism.js'
|
2018-08-11 22:16:56 +00:00
|
|
|
|
2018-08-09 04:07:15 +00:00
|
|
|
export default {
|
2018-08-11 22:16:56 +00:00
|
|
|
components: {
|
|
|
|
StatusIndicator
|
|
|
|
},
|
2018-08-09 04:07:15 +00:00
|
|
|
props: {
|
2018-08-20 05:02:57 +00:00
|
|
|
locale: {
|
|
|
|
type: String,
|
|
|
|
default: 'en'
|
|
|
|
},
|
|
|
|
path: {
|
|
|
|
type: String,
|
|
|
|
default: 'home'
|
|
|
|
},
|
2018-08-09 04:07:15 +00:00
|
|
|
title: {
|
|
|
|
type: String,
|
|
|
|
default: 'Untitled Page'
|
|
|
|
},
|
|
|
|
description: {
|
|
|
|
type: String,
|
|
|
|
default: ''
|
2018-08-20 05:02:57 +00:00
|
|
|
},
|
|
|
|
createdAt: {
|
|
|
|
type: String,
|
|
|
|
default: ''
|
|
|
|
},
|
|
|
|
updatedAt: {
|
|
|
|
type: String,
|
|
|
|
default: ''
|
|
|
|
},
|
|
|
|
tags: {
|
|
|
|
type: Array,
|
|
|
|
default: () => ([])
|
|
|
|
},
|
|
|
|
authorName: {
|
|
|
|
type: String,
|
|
|
|
default: 'Unknown'
|
|
|
|
},
|
|
|
|
authorId: {
|
|
|
|
type: Number,
|
|
|
|
default: 0
|
|
|
|
},
|
|
|
|
isPublished: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false
|
2018-08-09 04:07:15 +00:00
|
|
|
}
|
2018-08-11 01:00:20 +00:00
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
2018-08-11 22:16:56 +00:00
|
|
|
navOpen: false,
|
|
|
|
toc: [
|
|
|
|
{
|
|
|
|
name: 'Introduction',
|
|
|
|
element: 'introduction'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Cities',
|
|
|
|
element: 'cities',
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
name: 'New York',
|
|
|
|
element: 'contact',
|
|
|
|
children: [
|
|
|
|
{ name: 'E-mail', element: 'email' },
|
|
|
|
{ name: 'Phone', element: 'phone' }
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Chicago',
|
|
|
|
element: 'contact',
|
|
|
|
children: [
|
|
|
|
{ name: 'E-mail', element: 'email' },
|
|
|
|
{ name: 'Phone', element: 'phone' }
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{ name: 'Population', external: 'https://github.com' }
|
|
|
|
]
|
2018-08-11 01:00:20 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
navShown: {
|
|
|
|
get() { return this.navOpen || this.$vuetify.breakpoint.smAndUp },
|
|
|
|
set(val) { this.navOpen = val }
|
2018-09-04 04:46:24 +00:00
|
|
|
},
|
|
|
|
rating: {
|
|
|
|
get () {
|
|
|
|
return 3.5
|
|
|
|
},
|
|
|
|
set (val) {
|
|
|
|
|
|
|
|
}
|
2018-08-11 01:00:20 +00:00
|
|
|
}
|
|
|
|
},
|
2018-09-17 02:30:24 +00:00
|
|
|
mounted () {
|
|
|
|
Prism.highlightAllUnder(this.$refs.container)
|
|
|
|
},
|
2018-08-11 01:00:20 +00:00
|
|
|
methods: {
|
|
|
|
toggleNavigation () {
|
|
|
|
this.navOpen = !this.navOpen
|
|
|
|
}
|
2018-08-09 04:07:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
|
|
|
|
</style>
|