index.tpl 7.7 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. padding: 0;
  116. margin: 0 -11px;
  117. width: auto;
  118. &::before, &::after {
  119. display: table;
  120. content: "";
  121. }
  122. &::after {
  123. clear: both;
  124. }
  125. }
  126. li {
  127. width: 33.33333%;
  128. padding: 0 19px;
  129. box-sizing: border-box;
  130. float: left;
  131. list-style: none;
  132. }
  133. img {
  134. width: 160px;
  135. height: 120px;
  136. }
  137. }
  138. .card {
  139. height: 430px;
  140. width: 100%;
  141. background:#ffffff;
  142. border:1px solid #eaeefb;
  143. border-radius:5px;
  144. box-sizing: border-box;
  145. text-align: center;
  146. position: relative;
  147. transition: all .3s ease-in-out;
  148. bottom: 0;
  149. img {
  150. margin: 66px auto 60px;
  151. }
  152. h3 {
  153. margin: 0;
  154. font-size: 18px;
  155. color: #1f2f3d;
  156. font-weight: normal;
  157. }
  158. p {
  159. font-size: 14px;
  160. color: #99a9bf;
  161. padding: 0 25px;
  162. line-height: 20px;
  163. }
  164. a {
  165. height: 53px;
  166. line-height: 52px;
  167. font-size: 14px;
  168. color: #409EFF;
  169. text-align: center;
  170. border: 0;
  171. border-top: 1px solid #eaeefb;
  172. padding: 0;
  173. cursor: pointer;
  174. width: 100%;
  175. position: absolute;
  176. bottom: 0;
  177. left: 0;
  178. background-color: #fff;
  179. border-radius: 0 0 5px 5px;
  180. transition: all .3s;
  181. text-decoration: none;
  182. display: block;
  183. &:hover {
  184. color: #fff;
  185. background: #409EFF;
  186. }
  187. }
  188. &:hover {
  189. bottom: 6px;
  190. box-shadow: 0 6px 18px 0 rgba(232,237,250,0.50);
  191. }
  192. }
  193. @media (max-width: 1140px) {
  194. .cards {
  195. width: 100%;
  196. .container {
  197. width: 100%;
  198. margin: 0;
  199. }
  200. }
  201. .banner .container {
  202. width: 100%;
  203. box-sizing: border-box;
  204. }
  205. .banner img {
  206. right: 0;
  207. }
  208. }
  209. @media (max-width: 1000px) {
  210. .banner .container {
  211. img {
  212. display: none;
  213. }
  214. }
  215. .jumbotron {
  216. display: none;
  217. }
  218. }
  219. @media (max-width: 768px) {
  220. .cards {
  221. li {
  222. width: 80%;
  223. margin: 0 auto 20px;
  224. float: none;
  225. }
  226. .card {
  227. height: auto;
  228. padding-bottom: 54px;
  229. }
  230. }
  231. .banner-stars {
  232. display: none;
  233. }
  234. .banner-desc {
  235. #line2 {
  236. display: none;
  237. }
  238. h2 {
  239. font-size: 32px;
  240. }
  241. p {
  242. width: auto;
  243. }
  244. }
  245. }
  246. </style>
  247. <template>
  248. <div>
  249. <div class="banner">
  250. <div class="banner-desc">
  251. <h1><%= 1 ></h1>
  252. <p><%= 2 ></p>
  253. </div>
  254. </div>
  255. <div class="jumbotron">
  256. <div>
  257. <img class="jumbotron-plant-2" src="~examples/assets/images/plant-2.png" alt="">
  258. <img class="jumbotron-web" src="~examples/assets/images/web.png" alt="">
  259. <img class="jumbotron-plant-1" src="~examples/assets/images/plant-1.png" alt="">
  260. <img class="jumbotron-figure-1" src="~examples/assets/images/figure-1.png" alt="">
  261. <img class="jumbotron-figure-2" src="~examples/assets/images/figure-2.png" alt="">
  262. </div>
  263. <div data-hover-layer="0">
  264. <img class="jumbotron-cloud-1" src="~examples/assets/images/cloud-1.png" alt="">
  265. <img class="jumbotron-cloud-2" src="~examples/assets/images/cloud-2.png" alt="">
  266. </div>
  267. <div data-hover-layer="1">
  268. <img class="jumbotron-compo-1" src="~examples/assets/images/compo-1.png" alt="">
  269. <img class="jumbotron-compo-2" src="~examples/assets/images/compo-2.png" alt="">
  270. <img class="jumbotron-compo-3" src="~examples/assets/images/compo-3.png" alt="">
  271. </div>
  272. </div>
  273. <div class="sponsors">
  274. <a class="sponsor" href="https://tipe.io/?ref=element" target="_blank" v-show="lang !== 'zh-CN'">
  275. <img width="35px" src="~examples/assets/images/tipe.svg" alt="tipe.io">
  276. <div>
  277. <p>Sponsored by Tipe.io</p>
  278. <p>Next Generation API-first CMS</p>
  279. </div>
  280. </a>
  281. <a class="sponsor" href="https://www.duohui.cn/?utm_source=element&utm_medium=web&utm_campaign=element-index" target="_blank">
  282. <img width="45px" src="~examples/assets/images/duohui.svg" alt="duohui">
  283. <div>
  284. <p>Sponsored by 多会</p>
  285. <p>炫酷的新一代活动票务系统</p>
  286. </div>
  287. </a>
  288. </div>
  289. <div class="cards">
  290. <ul class="container">
  291. <li>
  292. <div class="card">
  293. <img src="~examples/assets/images/guide.png" alt="">
  294. <h3><%= 3 ></h3>
  295. <p><%= 4 ></p>
  296. <router-link
  297. active-class="active"
  298. to="/<%= lang >/guide/design"
  299. exact><%= 5 >
  300. </router-link>
  301. </div>
  302. </li>
  303. <li>
  304. <div class="card">
  305. <img src="~examples/assets/images/component.png" alt="">
  306. <h3><%= 6 ></h3>
  307. <p><%= 7 ></p>
  308. <router-link
  309. active-class="active"
  310. to="/<%= lang >/component/layout"
  311. exact><%= 5 >
  312. </router-link>
  313. </div>
  314. </li>
  315. <li>
  316. <div class="card">
  317. <img src="~examples/assets/images/resource.png" alt="">
  318. <h3><%= 8 ></h3>
  319. <p><%= 9 ></p>
  320. <router-link
  321. active-class="active"
  322. to="/<%= lang >/resource"
  323. exact><%= 5 >
  324. </router-link>
  325. </div>
  326. </li>
  327. </ul>
  328. </div>
  329. </div>
  330. </template>
  331. <script>
  332. import { Hover } from 'perspective.js';
  333. export default {
  334. data() {
  335. return {
  336. lang: this.$route.meta.lang
  337. };
  338. },
  339. mounted() {
  340. new Hover('.jumbotron', { // eslint-disable-line
  341. max: 3,
  342. scale: 1,
  343. perspective: 700,
  344. layers: [{
  345. multiple: 0.01,
  346. reverseTranslate: true
  347. }, {
  348. multiple: 0.02,
  349. reverseTranslate: true
  350. }]
  351. });
  352. }
  353. };
  354. </script>