vp-footer.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  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
  16. href="https://github.com/element-plus/element-plus"
  17. class="footer-main-link"
  18. target="_blank"
  19. >
  20. {{ homeLang['11'] }}
  21. </a>
  22. <a
  23. href="https://element-plus.gitee.io/zh-CN/"
  24. class="footer-main-link"
  25. target="_blank"
  26. >
  27. {{ homeLang['china_mirror'] }}
  28. </a>
  29. <a
  30. href="https://github.com/element-plus/element-plus/releases"
  31. class="footer-main-link"
  32. target="_blank"
  33. >
  34. {{ homeLang['12'] }}
  35. </a>
  36. <a
  37. href="https://element.eleme.io/"
  38. class="footer-main-link"
  39. target="_blank"
  40. >
  41. {{ homeLang['13'] }}
  42. </a>
  43. </div>
  44. <div class="footer-main">
  45. <h4>{{ homeLang['19'] }}</h4>
  46. <a
  47. href="https://discord.com/invite/gXK9XNzW3X"
  48. class="footer-main-link"
  49. target="_blank"
  50. >
  51. {{ homeLang['discord'] }}
  52. </a>
  53. <a
  54. href="https://github.com/element-plus/element-plus/issues"
  55. class="footer-main-link"
  56. target="_blank"
  57. >
  58. {{ homeLang['16'] }}
  59. </a>
  60. <a
  61. href="https://github.com/element-plus/element-plus/blob/dev/.github/CONTRIBUTING.en-US.md"
  62. class="footer-main-link"
  63. target="_blank"
  64. >
  65. {{ homeLang['17'] }}
  66. </a>
  67. <a
  68. href="https://segmentfault.com/t/element-plus"
  69. class="footer-main-link"
  70. target="_blank"
  71. >
  72. {{ homeLang['18'] }}
  73. </a>
  74. </div>
  75. </footer>
  76. </template>
  77. <style lang="scss">
  78. .dark .footer {
  79. background-color: var(--el-fill-color-lighter);
  80. }
  81. .footer {
  82. background-color: #f5f7fa;
  83. box-sizing: border-box;
  84. padding: 42px 64px 64px;
  85. // height: 340px;
  86. &.is-home {
  87. background-color: var(--bg-color);
  88. max-width: 900px;
  89. margin: 0 auto;
  90. padding: 40px 19px;
  91. }
  92. .container {
  93. box-sizing: border-box;
  94. width: auto;
  95. }
  96. .footer-main {
  97. font-size: 0;
  98. display: inline-block;
  99. vertical-align: top;
  100. margin-right: 130px;
  101. h4 {
  102. font-size: 18px;
  103. line-height: 1;
  104. margin: 0 0 15px;
  105. font-weight: 400;
  106. color: var(--el-text-color-primary);
  107. }
  108. .footer-main-link {
  109. display: block;
  110. margin: 0;
  111. line-height: 2;
  112. font-size: 14px;
  113. color: var(--text-color-light);
  114. &:hover {
  115. color: var(--text-color);
  116. }
  117. }
  118. }
  119. .footer-social {
  120. float: right;
  121. text-align: right;
  122. .footer-social-title {
  123. color: var(--text-color-light);
  124. font-size: 18px;
  125. line-height: 1;
  126. margin: 0 0 20px;
  127. padding: 0;
  128. font-weight: bold;
  129. }
  130. .ep-icon-github {
  131. transition: 0.3s;
  132. display: inline-block;
  133. line-height: 32px;
  134. text-align: center;
  135. color: #c8d6e8;
  136. background-color: transparent;
  137. font-size: 32px;
  138. vertical-align: middle;
  139. margin-right: 20px;
  140. &:hover {
  141. transform: scale(1.2);
  142. color: #8d99ab;
  143. }
  144. }
  145. .doc-icon-gitter {
  146. margin-right: 0;
  147. }
  148. }
  149. }
  150. @media (max-width: 1140px) {
  151. .footer {
  152. height: auto;
  153. }
  154. }
  155. @media (max-width: 1000px) {
  156. .footer-social {
  157. display: none;
  158. }
  159. }
  160. @media (max-width: 768px) {
  161. .footer {
  162. .footer-main {
  163. margin-bottom: 30px;
  164. }
  165. }
  166. }
  167. </style>