index.vue 6.0 KB

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