index.tpl 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355
  1. <style scoped>
  2. .banner {
  3. text-align: center;
  4. }
  5. .banner-desc {
  6. padding-top: 20px;
  7. h1 {
  8. font-size: <%= titleSize >px;
  9. margin: 0;
  10. line-height: 48px;
  11. color: #555;
  12. }
  13. p {
  14. font-size: <%= paraSize >px;
  15. line-height: 28px;
  16. color: #888;
  17. margin: 10px 0 5px;
  18. }
  19. }
  20. .sponsor {
  21. margin: 0 auto 50px;
  22. display: flex;
  23. width: 400px;
  24. height: 100px;
  25. justify-content: center;
  26. img {
  27. margin-right: 20px;
  28. }
  29. div {
  30. display: flex;
  31. flex-direction: column;
  32. justify-content: center;
  33. }
  34. p {
  35. margin: 0;
  36. line-height: 1.8;
  37. color: #999;
  38. font-size: 14px;
  39. }
  40. }
  41. .jumbotron {
  42. width: 890px;
  43. height: 465px;
  44. margin: 30px auto;
  45. position: relative;
  46. div {
  47. width: 100%;
  48. height: 100%;
  49. background-color: transparent;
  50. position: absolute;
  51. top: 0;
  52. left: 0;
  53. }
  54. img {
  55. position: absolute;
  56. }
  57. .jumbotron-cloud-1 {
  58. right: 0;
  59. top: 0;
  60. height: 55px;
  61. }
  62. .jumbotron-plant-2 {
  63. left: 60px;
  64. top: 200px;
  65. }
  66. .jumbotron-web {
  67. height: 385px;
  68. top: 35px;
  69. left: 110px;
  70. }
  71. .jumbotron-cloud-2 {
  72. left: 0;
  73. top: 50px;
  74. height: 55px;
  75. }
  76. .jumbotron-compo-1 {
  77. left: 94px;
  78. height: 90px;
  79. top: 220px;
  80. }
  81. .jumbotron-compo-2 {
  82. right: 73px;
  83. top: 60px;
  84. height: 124px;
  85. }
  86. .jumbotron-compo-3 {
  87. right: 42px;
  88. top: 200px;
  89. height: 120px;
  90. }
  91. .jumbotron-plant-1 {
  92. bottom: 0;
  93. left: 30px;
  94. height: 185px;
  95. }
  96. .jumbotron-figure-1 {
  97. bottom: 0;
  98. right: 180px;
  99. height: 140px;
  100. }
  101. .jumbotron-figure-2 {
  102. bottom: 0;
  103. right: 10px;
  104. height: 68px;
  105. }
  106. }
  107. .cards {
  108. margin: 0 auto 110px;
  109. width: 1140px;
  110. .container {
  111. @utils-clearfix;
  112. padding: 0;
  113. margin: 0 -11px;
  114. width: auto;
  115. }
  116. li {
  117. width: 33.33333%;
  118. padding: 0 19px;
  119. box-sizing: border-box;
  120. float: left;
  121. list-style: none;
  122. }
  123. img {
  124. width: 160px;
  125. height: 120px;
  126. }
  127. }
  128. .card {
  129. height: 430px;
  130. width: 100%;
  131. background:#ffffff;
  132. border:1px solid #eaeefb;
  133. border-radius:5px;
  134. box-sizing: border-box;
  135. text-align: center;
  136. position: relative;
  137. transition: all .3s ease-in-out;
  138. bottom: 0;
  139. img {
  140. margin: 66px auto 60px;
  141. }
  142. h3 {
  143. margin: 0;
  144. font-size: 18px;
  145. color: #1f2f3d;
  146. font-weight: normal;
  147. }
  148. p {
  149. font-size: 14px;
  150. color: #99a9bf;
  151. padding: 0 25px;
  152. line-height: 20px;
  153. }
  154. a {
  155. height: 53px;
  156. line-height: 52px;
  157. font-size: 14px;
  158. color: #409EFF;
  159. text-align: center;
  160. border: 0;
  161. border-top: 1px solid #eaeefb;
  162. padding: 0;
  163. cursor: pointer;
  164. width: 100%;
  165. position: absolute;
  166. bottom: 0;
  167. left: 0;
  168. background-color: #fff;
  169. border-radius: 0 0 5px 5px;
  170. transition: all .3s;
  171. text-decoration: none;
  172. display: block;
  173. &:hover {
  174. color: #fff;
  175. background: #409EFF;
  176. }
  177. }
  178. &:hover {
  179. bottom: 6px;
  180. box-shadow: 0 6px 18px 0 rgba(232,237,250,0.50);
  181. }
  182. }
  183. @media (max-width: 1140px) {
  184. .cards {
  185. width: 100%;
  186. .container {
  187. width: 100%;
  188. margin: 0;
  189. }
  190. }
  191. .banner .container {
  192. width: 100%;
  193. box-sizing: border-box;
  194. }
  195. .banner img {
  196. right: 0;
  197. }
  198. }
  199. @media (max-width: 1000px) {
  200. .banner .container {
  201. img {
  202. display: none;
  203. }
  204. }
  205. .jumbotron {
  206. display: none;
  207. }
  208. }
  209. @media (max-width: 768px) {
  210. .cards {
  211. li {
  212. width: 80%;
  213. margin: 0 auto 20px;
  214. float: none;
  215. }
  216. .card {
  217. height: auto;
  218. padding-bottom: 54px;
  219. }
  220. }
  221. .banner-stars {
  222. display: none;
  223. }
  224. .banner-desc {
  225. #line2 {
  226. display: none;
  227. }
  228. h2 {
  229. font-size: 32px;
  230. }
  231. p {
  232. width: auto;
  233. }
  234. }
  235. }
  236. </style>
  237. <template>
  238. <div>
  239. <div class="banner">
  240. <div class="banner-desc">
  241. <h1><%= 1 ></h1>
  242. <p><%= 2 ></p>
  243. </div>
  244. </div>
  245. <div class="jumbotron">
  246. <div>
  247. <img class="jumbotron-plant-2" src="~examples/assets/images/plant-2.png" alt="">
  248. <img class="jumbotron-web" src="~examples/assets/images/web.png" alt="">
  249. <img class="jumbotron-plant-1" src="~examples/assets/images/plant-1.png" alt="">
  250. <img class="jumbotron-figure-1" src="~examples/assets/images/figure-1.png" alt="">
  251. <img class="jumbotron-figure-2" src="~examples/assets/images/figure-2.png" alt="">
  252. </div>
  253. <div data-hover-layer="0">
  254. <img class="jumbotron-cloud-1" src="~examples/assets/images/cloud-1.png" alt="">
  255. <img class="jumbotron-cloud-2" src="~examples/assets/images/cloud-2.png" alt="">
  256. </div>
  257. <div data-hover-layer="1">
  258. <img class="jumbotron-compo-1" src="~examples/assets/images/compo-1.png" alt="">
  259. <img class="jumbotron-compo-2" src="~examples/assets/images/compo-2.png" alt="">
  260. <img class="jumbotron-compo-3" src="~examples/assets/images/compo-3.png" alt="">
  261. </div>
  262. </div>
  263. <a class="sponsor" href="https://tipe.io/?ref=element" target="_blank">
  264. <img width="35px" src="~examples/assets/images/tipe.svg" alt="tipe.io">
  265. <div>
  266. <p>Sponsored by Tipe.io</p>
  267. <p>Next Generation API-first CMS</p>
  268. </div>
  269. </a>
  270. <div class="cards">
  271. <ul class="container">
  272. <li>
  273. <div class="card">
  274. <img src="~examples/assets/images/guide.png" alt="">
  275. <h3><%= 3 ></h3>
  276. <p><%= 4 ></p>
  277. <router-link
  278. active-class="active"
  279. to="/<%= lang >/guide/design"
  280. exact><%= 5 >
  281. </router-link>
  282. </div>
  283. </li>
  284. <li>
  285. <div class="card">
  286. <img src="~examples/assets/images/component.png" alt="">
  287. <h3><%= 6 ></h3>
  288. <p><%= 7 ></p>
  289. <router-link
  290. active-class="active"
  291. to="/<%= lang >/component/layout"
  292. exact><%= 5 >
  293. </router-link>
  294. </div>
  295. </li>
  296. <li>
  297. <div class="card">
  298. <img src="~examples/assets/images/resource.png" alt="">
  299. <h3><%= 8 ></h3>
  300. <p><%= 9 ></p>
  301. <router-link
  302. active-class="active"
  303. to="/<%= lang >/resource"
  304. exact><%= 5 >
  305. </router-link>
  306. </div>
  307. </li>
  308. </ul>
  309. </div>
  310. </div>
  311. </template>
  312. <script>
  313. import { Hover } from 'perspective.js';
  314. export default {
  315. mounted() {
  316. new Hover('.jumbotron', { // eslint-disable-line
  317. max: 3,
  318. scale: 1,
  319. perspective: 700,
  320. layers: [{
  321. multiple: 0.01,
  322. reverseTranslate: true
  323. }, {
  324. multiple: 0.02,
  325. reverseTranslate: true
  326. }]
  327. });
  328. }
  329. };
  330. </script>