index.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. <style scoped>
  2. .actor {
  3. &.typing:after {
  4. content: '|';
  5. animation: blink 500ms infinite;
  6. }
  7. }
  8. .banner {
  9. position: relative;
  10. height: 420px;
  11. color: #fff;
  12. margin-bottom: 130px;
  13. .container {
  14. position: relative;
  15. }
  16. img {
  17. position: absolute;
  18. top: 15px;
  19. right: -10px;
  20. }
  21. }
  22. .banner-sky {
  23. position: absolute;
  24. top: -150px;
  25. bottom: -15px;
  26. width: 100%;
  27. margin-top: -140px;
  28. transform: skewY(-5deg);
  29. transform-origin: center;
  30. background-image: linear-gradient(180deg, #0d1a44 13%, #3c4f91 56%, #5fc1e4 100%);
  31. }
  32. img.banner-stars {
  33. top: -10px;
  34. left: 50%;
  35. transform: translateX(-50%);
  36. }
  37. .banner-desc {
  38. padding-top: 80px;
  39. font-size: 46px;
  40. position: relative;
  41. z-index: 10;
  42. h2 {
  43. font-size: 80px;
  44. margin: 0;
  45. }
  46. }
  47. .cards {
  48. margin: 0 auto 110px;
  49. width: 1140px;
  50. .container {
  51. @utils-clearfix;
  52. padding: 0;
  53. margin: 0 -11px;
  54. width: auto;
  55. }
  56. li {
  57. width: 33.33333%;
  58. padding: 0 19px;
  59. box-sizing: border-box;
  60. float: left;
  61. list-style: none;
  62. }
  63. }
  64. .card {
  65. height: 430px;
  66. width: 100%;
  67. background:#ffffff;
  68. border:1px solid #eaeefb;
  69. border-radius:5px;
  70. box-sizing: border-box;
  71. text-align: center;
  72. position: relative;
  73. transition: all .3s ease-in-out;
  74. bottom: 0;
  75. img {
  76. margin: 66px auto 60px;
  77. }
  78. h3 {
  79. margin: 0;
  80. font-size: 18px;
  81. color: #1f2f3d;
  82. font-weight: normal;
  83. }
  84. p {
  85. font-size: 14px;
  86. color: #99a9bf;
  87. padding: 0 25px;
  88. }
  89. a {
  90. height: 53px;
  91. line-height: 52px;
  92. font-size: 14px;
  93. color: #20a0ff;
  94. text-align: center;
  95. border: 0;
  96. border-top: 1px solid #eaeefb;
  97. padding: 0;
  98. cursor: pointer;
  99. width: 100%;
  100. position: absolute;
  101. bottom: 0;
  102. left: 0;
  103. background-color: #fff;
  104. border-radius: 0 0 5px 5px;
  105. transition: all .3s;
  106. text-decoration: none;
  107. display: block;
  108. &:hover {
  109. background-color: #20a0ff;
  110. color: #fff;
  111. background: #20a0ff;
  112. }
  113. }
  114. &:hover {
  115. bottom: 6px;
  116. box-shadow: 0px 6px 18px 0px rgba(232,237,250,0.50);
  117. }
  118. }
  119. @keyframes blink {
  120. from { opacity: 0; }
  121. to { opacity: 1; }
  122. }
  123. @media (max-width: 1140px) {
  124. .cards {
  125. width: 100%;
  126. }
  127. }
  128. </style>
  129. <template>
  130. <div>
  131. <div class="banner">
  132. <div class="banner-sky"></div>
  133. <img class="banner-stars" src="~examples/assets/images/stars.png" alt="Element">
  134. <div class="container">
  135. <div class="banner-desc">
  136. <h2>Element</h2>
  137. <div id="line1" class="actor"></div>
  138. <div id="line2" class="actor"></div>
  139. </div>
  140. <img src="~examples/assets/images/banner-bg.svg" alt="Element">
  141. </div>
  142. </div>
  143. <div class="cards">
  144. <ul class="container">
  145. <li>
  146. <div class="card">
  147. <img src="~examples/assets/images/zhinan.png" alt="">
  148. <h3>指南</h3>
  149. <p>了解设计指南,帮助产品设计人员搭建逻辑清晰、结构合理且高效易用的产品。</p>
  150. <router-link
  151. active-class="active"
  152. to="/guide/design"
  153. exact>查看详情
  154. </router-link>
  155. </div>
  156. </li>
  157. <li>
  158. <div class="card">
  159. <img src="~examples/assets/images/zujian.png" alt="">
  160. <h3>组件</h3>
  161. <p>使用组件 Demo 快速体验交互细节;使用前端框架封装的代码帮助工程师快速开发。</p>
  162. <router-link
  163. active-class="active"
  164. to="/component/layout"
  165. exact>查看详情
  166. </router-link>
  167. </div>
  168. </li>
  169. <li>
  170. <div class="card">
  171. <img src="~examples/assets/images/ziyuan.svg" alt="">
  172. <h3>资源</h3>
  173. <p>下载相关资源,用其快速搭建页面原型或高保真视觉稿,提升产品设计效率。</p>
  174. <router-link
  175. active-class="active"
  176. to="/resource"
  177. exact>查看详情
  178. </router-link>
  179. </div>
  180. </li>
  181. </ul>
  182. </div>
  183. </div>
  184. </template>
  185. <script>
  186. import theaterJS from 'theaterjs';
  187. export default {
  188. mounted() {
  189. function typing(theater) {
  190. theater
  191. .addScene('产品设计师', 600, -5, 800)
  192. .addScene('交互设计师', 600, -5, 500)
  193. .addScene('视觉设计师', 600, -5, 700)
  194. .addScene('产品经理', 600, -4, 600)
  195. .addScene('前端工程师', 600, -5, 800)
  196. .addScene((done) => {
  197. typing(theater);
  198. done();
  199. });
  200. }
  201. var theater = theaterJS();
  202. theater
  203. .on('type:start, erase:start', function() {
  204. theater.getCurrentActor().$element.classList.add('typing');
  205. })
  206. .on('type:end, erase:end', function() {
  207. theater.getCurrentActor().$element.classList.remove('typing');
  208. });
  209. theater
  210. .addActor('line1', { speed: 0.8, accuracy: 0.6 })
  211. .addActor('line2')
  212. .addScene(400)
  213. .addScene('line1:快速搭建页面', 600)
  214. .addScene('line2:只为守护世界和平', 800, -6, '让你少加班', 1000)
  215. .addScene('line2:只为这样的你: ', 600)
  216. .addScene((done) => {
  217. typing(theater);
  218. done();
  219. });
  220. }
  221. };
  222. </script>