docs: update site style

This commit is contained in:
chenjiahan 2020-09-02 21:09:57 +08:00
parent 1cd9183958
commit a4b175d2c6
5 changed files with 13 additions and 12 deletions

View File

@ -13,13 +13,13 @@
@van-doc-code-color: #58727e;
@van-doc-code-background-color: #f1f4f8;
@van-doc-code-font-family: 'Source Code Pro', 'Monaco', 'Inconsolata', monospace;
@van-doc-padding: 30px;
@van-doc-padding: 24px;
@van-doc-row-max-width: 1680px;
@van-doc-nav-width: 220px;
@van-doc-border-radius: 12px;
@van-doc-border-radius: 20px;
// header
@van-doc-header-top-height: 60px;
@van-doc-header-top-height: 64px;
@van-doc-header-bottom-height: 50px;
// simulator

View File

@ -203,7 +203,7 @@ export default {
}
section {
padding: 30px;
padding: 24px;
overflow: hidden;
}

View File

@ -38,7 +38,7 @@ export default {
data() {
return {
top: 60,
top: 64,
bottom: 0,
};
},
@ -64,7 +64,7 @@ export default {
methods: {
onScroll() {
const { pageYOffset: offset } = window;
this.top = Math.max(0, 60 - offset);
this.top = Math.max(0, 64 - offset);
},
},
};
@ -75,13 +75,11 @@ export default {
.van-doc-nav {
position: fixed;
top: 60px;
bottom: 0;
left: 0;
z-index: 1;
min-width: @van-doc-nav-width;
max-width: @van-doc-nav-width;
padding: 24px 0 72px;
padding: @van-doc-padding 0;
overflow-y: scroll;
background-color: #fff;
box-shadow: 0 8px 12px #ebedf0;
@ -108,6 +106,7 @@ export default {
&__group {
margin-bottom: 16px;
padding-left: 6px;
}
&__title {
@ -134,6 +133,8 @@ export default {
}
&.active {
background-color: fade(@van-doc-green, 8);
border-radius: 8px;
-webkit-font-smoothing: auto;
}

View File

@ -43,8 +43,8 @@ export default {
@import '../../common/style/var';
.van-doc-search {
width: 200px;
height: 60px;
width: 400px;
height: @van-doc-header-top-height;
margin-left: 140px;
color: #fff;
font-size: 14px;

View File

@ -57,7 +57,7 @@ export default {
overflow: hidden;
background: #fafafa;
border-radius: @van-doc-border-radius;
box-shadow: #ebedf0 0 4px 12px;
box-shadow: 0 8px 12px #ebedf0;
@media (max-width: 1100px) {
right: auto;