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.

70 lines
1.5 KiB

  1. <template lang="pug">
  2. v-footer.justify-center(:color='color', 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. altbg: {
  22. type: Boolean,
  23. default: false
  24. }
  25. },
  26. data() {
  27. return {
  28. currentYear: (new Date()).getFullYear()
  29. }
  30. },
  31. computed: {
  32. company: get('site/company'),
  33. notification: get('notification'),
  34. darkMode: get('site/dark'),
  35. notificationState: sync('notification@isActive'),
  36. color() {
  37. if (this.altbg) {
  38. return 'altbg'
  39. } else if (!this.darkMode) {
  40. return 'grey lighten-3'
  41. } else {
  42. return ''
  43. }
  44. }
  45. }
  46. }
  47. </script>
  48. <style lang="scss">
  49. .v-footer {
  50. a {
  51. text-decoration: none;
  52. }
  53. &.altbg {
  54. background: mc('theme', 'primary');
  55. span {
  56. color: mc('blue', '300');
  57. }
  58. a {
  59. color: mc('blue', '200');
  60. }
  61. }
  62. }
  63. </style>