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
|
|
|
}
|
|
|
|
}
|
2018-01-31 06:21:30 +00:00
|
|
|
.sponsors {
|
2017-12-18 09:38:51 +00:00
|
|
|
display: flex;
|
2018-01-31 06:21:30 +00:00
|
|
|
justify-content: center;
|
|
|
|
}
|
|
|
|
.sponsor {
|
|
|
|
margin: 0 20px 50px;
|
|
|
|
display: inline-flex;
|
|
|
|
width: 300px;
|
2017-12-18 09:38:51 +00:00
|
|
|
height: 100px;
|
|
|
|
justify-content: center;
|
|
|
|
|
|
|
|
img {
|
|
|
|
margin-right: 20px;
|
|
|
|
}
|
2017-12-18 19:52:44 +00:00
|
|
|
|
2017-12-18 09:38:51 +00:00
|
|
|
div {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
justify-content: center;
|
|
|
|
}
|
2017-12-18 19:52:44 +00:00
|
|
|
|
2017-12-18 09:38:51 +00:00
|
|
|
p {
|
|
|
|
margin: 0;
|
|
|
|
line-height: 1.8;
|
|
|
|
color: #999;
|
|
|
|
font-size: 14px;
|
|
|
|
}
|
|
|
|
}
|
2017-10-23 09:50:25 +00:00
|
|
|
.jumbotron {
|
|
|
|
width: 890px;
|
2017-12-18 09:38:51 +00:00
|
|
|
margin: 30px auto;
|
2016-11-09 11:15:25 +00:00
|
|
|
position: relative;
|
2019-06-03 08:04:56 +00:00
|
|
|
img {
|
2017-10-23 09:50:25 +00:00
|
|
|
width: 100%;
|
2016-11-09 11:15:25 +00:00
|
|
|
}
|
2019-06-03 08:04:56 +00:00
|
|
|
.jumbotron-red {
|
|
|
|
transition: height .1s;
|
|
|
|
background: #FFF;
|
2016-11-09 11:15:25 +00:00
|
|
|
position: absolute;
|
2017-10-23 09:50:25 +00:00
|
|
|
left: 0;
|
2019-06-03 08:04:56 +00:00
|
|
|
top:0;
|
|
|
|
overflow: hidden;
|
2016-11-09 11:15:25 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
.cards {
|
|
|
|
margin: 0 auto 110px;
|
|
|
|
width: 1140px;
|
|
|
|
|
|
|
|
.container {
|
|
|
|
padding: 0;
|
|
|
|
margin: 0 -11px;
|
|
|
|
width: auto;
|
2019-03-01 10:35:08 +00:00
|
|
|
&::before, &::after {
|
|
|
|
display: table;
|
|
|
|
content: "";
|
|
|
|
}
|
|
|
|
&::after {
|
|
|
|
clear: both;
|
|
|
|
}
|
2016-11-09 11:15:25 +00:00
|
|
|
}
|
|
|
|
|
2019-03-01 10:35:08 +00:00
|
|
|
|
2016-11-09 11:15:25 +00:00
|
|
|
li {
|
2019-06-03 08:04:56 +00:00
|
|
|
width: 25%;
|
2016-11-09 11:15:25 +00:00
|
|
|
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;
|
2017-10-01 12:16:16 +00:00
|
|
|
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;
|
2017-10-01 12:16:16 +00:00
|
|
|
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
|
|
|
}
|
|
|
|
}
|
2019-06-03 08:04:56 +00:00
|
|
|
.theme-intro-b {
|
|
|
|
position: fixed;
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
top: 0;
|
|
|
|
bottom: 0;
|
|
|
|
z-index: 200;
|
|
|
|
.intro-banner {
|
|
|
|
position: absolute
|
|
|
|
}
|
|
|
|
img {
|
|
|
|
width: 300px;
|
|
|
|
}
|
|
|
|
.title {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
color: #FFF;
|
|
|
|
text-align: center;
|
|
|
|
font-weight: bold;
|
2019-06-27 04:31:28 +00:00
|
|
|
font-size: 20px;
|
2019-06-03 08:04:56 +00:00
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
p {
|
|
|
|
padding: 0;
|
|
|
|
margin: 10px 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.theme-intro-a {
|
|
|
|
position: fixed;
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
top: 0;
|
|
|
|
bottom: 0;
|
|
|
|
z-index: 200;
|
|
|
|
.mask{
|
|
|
|
position: fixed;
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
top: 0;
|
|
|
|
bottom: 0;
|
|
|
|
background: #000;
|
|
|
|
opacity: .5;
|
|
|
|
}
|
|
|
|
.intro-banner {
|
|
|
|
top: 50%;
|
|
|
|
left: 50%;
|
|
|
|
position: fixed;
|
|
|
|
-webkit-transform: translate(-50%, -50%);
|
|
|
|
transform: translate(-50%, -50%);
|
|
|
|
box-sizing: border-box;
|
|
|
|
text-align: center;
|
|
|
|
z-index: 100;
|
|
|
|
img {
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
.intro-text {
|
|
|
|
position: absolute;
|
|
|
|
top: 50%;
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
p {
|
|
|
|
padding: 0;
|
|
|
|
margin: 0;
|
|
|
|
font-size: 48px;
|
|
|
|
font-weight: bold;
|
|
|
|
color: #FFF;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
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>
|
2019-06-03 08:04:56 +00:00
|
|
|
<div class="jumbotron" ref="indexMainImg">
|
|
|
|
<img src="~examples/assets/images/theme-index-blue.png" alt="">
|
|
|
|
<div class="jumbotron-red" :style="{
|
|
|
|
height: mainImgOffset + 'px'
|
|
|
|
}">
|
|
|
|
<img src="~examples/assets/images/theme-index-red.png" alt="">
|
2017-10-23 09:50:25 +00:00
|
|
|
</div>
|
2016-11-09 11:15:25 +00:00
|
|
|
</div>
|
2018-01-31 06:21:30 +00:00
|
|
|
<div class="sponsors">
|
2018-02-09 04:14:35 +00:00
|
|
|
<a class="sponsor" href="https://tipe.io/?ref=element" target="_blank" v-show="lang !== 'zh-CN'">
|
2018-01-31 06:21:30 +00:00
|
|
|
<img width="35px" src="~examples/assets/images/tipe.svg" alt="tipe.io">
|
|
|
|
<div>
|
|
|
|
<p>Sponsored by Tipe.io</p>
|
|
|
|
<p>Next Generation API-first CMS</p>
|
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
<a class="sponsor" href="https://www.duohui.cn/?utm_source=element&utm_medium=web&utm_campaign=element-index" target="_blank">
|
2018-04-29 04:01:08 +00:00
|
|
|
<img width="45px" src="~examples/assets/images/duohui.svg" alt="duohui">
|
2018-01-31 06:21:30 +00:00
|
|
|
<div>
|
|
|
|
<p>Sponsored by 多会</p>
|
|
|
|
<p>炫酷的新一代活动票务系统</p>
|
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
</div>
|
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="">
|
2016-11-10 13:46:55 +00:00
|
|
|
<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"
|
2016-11-10 13:46:55 +00:00
|
|
|
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="">
|
2016-11-10 13:46:55 +00:00
|
|
|
<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"
|
2016-11-10 13:46:55 +00:00
|
|
|
exact><%= 5 >
|
2016-11-09 11:15:25 +00:00
|
|
|
</router-link>
|
|
|
|
</div>
|
|
|
|
</li>
|
2019-06-03 08:04:56 +00:00
|
|
|
<li>
|
|
|
|
<div class="card">
|
|
|
|
<img src="~examples/assets/images/theme-index-icon.svg" alt="">
|
|
|
|
<h3><%= 10 ></h3>
|
|
|
|
<p><%= 11 ></p>
|
|
|
|
<router-link
|
|
|
|
active-class="active"
|
|
|
|
to="/<%= lang >/theme"
|
|
|
|
exact><%= 5 >
|
|
|
|
</router-link>
|
|
|
|
</div>
|
|
|
|
</li>
|
2016-11-09 11:15:25 +00:00
|
|
|
<li>
|
|
|
|
<div class="card">
|
|
|
|
<img src="~examples/assets/images/resource.png" alt="">
|
2016-11-10 13:46:55 +00:00
|
|
|
<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"
|
2016-11-10 13:46:55 +00:00
|
|
|
exact><%= 5 >
|
2016-11-09 11:15:25 +00:00
|
|
|
</router-link>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
2019-06-03 08:04:56 +00:00
|
|
|
<div class="theme-intro-a" v-if="showIntroA" @click="hideIntroA">
|
|
|
|
<div class="intro-banner">
|
|
|
|
<img src="~examples/assets/images/theme-intro.png" alt="">
|
|
|
|
<div class="intro-text">
|
|
|
|
<p><%= 12 ></p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="mask"></div>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
class="theme-intro-b"
|
|
|
|
@click="hideIntroB"
|
|
|
|
v-if="showIntroB"
|
|
|
|
>
|
|
|
|
<div class="intro-banner"
|
|
|
|
:style="{
|
|
|
|
left: introBX + 'px',
|
|
|
|
top: introBY + 'px'
|
|
|
|
}"
|
|
|
|
>
|
|
|
|
<img src="~examples/assets/images/intro-theme-b.png" alt="">
|
|
|
|
<div class="title">
|
|
|
|
<div>
|
|
|
|
<p><%= 13 ></p>
|
|
|
|
<p><%= 14 ></p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2016-11-09 11:15:25 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<script>
|
2019-06-03 08:04:56 +00:00
|
|
|
import throttle from 'throttle-debounce/throttle';
|
|
|
|
import { addClass, removeClass } from 'element-ui/src/utils/dom';
|
|
|
|
|
2016-11-09 11:15:25 +00:00
|
|
|
export default {
|
2019-06-03 08:04:56 +00:00
|
|
|
created() {
|
|
|
|
this.throttledHandleScroll = throttle(10, true, index => {
|
|
|
|
this.handleScroll(index);
|
|
|
|
});
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
handleScroll(index) {
|
|
|
|
const ele = this.$refs.indexMainImg;
|
|
|
|
const rect = ele.getBoundingClientRect();
|
|
|
|
const eleHeight = ele.clientHeight + 55;
|
|
|
|
let calHeight = (180 - rect.top) * 2;
|
|
|
|
if (calHeight < 0) calHeight = 0;
|
|
|
|
if (calHeight > eleHeight) calHeight = eleHeight;
|
|
|
|
this.mainImgOffset = calHeight;
|
|
|
|
},
|
|
|
|
hideIntroB() {
|
|
|
|
removeClass(document.body, 'el-loading-parent--hidden');
|
|
|
|
localStorage.setItem('KNOW_THEME', 'true');
|
|
|
|
this.showIntroB = false;
|
|
|
|
},
|
|
|
|
hideIntroA() {
|
2019-06-27 04:31:28 +00:00
|
|
|
const themeTab = document.querySelector('.nav-item-theme');
|
|
|
|
this.introBX = themeTab.offsetLeft + (themeTab.clientWidth * 0.5) - (300 / 2);
|
|
|
|
this.introBY = themeTab.offsetTop + 40;
|
2019-06-03 08:04:56 +00:00
|
|
|
this.showIntroA = false;
|
|
|
|
this.showIntroB = true;
|
|
|
|
}
|
|
|
|
},
|
2018-02-09 04:14:35 +00:00
|
|
|
data() {
|
|
|
|
return {
|
2019-06-03 08:04:56 +00:00
|
|
|
lang: this.$route.meta.lang,
|
|
|
|
mainImgOffset: 0,
|
|
|
|
showIntroA: false,
|
|
|
|
showIntroB: false,
|
|
|
|
introBY: 0,
|
|
|
|
introBX: 0
|
2018-02-09 04:14:35 +00:00
|
|
|
};
|
|
|
|
},
|
2019-06-03 08:04:56 +00:00
|
|
|
beforeDestroy() {
|
|
|
|
window.removeEventListener('scroll', this.throttledHandleScroll);
|
|
|
|
},
|
2016-11-09 11:15:25 +00:00
|
|
|
mounted() {
|
2019-06-03 08:04:56 +00:00
|
|
|
window.addEventListener('scroll', this.throttledHandleScroll);
|
|
|
|
if (localStorage.getItem('KNOW_THEME')) return;
|
|
|
|
this.showIntroA = true;
|
|
|
|
addClass(document.body, 'el-loading-parent--hidden');
|
2016-11-09 11:15:25 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|