vp-footer.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. <script lang="ts" setup>
  2. import { computed } from 'vue'
  3. import { useLang } from '../../composables/lang'
  4. import homeLocale from '../../../i18n/pages/home.json'
  5. defineProps<{
  6. isHome?: boolean
  7. }>()
  8. const lang = useLang()
  9. const homeLang = computed(() => homeLocale[lang.value])
  10. </script>
  11. <template>
  12. <footer class="footer" :class="{ 'is-home': isHome }">
  13. <div class="footer-main">
  14. <h4>{{ homeLang['10'] }}</h4>
  15. <a href="https://github.com/element-plus/element-plus" class="footer-main-link" target="_blank">
  16. {{ homeLang['11'] }}
  17. </a>
  18. <a href="https://element-plus.gitee.io/zh-CN/" class="footer-main-link" target="_blank">
  19. {{ homeLang['china_mirror'] }}
  20. </a>
  21. <a href="https://github.com/element-plus/element-plus/releases" class="footer-main-link" target="_blank">
  22. {{ homeLang['12'] }}
  23. </a>
  24. <a href="https://element.eleme.io/" class="footer-main-link" target="_blank">
  25. {{ homeLang['13'] }}
  26. </a>
  27. </div>
  28. <div class="footer-main">
  29. <h4>{{ homeLang['19'] }}</h4>
  30. <a href="https://discord.link/ElementPlus" class="footer-main-link" target="_blank">
  31. {{ homeLang['discord'] }}
  32. </a>
  33. <a href="https://github.com/element-plus/element-plus/issues" class="footer-main-link" target="_blank">
  34. {{ homeLang['16'] }}
  35. </a>
  36. <a href="https://github.com/element-plus/element-plus/blob/dev/.github/CONTRIBUTING.en-US.md" class="footer-main-link" target="_blank">
  37. {{ homeLang['17'] }}
  38. </a>
  39. <a href="https://segmentfault.com/t/element-plus" class="footer-main-link" target="_blank">
  40. {{ homeLang['18'] }}
  41. </a>
  42. </div>
  43. </footer>
  44. </template>
  45. <style lang="scss">
  46. .dark .footer {
  47. background-color: var(--el-fill-color-lighter);
  48. }
  49. .footer {
  50. background-color: #f5f7fa;
  51. box-sizing: border-box;
  52. padding: 42px 64px 64px;
  53. // height: 340px;
  54. &.is-home {
  55. background-color: var(--bg-color);
  56. max-width: 900px;
  57. margin: 0 auto;
  58. padding: 40px 19px;
  59. }
  60. .container {
  61. box-sizing: border-box;
  62. width: auto;
  63. }
  64. .footer-main {
  65. font-size: 0;
  66. display: inline-block;
  67. vertical-align: top;
  68. margin-right: 130px;
  69. h4 {
  70. font-size: 18px;
  71. line-height: 1;
  72. margin: 0 0 15px 0;
  73. font-weight: 400;
  74. color: var(--el-text-color-primary);
  75. }
  76. .footer-main-link {
  77. display: block;
  78. margin: 0;
  79. line-height: 2;
  80. font-size: 14px;
  81. color: var(--text-color-light);
  82. &:hover {
  83. color: var(--text-color);
  84. }
  85. }
  86. }
  87. .footer-social {
  88. float: right;
  89. text-align: right;
  90. .footer-social-title {
  91. color: var(--text-color-light);
  92. font-size: 18px;
  93. line-height: 1;
  94. margin: 0 0 20px 0;
  95. padding: 0;
  96. font-weight: bold;
  97. }
  98. .ep-icon-github {
  99. transition: 0.3s;
  100. display: inline-block;
  101. line-height: 32px;
  102. text-align: center;
  103. color: #c8d6e8;
  104. background-color: transparent;
  105. font-size: 32px;
  106. vertical-align: middle;
  107. margin-right: 20px;
  108. &:hover {
  109. transform: scale(1.2);
  110. color: #8d99ab;
  111. }
  112. }
  113. .doc-icon-gitter {
  114. margin-right: 0;
  115. }
  116. }
  117. }
  118. @media (max-width: 1140px) {
  119. .footer {
  120. height: auto;
  121. }
  122. }
  123. @media (max-width: 1000px) {
  124. .footer-social {
  125. display: none;
  126. }
  127. }
  128. @media (max-width: 768px) {
  129. .footer {
  130. .footer-main {
  131. margin-bottom: 30px;
  132. }
  133. }
  134. }
  135. </style>