add dynamic routes
This commit is contained in:
@@ -3,18 +3,6 @@ import Vue from 'vue'
|
|||||||
import VueRouter from 'vue-router'
|
import VueRouter from 'vue-router'
|
||||||
import svgSpriteLoader from 'helpers/svg-sprite-loader'
|
import svgSpriteLoader from 'helpers/svg-sprite-loader'
|
||||||
import App from 'Components/App'
|
import App from 'Components/App'
|
||||||
import RouteBasic from 'Components/Routes/Basic'
|
|
||||||
import RouteMenuBubble from 'Components/Routes/MenuBubble'
|
|
||||||
import RouteLinks from 'Components/Routes/Links'
|
|
||||||
import RouteImages from 'Components/Routes/Images'
|
|
||||||
import RouteHidingMenuBar from 'Components/Routes/HidingMenuBar'
|
|
||||||
import RouteTodoList from 'Components/Routes/TodoList'
|
|
||||||
import RouteMarkdownShortcuts from 'Components/Routes/MarkdownShortcuts'
|
|
||||||
import RouteCodeHighlighting from 'Components/Routes/CodeHighlighting'
|
|
||||||
import RouteReadOnly from 'Components/Routes/ReadOnly'
|
|
||||||
import RouteEmbeds from 'Components/Routes/Embeds'
|
|
||||||
import RoutePlaceholder from 'Components/Routes/Placeholder'
|
|
||||||
import RouteExport from 'Components/Routes/Export'
|
|
||||||
|
|
||||||
const __svg__ = { path: './assets/images/icons/*.svg', name: 'assets/images/[hash].sprite.svg' }
|
const __svg__ = { path: './assets/images/icons/*.svg', name: 'assets/images/[hash].sprite.svg' }
|
||||||
svgSpriteLoader(__svg__.filename)
|
svgSpriteLoader(__svg__.filename)
|
||||||
@@ -26,84 +14,84 @@ Vue.use(VueRouter)
|
|||||||
const routes = [
|
const routes = [
|
||||||
{
|
{
|
||||||
path: '/',
|
path: '/',
|
||||||
component: RouteBasic,
|
component: () => import('Components/Routes/Basic'),
|
||||||
meta: {
|
meta: {
|
||||||
githubUrl: 'https://github.com/heyscrumpy/tiptap/tree/master/examples/Components/Routes/Basic',
|
githubUrl: 'https://github.com/heyscrumpy/tiptap/tree/master/examples/Components/Routes/Basic',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/menu-bubble',
|
path: '/menu-bubble',
|
||||||
component: RouteMenuBubble,
|
component: () => import('Components/Routes/MenuBubble'),
|
||||||
meta: {
|
meta: {
|
||||||
githubUrl: 'https://github.com/heyscrumpy/tiptap/tree/master/examples/Components/Routes/MenuBubble',
|
githubUrl: 'https://github.com/heyscrumpy/tiptap/tree/master/examples/Components/Routes/MenuBubble',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/links',
|
path: '/links',
|
||||||
component: RouteLinks,
|
component: () => import('Components/Routes/Links'),
|
||||||
meta: {
|
meta: {
|
||||||
githubUrl: 'https://github.com/heyscrumpy/tiptap/tree/master/examples/Components/Routes/Links',
|
githubUrl: 'https://github.com/heyscrumpy/tiptap/tree/master/examples/Components/Routes/Links',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/images',
|
path: '/images',
|
||||||
component: RouteImages,
|
component: () => import('Components/Routes/Images'),
|
||||||
meta: {
|
meta: {
|
||||||
githubUrl: 'https://github.com/heyscrumpy/tiptap/tree/master/examples/Components/Routes/Images',
|
githubUrl: 'https://github.com/heyscrumpy/tiptap/tree/master/examples/Components/Routes/Images',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/hiding-menu-bar',
|
path: '/hiding-menu-bar',
|
||||||
component: RouteHidingMenuBar,
|
component: () => import('Components/Routes/HidingMenuBar'),
|
||||||
meta: {
|
meta: {
|
||||||
githubUrl: 'https://github.com/heyscrumpy/tiptap/tree/master/examples/Components/Routes/HidingMenuBar',
|
githubUrl: 'https://github.com/heyscrumpy/tiptap/tree/master/examples/Components/Routes/HidingMenuBar',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/todo-list',
|
path: '/todo-list',
|
||||||
component: RouteTodoList,
|
component: () => import('Components/Routes/TodoList'),
|
||||||
meta: {
|
meta: {
|
||||||
githubUrl: 'https://github.com/heyscrumpy/tiptap/tree/master/examples/Components/Routes/TodoList',
|
githubUrl: 'https://github.com/heyscrumpy/tiptap/tree/master/examples/Components/Routes/TodoList',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/markdown-shortcuts',
|
path: '/markdown-shortcuts',
|
||||||
component: RouteMarkdownShortcuts,
|
component: () => import('Components/Routes/MarkdownShortcuts'),
|
||||||
meta: {
|
meta: {
|
||||||
githubUrl: 'https://github.com/heyscrumpy/tiptap/tree/master/examples/Components/Routes/MarkdownShortcuts',
|
githubUrl: 'https://github.com/heyscrumpy/tiptap/tree/master/examples/Components/Routes/MarkdownShortcuts',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/code-highlighting',
|
path: '/code-highlighting',
|
||||||
component: RouteCodeHighlighting,
|
component: () => import('Components/Routes/CodeHighlighting'),
|
||||||
meta: {
|
meta: {
|
||||||
githubUrl: 'https://github.com/heyscrumpy/tiptap/tree/master/examples/Components/Routes/CodeHighlighting',
|
githubUrl: 'https://github.com/heyscrumpy/tiptap/tree/master/examples/Components/Routes/CodeHighlighting',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/read-only',
|
path: '/read-only',
|
||||||
component: RouteReadOnly,
|
component: () => import('Components/Routes/ReadOnly'),
|
||||||
meta: {
|
meta: {
|
||||||
githubUrl: 'https://github.com/heyscrumpy/tiptap/tree/master/examples/Components/Routes/ReadOnly',
|
githubUrl: 'https://github.com/heyscrumpy/tiptap/tree/master/examples/Components/Routes/ReadOnly',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/embeds',
|
path: '/embeds',
|
||||||
component: RouteEmbeds,
|
component: () => import('Components/Routes/Embeds'),
|
||||||
meta: {
|
meta: {
|
||||||
githubUrl: 'https://github.com/heyscrumpy/tiptap/tree/master/examples/Components/Routes/Embeds',
|
githubUrl: 'https://github.com/heyscrumpy/tiptap/tree/master/examples/Components/Routes/Embeds',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/placeholder',
|
path: '/placeholder',
|
||||||
component: RoutePlaceholder,
|
component: () => import('Components/Routes/Placeholder'),
|
||||||
meta: {
|
meta: {
|
||||||
githubUrl: 'https://github.com/heyscrumpy/tiptap/tree/master/examples/Components/Routes/Placeholder',
|
githubUrl: 'https://github.com/heyscrumpy/tiptap/tree/master/examples/Components/Routes/Placeholder',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/export',
|
path: '/export',
|
||||||
component: RouteExport,
|
component: () => import('Components/Routes/Export'),
|
||||||
meta: {
|
meta: {
|
||||||
githubUrl: 'https://github.com/heyscrumpy/tiptap/tree/master/examples/Components/Routes/Export',
|
githubUrl: 'https://github.com/heyscrumpy/tiptap/tree/master/examples/Components/Routes/Export',
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user