footer.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <template>
  2. <footer class="footer">
  3. <div class="container">
  4. <div class="footer-main">
  5. <p class="footer-main-title">Element 1.0 Hydrogen</p>
  6. <a href="https://github.com/ElemeFE/element/issues" class="footer-main-link" target="_blank">{{ langConfig.feedback }}</a>
  7. <a href="https://github.com/ElemeFE/element/blob/master/.github/CONTRIBUTING.md" class="footer-main-link" target="_blank">{{ langConfig.contribution }}</a>
  8. </div>
  9. <div class="footer-social">
  10. <el-popover
  11. ref="weixin"
  12. placement="top"
  13. width="120"
  14. popper-class="footer-popover"
  15. trigger="hover">
  16. <div class="footer-popover-title">{{ langConfig.eleme }} UED</div>
  17. <img src="../assets/images/qrcode.png" alt="">
  18. </el-popover>
  19. <i class="doc-icon-weixin elementdoc" v-popover:weixin></i>
  20. <a href="//github.com/elemefe" target="_blank">
  21. <i class="doc-icon-github elementdoc"></i>
  22. </a>
  23. </div>
  24. </div>
  25. </footer>
  26. </template>
  27. <style>
  28. .footer {
  29. height: 120px;
  30. background-color: #324057;
  31. color: #a4aebd;
  32. width: 100%;
  33. z-index: 1000;
  34. margin-top: -120px;
  35. * {
  36. word-spacing: 0;
  37. }
  38. .container {
  39. height: 100%;
  40. }
  41. .footer-main {
  42. font-size: 0;
  43. padding-top: 40px;
  44. display: inline-block;
  45. .footer-main-title {
  46. line-height: 1;
  47. font-size: 22px;
  48. margin: 0;
  49. }
  50. .footer-main-link {
  51. display: inline-block;
  52. margin: 12px 18px 0 0;
  53. line-height: 1;
  54. font-size: 12px;
  55. color: #768193;
  56. a {
  57. color: #768193;
  58. text-decoration: none;
  59. }
  60. }
  61. }
  62. .footer-social {
  63. float: right;
  64. line-height: 120px;
  65. .elementdoc {
  66. transition: .3s;
  67. display: inline-block;
  68. line-height: 32px;
  69. text-align: center;
  70. color: #8D99AB;
  71. background-color: transparent;
  72. size: 32px;
  73. font-size: 32px;
  74. vertical-align: middle;
  75. &:hover {
  76. transform: scale(1.2);
  77. }
  78. }
  79. .doc-icon-weixin {
  80. margin-right: 36px;
  81. &:hover {
  82. color: #fff;
  83. }
  84. }
  85. .doc-icon-github {
  86. margin-right: 0;
  87. &:hover {
  88. color: #fff;
  89. }
  90. }
  91. }
  92. }
  93. .footer-popover {
  94. padding: 0;
  95. min-width: 120px;
  96. line-height: normal;
  97. box-shadow: 0 0 11px 0 rgba(174, 187, 211, 0.24);
  98. .footer-popover-title {
  99. border-bottom: solid 1px #eaeefb;
  100. height: 30px;
  101. line-height: 30px;
  102. text-align: center;
  103. color: #99a9bf;
  104. background-color: #f8f9fe;
  105. }
  106. img {
  107. size: 100px;
  108. margin: 10px;
  109. }
  110. }
  111. </style>
  112. <script type="text/babel">
  113. import compoLang from '../i18n/component.json';
  114. export default {
  115. computed: {
  116. lang() {
  117. return this.$route.path.split('/')[1];
  118. },
  119. langConfig() {
  120. return compoLang.filter(config => config.lang === this.lang)[0]['footer'];
  121. }
  122. }
  123. };
  124. </script>