index.tpl 7.9 KB

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