footer.vue 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. <template>
  2. <footer class="footer">
  3. <div class="container">
  4. <div class="footer-main">
  5. <h4>{{ langConfig.links }}</h4>
  6. <a href="https://github.com/ElemeFE/element" class="footer-main-link" target="_blank">{{ langConfig.repo }}</a>
  7. <a href="https://github.com/ElemeFE/element/releases" class="footer-main-link" target="_blank">{{ langConfig.changelog }}</a>
  8. <a href="https://github.com/ElemeFE/element/blob/dev/FAQ.md" class="footer-main-link" target="_blank">{{ langConfig.faq }}</a>
  9. <a href="https://github.com/ElementUI/element-starter" class="footer-main-link" target="_blank">{{ langConfig.starter }}</a>
  10. <a :href="'/#/' + lang + '/component/custom-theme'" class="footer-main-link" target="_blank">{{ langConfig.theme }}</a>
  11. <a href="https://github.com/elemefe/element-react" class="footer-main-link" target="_blank">Element-React</a>
  12. <a href="https://github.com/ElemeFE/element-angular" class="footer-main-link" target="_blank">Element-Angular</a>
  13. </div>
  14. <div class="footer-main">
  15. <h4>{{ langConfig.community }}</h4>
  16. <a :href="gitterLink" class="footer-main-link" target="_blank">{{ langConfig.gitter }}</a>
  17. <a href="https://github.com/ElemeFE/element/issues" class="footer-main-link" target="_blank">{{ langConfig.feedback }}</a>
  18. <a :href="`https://github.com/ElemeFE/element/blob/master/.github/CONTRIBUTING.${ lang }.md`" class="footer-main-link" target="_blank">{{ langConfig.contribution }}</a>
  19. <a href="https://segmentfault.com/t/element-ui" class="footer-main-link" target="_blank">SegmentFault</a>
  20. <a href="https://github.com/ElementUI/awesome-element" class="footer-main-link" target="_blank">Awesome Element</a>
  21. </div>
  22. <div class="footer-social">
  23. <p class="footer-social-title">Element {{ version && version.slice(0, 3) }} Fullerene</p>
  24. <el-popover
  25. ref="weixin"
  26. placement="top"
  27. width="120"
  28. popper-class="footer-popover"
  29. trigger="hover">
  30. <div class="footer-popover-title">{{ langConfig.eleme }} UED</div>
  31. <img src="../assets/images/qrcode.png" alt="">
  32. </el-popover>
  33. <i class="doc-icon-weixin elementdoc" v-popover:weixin></i>
  34. <a href="https://github.com/elemefe" target="_blank">
  35. <i class="doc-icon-github elementdoc"></i>
  36. </a>
  37. <a :href="gitterLink" target="_blank">
  38. <i class="doc-icon-gitter elementdoc"></i>
  39. </a>
  40. </div>
  41. </div>
  42. </footer>
  43. </template>
  44. <style lang="scss">
  45. .footer {
  46. background-color: #F7FBFD;
  47. width: 100%;
  48. padding: 40px 150px;
  49. margin-top: -340px;
  50. box-sizing: border-box;
  51. height: 340px;
  52. .container {
  53. box-sizing: border-box;
  54. width: auto;
  55. }
  56. .footer-main {
  57. font-size: 0;
  58. display: inline-block;
  59. vertical-align: top;
  60. margin-right: 110px;
  61. h4 {
  62. font-size: 18px;
  63. color: #333;
  64. line-height: 1;
  65. margin: 0 0 15px 0;
  66. }
  67. .footer-main-link {
  68. display: block;
  69. margin: 0;
  70. line-height: 2;
  71. font-size: 14px;
  72. color: #666;
  73. &:hover {
  74. color: #333;
  75. }
  76. }
  77. }
  78. .footer-social {
  79. float: right;
  80. text-align: right;
  81. .footer-social-title {
  82. color: #666;
  83. font-size: 18px;
  84. line-height: 1;
  85. margin: 0 0 20px 0;
  86. padding: 0;
  87. font-weight: bold;
  88. }
  89. .elementdoc {
  90. transition: .3s;
  91. display: inline-block;
  92. line-height: 32px;
  93. text-align: center;
  94. color: #c8d6e8;
  95. background-color: transparent;
  96. size: 32px;
  97. font-size: 32px;
  98. vertical-align: middle;
  99. margin-right: 20px;
  100. &:hover {
  101. transform: scale(1.2);
  102. color: #8D99AB;
  103. }
  104. }
  105. .doc-icon-gitter {
  106. margin-right: 0;
  107. }
  108. }
  109. }
  110. .el-popover.footer-popover {
  111. padding: 0;
  112. min-width: 120px;
  113. line-height: normal;
  114. box-shadow: 0 0 11px 0 rgba(174, 187, 211, 0.24);
  115. .footer-popover-title {
  116. border-bottom: solid 1px #eaeefb;
  117. height: 30px;
  118. line-height: 30px;
  119. text-align: center;
  120. color: #99a9bf;
  121. background-color: #f8f9fe;
  122. }
  123. img {
  124. size: 100px;
  125. margin: 10px;
  126. }
  127. }
  128. @media (max-width: 1140px) {
  129. .footer {
  130. height: auto;
  131. }
  132. }
  133. @media (max-width: 1000px) {
  134. .footer-social {
  135. display: none;
  136. }
  137. }
  138. @media (max-width: 768px) {
  139. .footer {
  140. .footer-main {
  141. margin-bottom: 30px;
  142. }
  143. }
  144. }
  145. </style>
  146. <script type="text/babel">
  147. import compoLang from '../i18n/component.json';
  148. import Element from 'main/index.js';
  149. const { version } = Element;
  150. export default {
  151. data() {
  152. return {
  153. version
  154. };
  155. },
  156. computed: {
  157. lang() {
  158. return this.$route.path.split('/')[1] || 'zh-CN';
  159. },
  160. langConfig() {
  161. return compoLang.filter(config => config.lang === this.lang)[0]['footer'];
  162. },
  163. gitterLink() {
  164. return this.lang === 'zh-CN' ? 'https://gitter.im/ElemeFE/element' : 'https://gitter.im/element-en/Lobby';
  165. }
  166. }
  167. };
  168. </script>