MainFooter.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. <template>
  2. <footer class="footer">
  3. <div class="container">
  4. <div class="footer-content">
  5. <div id="footer-copyright">
  6. <p>© Copyright Musare 2015 - 2022</p>
  7. </div>
  8. <router-link id="footer-logo" to="/"
  9. ><img src="/assets/blue_wordmark.png" alt="Musare"
  10. /></router-link>
  11. <div id="footer-links">
  12. <a
  13. v-for="(url, title, index) in filteredFooterLinks"
  14. :key="`footer-link-${index}`"
  15. :href="url"
  16. target="_blank"
  17. :title="title"
  18. >
  19. {{ title }}
  20. </a>
  21. <router-link
  22. v-if="getLink('about') === true"
  23. title="About Musare"
  24. to="/about"
  25. >About</router-link
  26. >
  27. <router-link
  28. v-if="getLink('team') === true"
  29. title="Musare Team"
  30. to="/team"
  31. >Team</router-link
  32. >
  33. <router-link
  34. v-if="getLink('news') === true"
  35. title="News"
  36. to="/news"
  37. >News</router-link
  38. >
  39. </div>
  40. </div>
  41. </div>
  42. </footer>
  43. </template>
  44. <script>
  45. export default {
  46. data() {
  47. return {
  48. footerLinks: {}
  49. };
  50. },
  51. computed: {
  52. filteredFooterLinks() {
  53. return Object.fromEntries(
  54. Object.entries(this.footerLinks).filter(
  55. ([title, url]) =>
  56. !(
  57. ["about", "team", "news"].includes(
  58. title.toLowerCase()
  59. ) && typeof url === "boolean"
  60. )
  61. )
  62. );
  63. }
  64. },
  65. async mounted() {
  66. lofig.get("siteSettings.footerLinks").then(footerLinks => {
  67. this.footerLinks = {
  68. about: true,
  69. team: true,
  70. news: true,
  71. ...footerLinks
  72. };
  73. });
  74. },
  75. methods: {
  76. getLink(title) {
  77. return this.footerLinks[
  78. Object.keys(this.footerLinks).find(
  79. key => key.toLowerCase() === title
  80. )
  81. ];
  82. }
  83. }
  84. };
  85. </script>
  86. <style lang="less" scoped>
  87. .night-mode {
  88. footer.footer,
  89. footer.footer .container,
  90. footer.footer .container .footer-content {
  91. background-color: var(--dark-grey-3);
  92. }
  93. }
  94. .footer {
  95. position: relative;
  96. bottom: 0;
  97. flex-shrink: 0;
  98. height: auto;
  99. padding: 20px;
  100. border-radius: 33% 33% 0% 0% / 7% 7% 0% 0%;
  101. box-shadow: 0 4px 8px 0 rgba(3, 169, 244, 0.4),
  102. 0 6px 20px 0 rgba(3, 169, 244, 0.2);
  103. background-color: var(--white);
  104. width: 100%;
  105. height: 160px;
  106. font-size: 16px;
  107. .container {
  108. position: relative;
  109. }
  110. .footer-content {
  111. display: flex;
  112. align-items: center;
  113. flex-direction: column;
  114. text-align: center;
  115. & > * {
  116. margin: 5px 0;
  117. }
  118. a:not(.button) {
  119. border: 0;
  120. }
  121. }
  122. @media (max-width: 650px) {
  123. border-radius: 0;
  124. }
  125. #footer-logo {
  126. display: block;
  127. margin-left: auto;
  128. margin-right: auto;
  129. width: 160px;
  130. order: 1;
  131. img {
  132. max-width: 100%;
  133. user-select: none;
  134. -webkit-user-drag: none;
  135. }
  136. }
  137. #footer-links {
  138. order: 2;
  139. :not(:last-child) {
  140. border-right: solid 1px var(--primary-color);
  141. }
  142. a {
  143. padding: 0 7px 0 4px;
  144. color: var(--primary-color);
  145. &:first-of-type {
  146. padding: 0 7px 0 0;
  147. }
  148. &:last-of-type {
  149. padding: 0 0 0 7px;
  150. }
  151. &:hover {
  152. color: var(--primary-color);
  153. text-decoration: underline;
  154. }
  155. }
  156. }
  157. #footer-copyright {
  158. order: 3;
  159. }
  160. }
  161. @media only screen and (min-width: 990px) {
  162. .footer {
  163. height: 100px;
  164. #footer-copyright {
  165. left: 0;
  166. top: 0;
  167. position: absolute;
  168. line-height: 50px;
  169. }
  170. #footer-links {
  171. right: 0;
  172. top: 0;
  173. position: absolute;
  174. line-height: 50px;
  175. }
  176. }
  177. }
  178. </style>