footer.vue 5.3 KB

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