misc visual updates

pull/68/head
Leopoldthecoder 2016-09-13 20:02:33 +08:00
parent 3d229c4119
commit c02809c4af
15 changed files with 103 additions and 81 deletions

View File

@ -40,7 +40,7 @@
.container, .container,
.page-container { .page-container {
width: 960px; width: 1140px;
margin: 0 auto; margin: 0 auto;
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -19,7 +19,11 @@
transition: .2s; transition: .2s;
&.hover { &.hover {
box-shadow: 0 6px 18px 0 rgba(232, 237, 250, .5); box-shadow: 0 0 8px 0 rgba(232, 237, 250, .6), 0 2px 4px 0 rgba(232, 237, 250, .5);
}
code {
font-family: Menlo, Monaco, Consolas, Courier, monospace;
} }
.source { .source {
@ -27,7 +31,7 @@
} }
.meta { .meta {
background-color: #fbfcfd; background-color: #f9fafc;
border-top: solid 1px #eaeefb; border-top: solid 1px #eaeefb;
clear: both; clear: both;
overflow: hidden; overflow: hidden;
@ -42,7 +46,7 @@
border-left: solid 1px #eaeefb; border-left: solid 1px #eaeefb;
float: right; float: right;
font-size: 14px; font-size: 14px;
line-height: 1.5; line-height: 1.8;
color: #5e6d82; color: #5e6d82;
word-break: break-word; word-break: break-word;
@ -51,10 +55,10 @@
} }
code { code {
background-color: #f4faff; color: #5e6d82;
border: solid 1px #eaeefb; background-color: #e6effb;
margin: 0 4px; margin: 0 4px;
padding: 0 4px; padding: 4px 8px;
font-size: 12px; font-size: 12px;
} }
} }
@ -68,10 +72,11 @@
} }
code.hljs { code.hljs {
font-size: 12px;
padding: 18px 24px; padding: 18px 24px;
margin: 0; margin: 0;
line-height: 1.4; line-height: 1.8;
background-color: #fbfcfd; background-color: #f9fafc;
border: none; border: none;
max-height: none; max-height: none;
border-radius: 0; border-radius: 0;
@ -107,7 +112,7 @@
&:hover { &:hover {
color: #20a0ff; color: #20a0ff;
background-color: rgba(32, 159, 255, .05); background-color: #f9fafc;
} }
} }
} }

View File

@ -97,10 +97,10 @@
}, },
created() { created() {
navConfig[0].groups.map(group => group.list).forEach(list => { this.nav = navConfig[0].children;
navConfig[1].groups.map(group => group.list).forEach(list => {
this.nav = this.nav.concat(list); this.nav = this.nav.concat(list);
}); });
this.nav = this.nav.concat(navConfig[1].children);
this.updateNav(); this.updateNav();
} }
}; };

View File

@ -29,7 +29,7 @@
.footer { .footer {
height: 120px; height: 120px;
background-color: #324057; background-color: #324057;
color: #fff; color: #a4aebd;
width: 100%; width: 100%;
z-index: 1000; z-index: 1000;
margin-top: -120px; margin-top: -120px;
@ -58,10 +58,10 @@
margin: 12px 18px 0 0; margin: 12px 18px 0 0;
line-height: 1; line-height: 1;
font-size: 12px; font-size: 12px;
color: #8492a6; color: #768193;
a { a {
color: #8492a6; color: #768193;
text-decoration: none; text-decoration: none;
} }
} }
@ -99,13 +99,12 @@
display: inline-block; display: inline-block;
line-height: 32px; line-height: 32px;
text-align: center; text-align: center;
color: #324057; color: #8D99AB;
background-color: #fff; background-color: transparent;
size: 32px; size: 32px;
border-radius: 50%; font-size: 32px;
font-size: 22px; vertical-align: middle;
&:hover { &:hover {
color: #fff;
transform: scale(1.2); transform: scale(1.2);
} }
} }
@ -113,22 +112,14 @@
.doc-icon-weixin { .doc-icon-weixin {
margin-right: 36px; margin-right: 36px;
&:hover { &:hover {
background-color: #26CB72; color: #fff;
} }
} }
.doc-icon-github { .doc-icon-github {
margin-right: 0; margin-right: 0;
transform: translateY(8px);
position: relative;
&::before {
position: absolute;
left: 4px;
bottom: -6px;
}
&:hover { &:hover {
transform: translateY(8px) scale(1.2); color: #fff;
background-color: #437AC0;
} }
} }
} }

View File

