footer.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  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. width: auto;
  52. }
  53. .footer-main {
  54. font-size: 0;
  55. display: inline-block;
  56. vertical-align: top;
  57. margin-right: 110px;
  58. h4 {
  59. font-size: 18px;
  60. color: #333;
  61. line-height: 1;
  62. margin: 0 0 15px 0;
  63. }
  64. .footer-main-link {
  65. display: block;
  66. margin: 0;
  67. line-height: 2;
  68. font-size: 14px;
  69. color: #666;
  70. &:hover {
  71. color: #333;
  72. }
  73. }
  74. }
  75. .footer-social {
  76. float: right;
  77. text-align: right;
  78. .footer-social-title {
  79. color: #666;
  80. font-size: 18px;
  81. line-height: 1;
  82. margin: 0 0 20px 0;
  83. padding: 0;
  84. font-weight: bold;
  85. }
  86. .elementdoc {
  87. transition: .3s;
  88. display: inline-block;
  89. line-height: 32px;
  90. text-align: center;
  91. color: #c8d6e8;
  92. background-color: transparent;
  93. size: 32px;
  94. font-size: 32px;
  95. vertical-align: middle;
  96. margin-right: 20px;
  97. &:hover {
  98. transform: scale(1.2);
  99. color: #8D99AB;
  100. }
  101. }
  102. .doc-icon-gitter {
  103. margin-right: 0;
  104. }
  105. }
  106. }
  107. .el-popover.footer-popover {
  108. padding: 0;
  109. min-width: 120px;
  110. line-height: normal;
  111. box-shadow: 0 0 11px 0 rgba(174, 187, 211, 0.24);
  112. .footer-popover-title {
  113. border-bottom: solid 1px #eaeefb;
  114. height: 30px;
  115. line-height: 30px;
  116. text-align: center;
  117. color: #99a9bf;
  118. background-color: #f8f9fe;
  119. }
  120. img {
  121. size: 100px;
  122. margin: 10px;
  123. }
  124. }
  125. @media (max-width: 768px) {
  126. .footer {
  127. .footer-social {
  128. display: none;
  129. }
  130. }
  131. }
  132. </style>
  133. <script type="text/babel">
  134. import compoLang from '../i18n/component.json';
  135. import { version } from 'main/index.js';
  136. export default {
  137. data() {
  138. return {
  139. version
  140. };
  141. },
  142. computed: {
  143. lang() {
  144. return this.$route.path.split('/')[1] || 'zh-CN';
  145. },
  146. langConfig() {
  147. return compoLang.filter(config => config.lang === this.lang)[0]['footer'];
  148. },
  149. gitterLink() {
  150. return this.lang === 'zh-CN' ? 'https://gitter.im/ElemeFE/element' : 'https://gitter.im/element-en/Lobby';
  151. }
  152. }
  153. };
  154. </script>