You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
1.5 KiB

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