-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from neilherbertuk/main
Changable Sidebar Component
- Loading branch information
Showing
10 changed files
with
99 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,19 @@ | ||
<template> | ||
<div class="w-full flex flex-col my-4"> | ||
<p class="text-xl font-semibold pb-5">Sidebar</p> | ||
<p class="pb-2"> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas mattis | ||
est eu odio sagittis tristique. Vestibulum ut finibus leo. In hac | ||
habitasse platea dictumst. | ||
</p> | ||
</div> | ||
<component :is="component" /> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: 'sidebar', | ||
props: { | ||
sidebar: { | ||
default: 'Default' | ||
} | ||
}, | ||
computed: { | ||
component() { | ||
return () => import(`~/components/sidebars/${this.sidebar}`) | ||
} | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<template> | ||
<div class="w-full flex flex-col my-4"> | ||
<p class="text-xl font-semibold pb-5">Alt Sidebar</p> | ||
<p class="pb-2"> | ||
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum | ||
dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non | ||
proident, sunt in culpa qui officia deserunt mollit anim id est laborum. | ||
</p> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<template> | ||
<div className="w-full flex flex-col my-4"> | ||
<h2 class="title-font text-lg font-medium mb-3">CATEGORIES</h2> | ||
<nav class="list-none mb-5"> | ||
<ul v-for="category in $static.category.edges"> | ||
<li> | ||
<g-link :to="category.node.path">{{ category.node.title | capitalise }} ({{ category.node.belongsTo.totalCount }})</g-link> | ||
</li> | ||
</ul> | ||
</nav> | ||
</div> | ||
</template> | ||
|
||
<static-query> | ||
query { | ||
category: allCategory(sortBy: "title", order: ASC) { | ||
edges { | ||
node { | ||
id | ||
title | ||
path | ||
belongsTo { | ||
totalCount | ||
} | ||
} | ||
} | ||
} | ||
} | ||
</static-query> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<template> | ||
<div class="w-full flex flex-col my-4"> | ||
<p class="text-xl font-semibold pb-5">Sidebar</p> | ||
<p class="pb-2"> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas mattis | ||
est eu odio sagittis tristique. Vestibulum ut finibus leo. In hac | ||
habitasse platea dictumst. | ||
</p> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters