nav-footer.vue 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <template lang="pug">
  2. v-footer.justify-center(:color='bgColor', inset)
  3. .caption.grey--text(:class='$vuetify.theme.dark ? `text--lighten-1` : `text--darken-1`')
  4. template(v-if='footerOverride')
  5. span {{footerOverride}} |&nbsp;
  6. template(v-else-if='company && company.length > 0 && contentLicense !== ``')
  7. span(v-if='contentLicense === `alr`') {{ $t('common:footer.copyright', { company: company, year: currentYear, interpolation: { escapeValue: false } }) }} |&nbsp;
  8. span(v-else) {{ $t('common:footer.license', { company: company, license: $t('common:license.' + contentLicense), interpolation: { escapeValue: false } }) }} |&nbsp;
  9. span {{ $t('common:footer.poweredBy') }} #[a(href='https://wiki.js.org', ref='nofollow') Wiki.js]
  10. </template>
  11. <script>
  12. import { get } from 'vuex-pathify'
  13. export default {
  14. props: {
  15. color: {
  16. type: String,
  17. default: 'grey lighten-3'
  18. },
  19. darkColor: {
  20. type: String,
  21. default: 'grey darken-3'
  22. }
  23. },
  24. data() {
  25. return {
  26. currentYear: (new Date()).getFullYear()
  27. }
  28. },
  29. computed: {
  30. company: get('site/company'),
  31. contentLicense: get('site/contentLicense'),
  32. footerOverride: get('site/footerOverride'),
  33. bgColor() {
  34. if (!this.$vuetify.theme.dark) {
  35. return this.color
  36. } else {
  37. return this.darkColor
  38. }
  39. }
  40. }
  41. }
  42. </script>
  43. <style lang="scss">
  44. .v-footer {
  45. a {
  46. text-decoration: none;
  47. }
  48. &.altbg {
  49. background: mc('theme', 'primary');
  50. span {
  51. color: mc('blue', '300');
  52. }
  53. a {
  54. color: mc('blue', '200');
  55. }
  56. }
  57. }
  58. </style>