Fixed cover page style

This commit is contained in:
qingwei.li 2016-12-23 00:24:24 +08:00
parent 4f5a150c17
commit c93ba1ea16
5 changed files with 21 additions and 11 deletions

View File

@ -1,3 +1,9 @@
## 1.3.1
### Bug fixes
- Fixed cover page style
- Generate the correct link when rendering the article
## 1.3.0
### Features
- Add cover page

View File

@ -1,6 +1,6 @@
![logo](_media/icon.svg)
# docsify <small>1.3.0</small>
# docsify <small>1.3.1</small>
> A magical documentation site generator.

View File

@ -6,7 +6,7 @@
<link rel="icon" href="favicon.ico">
<meta name="description" content="A magical documentation generator.">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<link rel="stylesheet" href="//cdn.jsdelivr.net/docsify/1.3.0/lib/themes/vue.css">
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css">
</head>
<body>
<nav>
@ -16,7 +16,7 @@
<div id="app"></div>
</body>
<script
src="//cdn.jsdelivr.net/docsify/1.3.0/lib/docsify.min.js"
src="//unpkg.com/docsify/lib/docsify.min.js"
data-max-level="4"
data-sidebar-toggle
data-coverpage

View File

@ -42,7 +42,7 @@ renderer.code = function (code, lang = '') {
}
renderer.link = function (href, title, text) {
if (OPTIONS.router && !/^(?:\w+:)?\/\/([^\s\.]+\.\S{2}|localhost[\:?\d]*)\S*$/.test(href)) {
href = !/^\/#/.test(href) ? `#${href}` : href
href = !/^\/#/.test(href) ? `#/${getRoute()}${href}` : href
}
return `<a href="${href}" title="${title || ''}">${text}</a>`

View File

@ -1,14 +1,14 @@
section.cover {
height: 100vh;
display: flex;
align-items: center;
&.hidden {
display: none;
}
height: 100vh;
position: relative;
.cover-main {
position: absolute 0 0 0 0;
padding: 20vh 0;
flex: 1;
text-align: center;
margin: 0 16px;
}
@ -22,6 +22,11 @@ section.cover {
}
}
p {
margin: 1em 0;
line-height: 1.5rem;
}
h1 {
text-align: center;
font-size: 2.5rem;
@ -50,8 +55,7 @@ section.cover {
line-height: 1.8;
}
p a {
margin-top: 1em;
.cover-main p:last-child a {
border-radius: 2em;
border: 1px solid $color-primary;
box-sizing: border-box;