index.tpl 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  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. }
  54. p {
  55. font-size: 14px;
  56. opacity: .8;
  57. width: 420px;
  58. line-height: <%= paraHeight >;
  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: <%= paraHeight >;
  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. color: #fff;
  130. background: #20a0ff;
  131. }
  132. }
  133. &:hover {
  134. bottom: 6px;
  135. box-shadow: 0px 6px 18px 0px rgba(232,237,250,0.50);
  136. }
  137. }
  138. @keyframes blink {
  139. from { opacity: 0; }
  140. to { opacity: 1; }
  141. }
  142. @media (max-width: 1140px) {
  143. .cards {
  144. width: 100%;
  145. .container {
  146. width: 100%;
  147. }
  148. }
  149. .banner .container {
  150. width: 100%;
  151. box-sizing: border-box;
  152. }
  153. .banner img {
  154. right: 0;
  155. }
  156. }
  157. @media (max-width: 1000px) {
  158. .banner .container {
  159. img {
  160. display: none;
  161. }
  162. }
  163. }
  164. @media (max-width: 768px) {
  165. .cards {
  166. li {
  167. width: 80%;
  168. margin: 0 auto 20px;
  169. float: none;
  170. }
  171. .card {
  172. height: auto;
  173. padding-bottom: 54px;
  174. }
  175. }
  176. .banner-stars {
  177. display: none;
  178. }
  179. .banner-desc {
  180. #line2 {
  181. display: none;
  182. }
  183. h2 {
  184. font-size: 32px;
  185. }
  186. p {
  187. width: auto;
  188. }
  189. }
  190. }
  191. </style>
  192. <template>
  193. <div>
  194. <div class="banner">
  195. <div class="banner-sky"></div>
  196. <img class="banner-stars" src="~examples/assets/images/stars.png" alt="Element">
  197. <div class="container">
  198. <div class="banner-desc">
  199. <h2><%= 1 ></h2>
  200. <div id="line2" class="actor"></div>
  201. <p><%= 2 ></p>
  202. </div>
  203. <img src="~examples/assets/images/banner-bg.svg" alt="Element">
  204. </div>
  205. </div>
  206. <div class="cards">
  207. <ul class="container">
  208. <li>
  209. <div class="card">
  210. <img src="~examples/assets/images/guide.png" alt="">
  211. <h3><%= 3 ></h3>
  212. <p><%= 4 ></p>
  213. <router-link
  214. active-class="active"
  215. to="/<%= lang >/guide/design"
  216. exact><%= 5 >
  217. </router-link>
  218. </div>
  219. </li>
  220. <li>
  221. <div class="card">
  222. <img src="~examples/assets/images/component.png" alt="">
  223. <h3><%= 6 ></h3>
  224. <p><%= 7 ></p>
  225. <router-link
  226. active-class="active"
  227. to="/<%= lang >/component/layout"
  228. exact><%= 5 >
  229. </router-link>
  230. </div>
  231. </li>
  232. <li>
  233. <div class="card">
  234. <img src="~examples/assets/images/resource.png" alt="">
  235. <h3><%= 8 ></h3>
  236. <p><%= 9 ></p>
  237. <router-link
  238. active-class="active"
  239. to="/<%= lang >/resource"
  240. exact><%= 5 >
  241. </router-link>
  242. </div>
  243. </li>
  244. </ul>
  245. </div>
  246. </div>
  247. </template>
  248. <script>
  249. import theaterJS from 'theaterjs';
  250. export default {
  251. mounted() {
  252. function typing(theater) {
  253. theater
  254. <%= typingFunc >
  255. .addScene((done) => {
  256. typing(theater);
  257. done();
  258. });
  259. }
  260. var theater = theaterJS(<%= theatreParam >);
  261. theater
  262. .on('type:start, erase:start', function() {
  263. theater.getCurrentActor().$element.classList.add('typing');
  264. })
  265. .on('type:end, erase:end', function() {
  266. theater.getCurrentActor().$element.classList.remove('typing');
  267. });
  268. theater
  269. <%= typingInvoke >
  270. .addScene((done) => {
  271. typing(theater);
  272. done();
  273. });
  274. }
  275. };
  276. </script>