element/examples/pages/template/index.tpl

356 lines
7.1 KiB
Smarty
Raw Normal View History

2016-11-09 11:15:25 +00:00
<style scoped>
2017-10-23 09:50:25 +00:00
.banner {
text-align: center;
}
.banner-desc {
padding-top: 20px;
2016-11-09 11:15:25 +00:00
2017-10-23 09:50:25 +00:00
h1 {
font-size: <%= titleSize >px;
margin: 0;
line-height: 48px;
color: #555;
}
p {
font-size: <%= paraSize >px;
line-height: 28px;
color: #888;
2017-10-27 03:30:04 +00:00
margin: 10px 0 5px;
2016-11-09 11:15:25 +00:00
}
}
2017-12-18 09:38:51 +00:00
.sponsor {
margin: 0 auto 50px;
display: flex;
width: 400px;
height: 100px;
justify-content: center;
img {
margin-right: 20px;
}
div {
display: flex;
flex-direction: column;
justify-content: center;
}
p {
margin: 0;
line-height: 1.8;
color: #999;
font-size: 14px;
}
}
2017-10-23 09:50:25 +00:00
.jumbotron {
width: 890px;
height: 465px;
2017-12-18 09:38:51 +00:00
margin: 30px auto;
2016-11-09 11:15:25 +00:00
position: relative;
2017-10-23 09:50:25 +00:00
div {
width: 100%;
height: 100%;
background-color: transparent;
position: absolute;
top: 0;
left: 0;
2016-11-09 11:15:25 +00:00
}
2017-10-23 09:50:25 +00:00
2016-11-09 11:15:25 +00:00
img {
position: absolute;
}
2017-10-23 09:50:25 +00:00
.jumbotron-cloud-1 {
right: 0;
top: 0;
height: 55px;
}
2016-11-09 11:15:25 +00:00
2017-10-23 09:50:25 +00:00
.jumbotron-plant-2 {
left: 60px;
top: 200px;
}
.jumbotron-web {
height: 385px;
top: 35px;
left: 110px;
}
.jumbotron-cloud-2 {
left: 0;
top: 50px;
height: 55px;
}
.jumbotron-compo-1 {
left: 94px;
height: 90px;
top: 220px;
2016-11-09 11:15:25 +00:00
}
2016-11-18 11:43:07 +00:00
2017-10-23 09:50:25 +00:00
.jumbotron-compo-2 {
right: 73px;
top: 60px;
height: 124px;
}
.jumbotron-compo-3 {
right: 42px;
top: 200px;
height: 120px;
}
.jumbotron-plant-1 {
bottom: 0;
left: 30px;
height: 185px;
}
.jumbotron-figure-1 {
bottom: 0;
right: 180px;
height: 140px;
}
.jumbotron-figure-2 {
bottom: 0;
right: 10px;
height: 68px;
2016-11-09 11:15:25 +00:00
}
}
.cards {
margin: 0 auto 110px;
width: 1140px;
.container {
@utils-clearfix;
padding: 0;
margin: 0 -11px;
width: auto;
}
li {
width: 33.33333%;
padding: 0 19px;
box-sizing: border-box;
float: left;
list-style: none;
}
img {
width: 160px;
height: 120px;
}
}
.card {
height: 430px;
width: 100%;
background:#ffffff;
border:1px solid #eaeefb;
border-radius:5px;
box-sizing: border-box;
text-align: center;
position: relative;
transition: all .3s ease-in-out;
bottom: 0;
img {
margin: 66px auto 60px;
}
h3 {
margin: 0;
font-size: 18px;
color: #1f2f3d;
font-weight: normal;
}
p {
font-size: 14px;
color: #99a9bf;
padding: 0 25px;
2017-10-23 09:50:25 +00:00
line-height: 20px;
2016-11-09 11:15:25 +00:00
}
a {
height: 53px;
line-height: 52px;
font-size: 14px;
color: #409EFF;
2016-11-09 11:15:25 +00:00
text-align: center;
border: 0;
border-top: 1px solid #eaeefb;
padding: 0;
cursor: pointer;
width: 100%;
position: absolute;
bottom: 0;
left: 0;
background-color: #fff;
border-radius: 0 0 5px 5px;
transition: all .3s;
text-decoration: none;
display: block;
&:hover {
color: #fff;
background: #409EFF;
2016-11-09 11:15:25 +00:00
}
}
&:hover {
bottom: 6px;
2017-10-23 09:50:25 +00:00
box-shadow: 0 6px 18px 0 rgba(232,237,250,0.50);
2016-11-09 11:15:25 +00:00
}
}
@media (max-width: 1140px) {
.cards {
width: 100%;
2016-11-18 08:49:07 +00:00
.container {
width: 100%;
2017-12-18 09:38:51 +00:00
margin: 0;
2016-11-18 08:49:07 +00:00
}
}
.banner .container {
width: 100%;
box-sizing: border-box;
}
.banner img {
right: 0;
}
}
@media (max-width: 1000px) {
.banner .container {
img {
display: none;
}
}
2017-10-23 09:50:25 +00:00
.jumbotron {
display: none;
}
2016-11-18 08:49:07 +00:00
}
@media (max-width: 768px) {
.cards {
li {
width: 80%;
margin: 0 auto 20px;
float: none;
}
.card {
height: auto;
padding-bottom: 54px;
}
}
2016-11-18 11:43:07 +00:00
.banner-stars {
display: none;
}
2016-11-18 08:49:07 +00:00
.banner-desc {
#line2 {
display: none;
}
h2 {
font-size: 32px;
}
p {
width: auto;
}
2016-11-09 11:15:25 +00:00
}
}
</style>
<template>
<div>
<div class="banner">
2017-10-23 09:50:25 +00:00
<div class="banner-desc">
<h1><%= 1 ></h1>
<p><%= 2 ></p>
</div>
</div>
<div class="jumbotron">
<div>
<img class="jumbotron-plant-2" src="~examples/assets/images/plant-2.png" alt="">
<img class="jumbotron-web" src="~examples/assets/images/web.png" alt="">
2017-10-26 03:15:41 +00:00
<img class="jumbotron-plant-1" src="~examples/assets/images/plant-1.png" alt="">
<img class="jumbotron-figure-1" src="~examples/assets/images/figure-1.png" alt="">
<img class="jumbotron-figure-2" src="~examples/assets/images/figure-2.png" alt="">
2017-10-23 09:50:25 +00:00
</div>
<div data-hover-layer="0">
<img class="jumbotron-cloud-1" src="~examples/assets/images/cloud-1.png" alt="">
<img class="jumbotron-cloud-2" src="~examples/assets/images/cloud-2.png" alt="">
</div>
<div data-hover-layer="1">
<img class="jumbotron-compo-1" src="~examples/assets/images/compo-1.png" alt="">
<img class="jumbotron-compo-2" src="~examples/assets/images/compo-2.png" alt="">
<img class="jumbotron-compo-3" src="~examples/assets/images/compo-3.png" alt="">
</div>
2016-11-09 11:15:25 +00:00
</div>
2017-12-18 09:38:51 +00:00
<a class="sponsor" href="https://tipe.io/?ref=element" target="_blank">
<img width="35px" src="~examples/assets/images/tipe.svg" alt="tipe.io">
<div>
<p>Sponsored by Tipe.io</p>
<p>Next Generation Headless CMS</p>
</div>
</a>
2016-11-09 11:15:25 +00:00
<div class="cards">
<ul class="container">
<li>
<div class="card">
<img src="~examples/assets/images/guide.png" alt="">
<h3><%= 3 ></h3>
<p><%= 4 ></p>
2016-11-09 11:15:25 +00:00
<router-link
active-class="active"
2016-11-16 11:16:34 +00:00
to="/<%= lang >/guide/design"
exact><%= 5 >
2016-11-09 11:15:25 +00:00
</router-link>
</div>
</li>
<li>
<div class="card">
<img src="~examples/assets/images/component.png" alt="">
<h3><%= 6 ></h3>
<p><%= 7 ></p>
2016-11-09 11:15:25 +00:00
<router-link
active-class="active"
2016-11-16 11:16:34 +00:00
to="/<%= lang >/component/layout"
exact><%= 5 >
2016-11-09 11:15:25 +00:00
</router-link>
</div>
</li>
<li>
<div class="card">
<img src="~examples/assets/images/resource.png" alt="">
<h3><%= 8 ></h3>
<p><%= 9 ></p>
2016-11-09 11:15:25 +00:00
<router-link
2016-11-18 11:43:07 +00:00
active-class="active"
2016-11-16 11:16:34 +00:00
to="/<%= lang >/resource"
exact><%= 5 >
2016-11-09 11:15:25 +00:00
</router-link>
</div>
</li>
</ul>
</div>
</div>
</template>
<script>
2017-10-23 09:50:25 +00:00
import { Hover } from 'perspective.js';
2016-11-09 11:15:25 +00:00
export default {
mounted() {
2017-10-23 09:50:25 +00:00
new Hover('.jumbotron', { // eslint-disable-line
2017-10-26 03:15:41 +00:00
max: 3,
2017-10-23 09:50:25 +00:00
scale: 1,
perspective: 700,
layers: [{
multiple: 0.01,
reverseTranslate: true
}, {
2017-10-26 03:15:41 +00:00
multiple: 0.02,
2017-10-23 09:50:25 +00:00
reverseTranslate: true
}]
});
2016-11-09 11:15:25 +00:00
}
};
</script>