Skip to content

Commit

Permalink
feat: add author info
Browse files Browse the repository at this point in the history
  • Loading branch information
viko16 committed Apr 29, 2019
1 parent b5094e1 commit 10fd13f
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 12 deletions.
30 changes: 18 additions & 12 deletions components/FooterBar.vue
Original file line number Diff line number Diff line change
@@ -1,30 +1,36 @@
<template>
<footer class="footer">
Copyright © {{ thisYear }} <br>Powered by
© {{ thisYear }}
<i
v-if="author"
class="icon-user"
/>
{{ author }}
<br>
Powered by
<a
href="https://vuepress.vuejs.org/"
rel="noopener"
target="_blank"
>
VuePress<!--
-->
</a> | Theme
>VuePress</a>
| Theme
<a
href="https://github.com/viko16/vuepress-theme-simple"
rel="noopener"
target="_blank"
>
Simple
</a>
>Simple</a>
</footer>
</template>

<script>
export default {
data () {
return {
thisYear: new Date().getFullYear()
}
computed: {
thisYear() {
return new Date().getFullYear();
},
author() {
return this.$themeConfig.author || '';
},
}
}
</script>
1 change: 1 addition & 0 deletions styles/assets/user.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions styles/index.styl
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,16 @@ code
color metaColor
text-decoration underline

.icon-user
width 16px
height 16px
display inline-block
background-image embedurl('./assets/user.svg', 'utf8')
background-repeat no-repeat
background-position center
background-size 100%
vertical-align sub

//
// List View
// -----------------------------------------
Expand Down

0 comments on commit 10fd13f

Please sign in to comment.