index.tpl 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290
  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: <%= theatreSize >px;
  48. position: relative;
  49. z-index: 10;
  50. h2 {
  51. font-size: <%= titleSize >px;
  52. margin: 0;
  53. color: #fff;
  54. }
  55. p {
  56. font-size: 14px;
  57. opacity: .8;
  58. width: 420px;
  59. line-height: <%= paraHeight >;
  60. padding-left: 3px;
  61. }
  62. }
  63. .cards {
  64. margin: 0 auto 110px;
  65. width: 1140px;
  66. .container {
  67. @utils-clearfix;
  68. padding: 0;
  69. margin: 0 -11px;
  70. width: auto;
  71. }
  72. li {
  73. width: 33.33333%;
  74. padding: 0 19px;
  75. box-sizing: border-box;
  76. float: left;
  77. list-style: none;
  78. }
  79. img {
  80. width: 160px;
  81. height: 120px;
  82. }
  83. }
  84. .card {
  85. height: 430px;
  86. width: 100%;
  87. background:#ffffff;
  88. border:1px solid #eaeefb;
  89. border-radius:5px;
  90. box-sizing: border-box;
  91. text-align: center;
  92. position: relative;
  93. transition: all .3s ease-in-out;
  94. bottom: 0;
  95. img {
  96. margin: 66px auto 60px;
  97. }
  98. h3 {
  99. margin: 0;
  100. font-size: 18px;
  101. color: #1f2f3d;
  102. font-weight: normal;
  103. }
  104. p {
  105. font-size: 14px;
  106. color: #99a9bf;
  107. padding: 0 25px;
  108. line-height: <%= paraHeight >;
  109. }
  110. a {
  111. height: 53px;
  112. line-height: 52px;
  113. font-size: 14px;
  114. color: #20a0ff;
  115. text-align: center;
  116. border: 0;
  117. border-top: 1px solid #eaeefb;
  118. padding: 0;
  119. cursor: pointer;
  120. width: 100%;
  121. position: absolute;
  122. bottom: 0;
  123. left: 0;
  124. background-color: #fff;
  125. border-radius: 0 0 5px 5px;
  126. transition: all .3s;
  127. text-decoration: none;
  128. display: block;
  129. &:hover {
  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. .container {
  147. width: 100%;
  148. }
  149. }
  150. .banner .container {
  151. width: 100%;
  152. box-sizing: border-box;
  153. }
  154. .banner img {
  155. right: 0;
  156. }
  157. }
  158. @media (max-width: 1000px) {
  159. .banner .container {
  160. img {
  161. display: none;
  162. }
  163. }
  164. }
  165. @media (max-width: 768px) {
  166. .cards {
  167. li {
  168. width: 80%;
  169. margin: 0 auto 20px;
  170. float: none;
  171. }
  172. .card {
  173. height: auto;
  174. padding-bottom: 54px;
  175. }
  176. }
  177. .banner-stars {
  178. display: none;
  179. }
  180. .banner-desc {
  181. #line2 {
  182. display: none;
  183. }
  184. h2 {
  185. font-size: 32px;
  186. }
  187. p {
  188. width: auto;
  189. }
  190. }
  191. }
  192. </style>
  193. <template>
  194. <div>
  195. <div class="banner">
  196. <div class="banner-sky"></div>
  197. <img class="banner-stars" src="~examples/assets/images/stars.png" alt="Element">
  198. <div class="container">
  199. <div class="banner-desc">
  200. <h2><%= 1 ></h2>
  201. <div id="line2" class="actor"></div>
  202. <p><%= 2 ></p>
  203. </div>
  204. <img src="~examples/assets/images/banner-bg.svg" alt="Element">
  205. </div>
  206. </div>
  207. <div class="cards">
  208. <ul class="container">
  209. <li>
  210. <div class="card">
  211. <img src="~examples/assets/images/guide.png" alt="">
  212. <h3><%= 3 ></h3>
  213. <p><%= 4 ></p>
  214. <router-link
  215. active-class="active"
  216. to="/<%= lang >/guide/design"
  217. exact><%= 5 >
  218. </router-link>
  219. </div>
  220. </li>
  221. <li>
  222. <div class="card">
  223. <img src="~examples/assets/images/component.png" alt="">
  224. <h3><%= 6 ></h3>
  225. <p><%= 7 ></p>
  226. <router-link
  227. active-class="active"
  228. to="/<%= lang >/component/layout"
  229. exact><%= 5 >
  230. </router-link>
  231. </div>
  232. </li>
  233. <li>
  234. <div class="card">
  235. <img src="~examples/assets/images/resource.png" alt="">
  236. <h3><%= 8 ></h3>
  237. <p><%= 9 ></p>
  238. <router-link
  239. active-class="active"
  240. to="/<%= lang >/resource"
  241. exact><%= 5 >
  242. </router-link>
  243. </div>
  244. </li>
  245. </ul>
  246. </div>
  247. </div>
  248. </template>
  249. <script>
  250. import theaterJS from 'theaterjs';
  251. export default {
  252. mounted() {
  253. function typing(theater) {
  254. theater
  255. <%= typingFunc >
  256. .addScene((done) => {
  257. typing(theater);
  258. done();
  259. });
  260. }
  261. var theater = theaterJS(<%= theatreParam >);
  262. theater
  263. .on('type:start, erase:start', function() {
  264. theater.getCurrentActor().$element.classList.add('typing');
  265. })
  266. .on('type:end, erase:end', function() {
  267. theater.getCurrentActor().$element.classList.remove('typing');
  268. });
  269. theater
  270. <%= typingInvoke >
  271. .addScene((done) => {
  272. typing(theater);
  273. done();
  274. });
  275. }
  276. };
  277. </script>