@ -4,12 +4,11 @@
} }
.header { .header {
height: 80px; height: 80px;
background-color: #20a0ff; background-color: rgba(32, 160, 255, 1);
color: #fff; color: #fff;
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
z-index: 1000;
line-height: @height; line-height: @height;
z-index: 100; z-index: 100;
position: relative; position: relative;
@ -58,6 +57,7 @@
list-style: none; list-style: none;
position: relative; position: relative;
cursor: pointer; cursor: pointer;
margin-left: 20px;
a { a {
text-decoration: none; text-decoration: none;
@ -77,24 +77,28 @@
} }
} }
} }
/*.el-menu-item__bar {
background-color: #99d2fc;
}*/
} }
.header-fixed { .header-fixed {
position: fixed; position: fixed;
top: -80px; top: -80px;
box-shadow: 0px 2px 8px 0px rgba(50,63,87,0.45); box-shadow: 0 2px 6px 0 rgba(50, 63, 87, 0.25);
} }
.header-hangUp { .header-hangUp {
top: 0; top: 0;
} }
.header-home {
position: fixed;
top: 0;
background-color: rgba(32, 160, 255, 0);
}
</style> </style>
<template> <template>
<div class="headerWrapper"> <div class="headerWrapper">
<header class="header" <header class="header"
ref="header"
:style="headerStyle" :style="headerStyle"
:class="{ :class="{
'header-home': isHome,
'header-fixed': isFixed, 'header-fixed': isFixed,
'header-hangUp': hangUp 'header-hangUp': hangUp
}"> }">
@ -133,13 +137,19 @@
return { return {
active: '', active: '',
isFixed: false, isFixed: false,
isHome: false,
headerStyle: {}, headerStyle: {},
hangUp: false hangUp: false
}; };
}, },
watch: { watch: {
'$route.path'(val) {
this.isHome = val === '/';
this.headerStyle.backgroundColor = `rgba(32, 160, 255, ${ this.isHome ? '0' : '1' })`;
}
}, },
mounted() { mounted() {
this.isHome = this.$route.path === '/';
function scroll(fn) { function scroll(fn) {
var beforeScrollTop = document.body.scrollTop; var beforeScrollTop = document.body.scrollTop;
@ -154,6 +164,13 @@
}, false); }, false);
} }
scroll((direction) => { scroll((direction) => {
if (this.isHome) {
const threshold = 200;
let alpha = Math.min(document.body.scrollTop, threshold) / threshold;
this.$refs.header.style.backgroundColor = `rgba(32, 160, 255, ${ alpha })`;
return;
}
this.headerStyle.backgroundColor = 'rgba(32, 160, 255, 1)';
const bounding = this.$el.getBoundingClientRect(); const bounding = this.$el.getBoundingClientRect();
if (bounding.bottom < 0) { if (bounding.bottom < 0) {
this.isFixed = true; this.isFixed = true;

View File

@ -2,7 +2,6 @@
.side-nav { .side-nav {
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
border-right: 1px solid #eaeefa;
li { li {
list-style: none; list-style: none;
@ -15,12 +14,12 @@
.nav-item { .nav-item {
a { a {
font-size:18px; font-size: 16px;
color:#5e6d82; color: #5e6d82;
line-height: 42px; line-height: 40px;
height: 42px; height: 40px;
margin: 0; margin: 0;
padding: 0 0 0 12px; padding: 0;
text-decoration: none; text-decoration: none;
display: block; display: block;
position: relative; position: relative;
@ -28,26 +27,15 @@
&.active { &.active {
color: #20a0ff; color: #20a0ff;
&:after {
content: '';
width: 2px;
background-color: #20a0ff;
height: 32px;
border-radius: 2px;
left: 0;
position: absolute;
top: 5px;
}
} }
} }
.nav-item { .nav-item {
a { a {
display: block; display: block;
height: 42px; height: 40px;
line-height: 42px; line-height: 40px;
font-size: 14px; font-size: 13px;
padding-left: 22px; padding-left: 24px;
&:hover { &:hover {
@ -57,9 +45,11 @@
} }
} }
.nav-group__title { .nav-group__title {
font-size: 12px;
color: #99a9bf; color: #99a9bf;
padding-left: 15px; padding-left: 8px;
line-height: 34px; line-height: 26px;
margin-top: 10px;
} }
} }
</style> </style>

View File

@ -75,8 +75,8 @@ Dialog 弹出一个对话框,适合需要定制性更大的场景。
```html ```html
<el-button type="text" @click.native="dialogVisible = true">点击打开 Dialog</el-button> <el-button type="text" @click.native="dialogVisible = true">点击打开 Dialog</el-button>
<el-dialog title="提示" v-model="dialogVisible"> <el-dialog title="提示" v-model="dialogVisible" size="tiny">
<span>这是一段信息,这是一段信息,这是一段信息,这是一段信息,这是一段信息,这是一段信息,这是一段信息,这是一段信息</span> <span>这是一段信息</span>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click.native="dialogVisible = false">取 消</el-button> <el-button @click.native="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click.native="dialogVisible = false">确 定</el-button> <el-button type="primary" @click.native="dialogVisible = false">确 定</el-button>

View File

@ -2,7 +2,7 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1471936010_8874195.css"> <link rel="stylesheet" href="//at.alicdn.com/t/font_1473762766_7074292.css">
<title>Element</title> <title>Element</title>
</head> </head>
<body> <body>

View File

@ -1,4 +1,14 @@
[ [
{
"name": "安装指南",
"children": [{
"path": "/quickstart",
"name": "快速上手"
}, {
"path": "/development",
"name": "开发指南"
}]
},
{ {
"name": "基础组件", "name": "基础组件",
"groups": [{ "groups": [{
@ -242,15 +252,5 @@
} }
] ]
}] }]
},
{
"name": "安装指南",
"children": [{
"path": "/quickstart",
"name": "快速上手"
}, {
"path": "/development",
"name": "开发指南"
}]
} }
] ]

View File

@ -7,8 +7,6 @@
} }
.page-component { .page-component {
.content { .content {
padding-left: 25px;
border-left: 1px solid #eaeefa;
margin-left: -1px; margin-left: -1px;
> { > {

View File

@ -6,8 +6,8 @@
} }
} }
.banner { .banner {
position: relative;
height: 420px; height: 420px;
background-color: #20a0ff;
color: #fff; color: #fff;
margin-bottom: 130px; margin-bottom: 130px;
@ -18,9 +18,24 @@
img { img {
position: absolute; position: absolute;
top: 15px; top: 15px;
right: -105px; right: -10px;
} }
} }
.banner-sky {
position: absolute;
top: -150px;
bottom: -15px;
width: 100%;
margin-top: -140px;
transform: skewY(-5deg);
transform-origin: center;
background-image: linear-gradient(180deg, #0d1a44 13%, #3c4f91 56%, #5fc1e4 100%);
}
img.banner-stars {
top: -10px;
left: 50%;
transform: translateX(-50%);
}
.banner-desc { .banner-desc {
padding-top: 80px; padding-top: 80px;
font-size: 46px; font-size: 46px;
@ -34,7 +49,7 @@
} }
.cards { .cards {
margin: 0 auto 110px; margin: 0 auto 110px;
width: 960px; width: 1140px;
.container { .container {
@utils-clearfix; @utils-clearfix;
@ -45,7 +60,7 @@
li { li {
width: 33.33333%; width: 33.33333%;
padding: 0 11px; padding: 0 19px;
box-sizing: border-box; box-sizing: border-box;
float: left; float: left;
list-style: none; list-style: none;
@ -116,6 +131,8 @@
<template> <template>
<div> <div>
<div class="banner"> <div class="banner">
<div class="banner-sky"></div>
<img class="banner-stars" src="~examples/assets/images/stars.png" alt="Element">
<div class="container"> <div class="container">
<div class="banner-desc"> <div class="banner-desc">
<h2>Element</h2> <h2>Element</h2>

View File

@ -68,11 +68,11 @@
<div> <div>
<h2>导航</h2> <h2>导航</h2>
<div class="block"> <div class="block">
<p>导航可以解决用户在访问页面时在哪里去哪里怎样去的问题一般导航会有侧栏导航顶部导航2种类型</p> <p>导航可以解决用户在访问页面时在哪里去哪里怎样去的问题一般导航会有侧栏导航顶部导航2 种类型</p>
</div> </div>
<div class="block"> <div class="block">
<h3>选择合适的导航</h3> <h3>选择合适的导航</h3>
<p>选择合适的导航可以让用户在产品的使用过程中非常流畅,相反若是不合适就会引起用户操作不适(方向不明确)以下是侧栏导航 顶部导航的区别</p> <p>选择合适的导航可以让用户在产品的使用过程中非常流畅,相反若是不合适就会引起用户操作不适方向不明确以下是侧栏导航 顶部导航的区别</p>
</div> </div>
<div class="block"> <div class="block">
<h3>侧栏导航</h3> <h3>侧栏导航</h3>

View File

@ -47,7 +47,7 @@
color: #C0CCDA; color: #C0CCDA;
&:hover { &:hover {
color: var(--dialog-background-color); color: var(--color-primary);
} }
} }

View File

@ -36,6 +36,10 @@
cursor: pointer; cursor: pointer;
line-height: 20px; line-height: 20px;
text-align: center; text-align: center;
&:hover {
color: var(--color-primary);
}
} }
@e input { @e input {