add source code link to examples
This commit is contained in:
@@ -4,15 +4,25 @@
|
|||||||
<div class="page__content">
|
<div class="page__content">
|
||||||
<router-view />
|
<router-view />
|
||||||
</div>
|
</div>
|
||||||
|
<div class="page__footer">
|
||||||
|
<a class="page__source-link" :href="$route.meta.githubUrl" target="_blank">
|
||||||
|
<icon name="code" />
|
||||||
|
<span>
|
||||||
|
Show Code
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Navigation from 'Components/Navigation'
|
import Navigation from 'Components/Navigation'
|
||||||
|
import Icon from 'Components/Icon'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
Navigation,
|
Navigation,
|
||||||
|
Icon,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -4,7 +4,23 @@
|
|||||||
|
|
||||||
&__content {
|
&__content {
|
||||||
padding: 4rem 1rem;
|
padding: 4rem 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__footer {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__source-link {
|
||||||
|
display: inline-block;
|
||||||
|
text-decoration: none;
|
||||||
|
text-transform: uppercase;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 0.8rem;
|
||||||
|
background-color: rgba($color-black, 0.1);
|
||||||
|
color: $color-black;
|
||||||
|
border-radius: 5px;
|
||||||
|
padding: 0.2rem 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,26 +21,44 @@ const routes = [
|
|||||||
{
|
{
|
||||||
path: '/',
|
path: '/',
|
||||||
component: RouteMenuBar,
|
component: RouteMenuBar,
|
||||||
|
meta: {
|
||||||
|
githubUrl: 'https://github.com/heyscrumpy/tiptap/tree/master/examples/Components/Routes/MenuBar',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/menu-bubble',
|
path: '/menu-bubble',
|
||||||
component: RouteMenuBubble,
|
component: RouteMenuBubble,
|
||||||
|
meta: {
|
||||||
|
githubUrl: 'https://github.com/heyscrumpy/tiptap/tree/master/examples/Components/Routes/MenuBubble',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/links',
|
path: '/links',
|
||||||
component: RouteLinks,
|
component: RouteLinks,
|
||||||
|
meta: {
|
||||||
|
githubUrl: 'https://github.com/heyscrumpy/tiptap/tree/master/examples/Components/Routes/Links',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/hiding-menu-bar',
|
path: '/hiding-menu-bar',
|
||||||
component: RouteHidingMenuBar,
|
component: RouteHidingMenuBar,
|
||||||
|
meta: {
|
||||||
|
githubUrl: 'https://github.com/heyscrumpy/tiptap/tree/master/examples/Components/Routes/HidingMenuBar',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/todo-list',
|
path: '/todo-list',
|
||||||
component: RouteTodoList,
|
component: RouteTodoList,
|
||||||
|
meta: {
|
||||||
|
githubUrl: 'https://github.com/heyscrumpy/tiptap/tree/master/examples/Components/Routes/TodoList',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/markdown-shortcuts',
|
path: '/markdown-shortcuts',
|
||||||
component: RouteMarkdownShortcuts,
|
component: RouteMarkdownShortcuts,
|
||||||
|
meta: {
|
||||||
|
githubUrl: 'https://github.com/heyscrumpy/tiptap/tree/master/examples/Components/Routes/MarkdownShortcuts',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user