footer.vue 4.7 KB

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