Skip to content

Commit

Permalink
docs: update demo and builder demo
Browse files Browse the repository at this point in the history
  • Loading branch information
Scrum committed May 14, 2020
1 parent 92274e1 commit 454bd6f
Show file tree
Hide file tree
Showing 26 changed files with 10,312 additions and 374 deletions.
1 change: 1 addition & 0 deletions docs/css/app.4778c4d5.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docs/css/chunk-3302e43a.13378d60.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added docs/img/logo.82b9c7a5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
188 changes: 1 addition & 187 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -1,187 +1 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>vue breadcrumbs</title>
<link rel="stylesheet" href="https://unpkg.com/bootstrap@4.2.1/dist/css/bootstrap.min.css">
<script src="https://unpkg.com/jquery@3.3.1/dist/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
<script src="https://unpkg.com/bootstrap@4.2.1/dist/js/bootstrap.min.js"></script>
<script src="https://unpkg.com/vue@2.6.10/dist/vue.min.js"></script>
<script src="https://unpkg.com/vue-router@3.0.6/dist/vue-router.min.js"></script>
<script src="vue-2-breadcrumbs.min.js"></script>
</head>
<body>
<div id="app">
<ul class="nav">
<li class="nav-item dropdown">
<router-link to="/feeds" class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Feeds</router-link>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<router-link to="/feeds/foo" class="dropdown-item">Foo</router-link>
<router-link to="/feeds/bar" class="dropdown-item">Bar</router-link>
<router-link to="/feeds/baz" class="dropdown-item">Baz</router-link>
<router-link to="/feeds/1" class="dropdown-item">Other Feed 1</router-link>
<router-link to="/feeds/2" class="dropdown-item">Other Feed 2</router-link>
<router-link to="/feeds/3" class="dropdown-item">Other Feed 3</router-link>
</div>
</li>
<li class="nav-item dropdown">
<router-link to="/" class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Home</router-link>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
<router-link :to="{ name: 'settings'}" class="dropdown-item">Settings</router-link>
</div>
</li>
</ul>
<breadcrumbs></breadcrumbs>
<router-view ></router-view>

</div>
<script>
const Feeds = { template: '<div><router-view/></div>' };
const Feed = { template: '<div><h2>Feed</h2></div>' };
const Biz = { template: '<div><h2>Feeds</h2></div>' };

const Bar = { template: '<div><h2>Bar</h2></div>' };
const Baz = { template: '<div><h2>Baz</h2></div>' };
const Home = {
template: `
<router-view name="sidebar"></router-view>
<router-view name="content"></router-view>
`
}
const Foo = {
template: '<div>Foo</div>'
}
const Menu = {
template: `
<div>
<router-link :to="{name:'entities', params: {entityName:'entity1'}}">entities 1</router-link> </br>
<router-link :to="{name:'entities', params: {entityName:'entity2'}}">entities 2</router-link> </br>
<router-link :to="{name:'entities', params: {entityName:'entity3'}}">entities 3</router-link>
</div>
`
}
const View = {
template: `
<div>
<pre>{{ $route.params }}</pre>
</div>
`
}

const routes = [
{
path: '/',
component: Home,
meta: {
breadcrumb: 'home'
},
children: [{
path: 'settings',
name: 'settings',
components: {
content: { template: `<router-view/>` },
sidebar: Menu
},
meta: {
breadcrumb: 'Settings'
},
children: [{
path: 'entities/:entityName',
name: 'entities',
component: { template: `<router-view/>` },
redirect: {
name: 'entityView'
},
meta: {
breadcrumb: routeParams => `${routeParams.entityName}`
},
children: [{
path: 'view',
name: 'entityView',
component: View,
props: true,
meta: {
breadcrumb: 'View'
},
}
]
}
]
}
]
},

{
path: '/feeds',
component: Feeds,
meta: {
breadcrumb: 'Feeds'
},
children: [
{
path: '',
component: Biz
},
{
path: 'foo',
component: Foo,
meta: {
breadcrumb: () => `foo ${1 + 1}`
}
},
{
path: 'bar',
component: Bar,
meta: {
breadcrumb: 'bar'
}
},
{
name: 'baz',
path: 'baz',
component: Baz,
meta: {
breadcrumb() {
const { name } = this.$route;
return `name "${name}" of context route`;
}
}
},
{
path: ':id',
component: Feed,
meta: {
breadcrumb: params => `Other Feed ${params.id}`
},
redirect: {
name: 'view'
},
children: [
{
path: 'view',
name: 'view',
component: View,
meta: {
breadcrumb: 'View'
}
}
]
}
]
}
]

Vue.use(VueBreadcrumbs.VueBreadcrumbsPlugin);

const router = new VueRouter({
routes
})

new Vue({
router,
el: '#app'
})
</script>
</body>
</html>
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><title>Vue App</title><link href=/css/chunk-3302e43a.13378d60.css rel=prefetch><link href=/js/chunk-3302e43a.ccffe96f.js rel=prefetch><link href=/css/app.4778c4d5.css rel=preload as=style><link href=/js/app.e926389f.js rel=preload as=script><link href=/js/chunk-vendors.b275fd63.js rel=preload as=script><link href=/css/app.4778c4d5.css rel=stylesheet></head><body><div id=app></div><script src=/js/chunk-vendors.b275fd63.js></script><script src=/js/app.e926389f.js></script></body></html>
2 changes: 2 additions & 0 deletions docs/js/app.e926389f.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docs/js/app.e926389f.js.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions docs/js/chunk-3302e43a.ccffe96f.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 454bd6f

Please sign in to comment.