Skip to content

Commit

Permalink
Github link on demo site
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelhorn committed Jul 3, 2019
1 parent be21523 commit bce7d31
Show file tree
Hide file tree
Showing 3 changed files with 69 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ See the [demo](https://jamdocs.netlify.com/), which is also the documentation, o
1. Write the actual documentation for Jamdocs, in Jamdocs :)
2. Build the homepage better, dividing stuff into components and so on.
3. Implement Algolia search.
4. Add a link to this repository from the demo.
4. ~~Add a link to this repository from the demo.~~

## Credits
- Creds to the [Netlify](https://www.netlify.com/) team for making an awesome all in one hosting soluiton for the JAM-stack.
Expand Down
49 changes: 49 additions & 0 deletions src/components/GitLink.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<template>
<a class="link" href="https://github.com/samuelhorn/jamdocs" title="Git-repository" aria-label="This documentation on git">
<github-icon class="icon" />
Jamdocs on Github
</a>
</template>

<script>
import { GithubIcon } from 'vue-feather-icons'
export default {
components: {
GithubIcon
}
}
</script>

<style lang="scss" scoped>
.link {
display: block;
padding: 6px 10px;
border-radius: 3px;
font-size: 12px;
line-height: 18px;
font-weight: 700;
&:focus {
outline: none;
}
.dark & {
color: $textBright;
background: $backgroundBright;
}
.bright & {
color: $textDark;
background: $backgroundDark;
}
}
svg {
width: 18px;
height: 18px;
vertical-align: -6px;
margin-right: 4px;
}
</style>

19 changes: 19 additions & 0 deletions src/components/Sidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
</ul>
</li>
</ul>
<GitLink class="git" />
</nav>
</aside>
</template>
Expand Down Expand Up @@ -48,9 +49,13 @@ query Menu {
</static-query>

<script>
import GitLink from '~/components/GitLink.vue'
import throttle from 'lodash/throttle'
export default {
components: {
GitLink
},
watch: {
'$route' () {
this.$store.commit('closeSidebar')
Expand Down Expand Up @@ -110,6 +115,7 @@ export default {
will-change: transform;
transform: translateX(-300px);
border-right: 1px solid transparent;
overflow: auto;
@include respond-above(sm) {
transform: translateX(0);
Expand All @@ -130,6 +136,13 @@ export default {
}
}
nav {
position: relative;
min-height: 100%;
border: 1px solid transparent;
padding-bottom: 40px;
}
ul {
list-style: none;
padding: 0;
Expand Down Expand Up @@ -189,6 +202,12 @@ a {
}
}
}
.git {
position: absolute;
bottom: 0;
left: 0;
}
</style>


0 comments on commit bce7d31

Please sign in to comment.