resolve #5, 使用 hexo 编译网站

This commit is contained in:
Changkun Ou
2018-05-03 11:30:28 +02:00
parent 0247488f7a
commit 497516914d
52 changed files with 16839 additions and 3 deletions

View File

@@ -0,0 +1,12 @@
.rotating-clockwise
animation: 3s rotating-clockwise linear infinite
i.rotating-clockwise
display: inline-block
animation-duration: 2s
@keyframes rotating-clockwise
from
transform: rotate(0)
to
transform: rotate(360deg)

View File

@@ -0,0 +1,184 @@
@import "_settings"
@import "_syntax"
body
font-family: $body-font
font-size: $body-font-size
-webkit-font-smoothing: antialiased
-moz-osx-font-smoothing: grayscale
color: $medium
background-color: white
margin: 0
&.docs
padding-top: $header-height
@media screen and (max-width: 900px)
body.docs
padding-top: 0
a
text-decoration: none
color: $medium
img
border: none
h1, h2, h3, h4, strong
font-weight: 600
color: $dark
code, pre
font-family: $code-font
font-size: $code-font-size
background-color: $codebg
-webkit-font-smoothing: initial
-moz-osx-font-smoothing: initial
code
color: #e96900
padding: 3px 5px
margin: 0 2px
border-radius: 2px
white-space: nowrap
em
color: $light
p
word-spacing: 0.05em
a.button
padding: 0.75em 2em
border-radius: 2em
display: inline-block
color: #fff
background-color: lighten($theme, 8%)
transition: all .15s ease
box-sizing: border-box
border: 1px solid lighten($theme, 8%)
&.white
background-color: #fff
color: $theme
a.button:hover
background-color: $theme
color: #fff
.highlight
overflow-x: auto
background-color: $codebg
padding: .4em 0 0
line-height: 1.1em
border-radius: $radius
position: relative
table, tr, td
width: 100%
border-collapse: collapse
padding: 0
margin: 0
.gutter
width: 1.5em
.code
$code-line-height = 1.5em
pre
padding: 1.2em 1.4em
line-height: $code-line-height
margin: 0
.line
min-height: $code-line-height
&.html, &.js, &.bash, &.css
.code:before
position: absolute
top: 0
right: 0
color: #ccc
text-align: right
font-size: .75em
padding: 5px 10px 0
line-height: 15px
height: 15px
font-weight: 600
&.html .code:before
content: "HTML"
&.js .code:before
content: "JS"
&.bash .code:before
content: "Shell"
&.css .code:before
content: "CSS"
#main
position: relative
z-index: 1
padding: 0 60px 30px
overflow-x: hidden
#nav
.nav-link
color: #fff
// cursor: pointer
.nav-dropdown-container
.nav-link
&:hover:not(.current)
border-bottom: none
&:hover
.nav-dropdown
display: block
&.language, &.ecosystem
margin-left: 20px
.arrow
pointer-events: none
.nav-dropdown
display: none
box-sizing: border-box
max-height: "calc(100vh - %s)" % $header-height
overflow-y: auto
position: absolute
top: 100%
right: -15px
background-color: $theme
padding: 10px 0
border: 1px solid #fff
border-bottom-color: $theme
text-align: left
border-radius: 4px
white-space: nowrap
li
line-height: 1.8em
margin: 0
display: block
> ul
padding-left: 0
&:first-child
h4
margin-top: 0
padding-top: 0
border-top: 0
a, h4
padding: 0 24px 0 20px
h4
margin: .45em 0 0
padding-top: .45em
border-top: 1px solid #eee
a
color: #fff
font-size: .9em
display: block
&:hover
color: $yellow
.arrow
display: inline-block
vertical-align: middle
margin-top: -1px
margin-left: 6px
margin-right: -14px
width: 0
height: 0
border-left: 4px solid transparent
border-right: 4px solid transparent
border-top: 5px solid #fff
sup.beta.beta
font-size: .6em
margin-left: .7em
text-transform: uppercase
opacity: .6

View File

@@ -0,0 +1,144 @@
$header-height = 40px
#header
background-color: $theme
height: $header-height
padding: $heading-padding-vertical 60px
position: relative
z-index: 2
body.docs
#header
position: fixed
width: 100%
top: 0
left: 0
right: 0
bottom: 0
padding: 10px
#nav
position: fixed
#logo
margin-left: 20px
margin-right: 20px
#logo span
font-size: 1.2em
#logo img
margin-top: -6px
#mobile-bar::before
content: attr(data-bg-text)
text-align: center
color: #fff
display: block
line-height: 1
position: absolute
margin-top: 12px
font-size: 2em
width: 100%
#nav
list-style-type: none
margin: 0
padding: 0
position: absolute
right: 30px
top: $heading-padding-vertical
height: $header-height
line-height: $header-height
.break
display: none
li
display: inline-block
position: relative
margin: 0 .6em
margin-right: 30px
.nav-dropdown
.nav-link
&:hover, &.current
border-bottom: none
&.current
&::after
content: ""
width: 0
height: 0
border-left: 5px solid $theme
border-top: 3px solid transparent
border-bottom: 3px solid transparent
position: absolute
top: 50%
margin-top: -4px
left: 8px
.nav-link
padding-bottom: 3px
&:hover, &.current
border-bottom: 3px solid $theme
&.team
margin-left: 10px
.new-label
position: absolute
top: 3px
left: 110%
background-color: $theme
color: #fff
line-height: 16px
height: 16px
font-size: 9px
font-weight: bold
font-family: $code-font
padding: 1px 4px 0 6px
border-radius: 4px
#logo
display: inline-block
font-size: 1.5em
line-height: $header-height
color: #fff
font-family: $logo-font
font-weight: 500
img
vertical-align: middle
margin-right: 6px
height: $header-height
border-radius: 2px;
box-shadow: 0 20px 80px rgba(0, 0, 0, 0.4);
overflow:hidden;
#mobile-bar::before
content: attr(data-bg-text)
text-align: center
color: #fff
display: block
line-height: 1
position: absolute
margin-top: 12px
font-size: 2em
width: 100%
#mobile-bar
position: fixed
top: 0
left: 0
width: 100%
height: 50px
background-color: $theme;
z-index: 100
display: none
box-shadow: 0 0 2px rgba(0,0,0,.25)
.menu-button
position: absolute
width: 24px
height: 24px
top: 14px
left: 12px
background: url(../images/menu.png) center center no-repeat
background-size: 24px
.logo
position: absolute
width: 25px
height: 30px
background: url(../images/cover-2nd.png) center center no-repeat
background-size: auto 100%
top: 12px
right: 12px
margin-left: -15px

View File

@@ -0,0 +1,32 @@
// font faces
$body-font = "Source Sans Pro", "Helvetica Neue", Arial, sans-serif
$logo-font = "Dosis", "Source Sans Pro", "Helvetica Neue", Arial, sans-serif
$code-font = "Roboto Mono", Monaco, courier, monospace
// font sizes
$body-font-size = 15px
$code-font-size = .8em
// colors
$theme = #7e2d36
$orange = #ec9325
$dark = #2c3e50
$medium = #34495e
$light = #7f8c8d
$green = #42b983
$border = #dddddd
$codebg = #f8f8f8
$red = #ff6666
$info = #1C90F3
$yellow = yellow
$radius = 2px
$content-padding-top = 30px
$header-inner-height = 41px
$heading-padding-vertical = 10px
$header-height = $header-inner-height + $heading-padding-vertical * 2
$mobile-header-height = 40px
$heading-link-padding-top = $header-height + $content-padding-top
$mobile-heading-link-padding-top = $mobile-header-height + $content-padding-top
$h2-margin-top = 45px
$h3-margin-top = 52px

View File

@@ -0,0 +1,89 @@
@import "_settings"
.sidebar
position: fixed
z-index: 10
top: $header-height
left: 0
bottom: 0
overflow-x: hidden
overflow-y: auto
-webkit-overflow-scrolling: touch
-ms-overflow-style: none
h2
margin-top: .2em
ul
list-style-type: none
margin: 0
line-height: 1.5em
padding-left: 1em
li
margin-top: .5em
.sidebar-inner
width: 260px
padding: $content-padding-top + 10px 20px 60px 60px
.version-select
vertical-align: middle
margin-left: 5px
.menu-root
padding-left: 0
.menu-sub
font-size: .85em
.sidebar-link
color: $light
&.current
font-weight: 600
color: $theme
&.new
&:after
content: "NEW"
display: inline-block
font-size: 10px
font-weight: 600
color: #fff
background-color: $theme
line-height: 14px
padding: 0 4px
border-radius: 3px
margin-left: 5px
vertical-align: middle
position: relative
top: -1px
&:hover
border-bottom: 2px solid $theme
.section-link
&.active
font-weight: bold
color: $theme
.main-menu
margin-bottom: 20px
display: none
padding-left: 0
.nav-dropdown
h4
font-weight: normal
margin: 0
@media screen and (max-width: 900px)
.sidebar
position: fixed
z-index: 10
background-color: #f9f9f9
height: 100%
top: 0
left: 0
box-shadow: 0 0 10px rgba(0,0,0,.2)
transition: all .4s cubic-bezier(0.4, 0, 0, 1)
-webkit-transform: translate(-280px, 0)
transform: translate(-280px, 0)
.sidebar-inner
padding: 50px 10px 10px 20px
box-sizing: border-box
.sidebar-inner-index
padding: 80px 40px 10px 30px
box-sizing: border-box
.main-menu
display: block
&.open
-webkit-transform: translate(0, 0)
transform: translate(0, 0)

View File

@@ -0,0 +1,77 @@
.gutter pre
color: #999
pre
color: #525252
.function .keyword,
.constant
color: #0092db
.keyword,
.attribute
color: #e96900
.number,
.literal
color: #AE81FF
.tag,
.tag .title,
.change,
.winutils,
.flow,
.lisp .title,
.clojure .built_in,
.nginx .title,
.tex .special
color: #2973b7
.class .title
color: white
.symbol,
.symbol .string,
.value,
.regexp
color: $theme
.title
color: #A6E22E
.tag .value,
.string,
.subst,
.haskell .type,
.preprocessor,
.ruby .class .parent,
.built_in,
.sql .aggregate,
.django .template_tag,
.django .variable,
.smalltalk .class,
.javadoc,
.django .filter .argument,
.smalltalk .localvars,
.smalltalk .array,
.attr_selector,
.pseudo,
.addition,
.stream,
.envvar,
.apache .tag,
.apache .cbracket,
.tex .command,
.prompt
color: $theme
.comment,
.java .annotation,
.python .decorator,
.template_comment,
.pi,
.doctype,
.deletion,
.shebang,
.apache .sqbracket,
.tex .formula
color: #b3b3b3
.coffeescript .javascript,
.javascript .xml,
.tex .formula,
.xml .javascript,
.xml .vbscript,
.xml .css,
.xml .cdata
opacity: 0.5

View File

@@ -0,0 +1,156 @@
@import "_common"
@import "_header"
@import "_sidebar"
$width = 900px
body
background-color: #fff
#logo
span
font-size: 1.2em
img
display: none
.beta
font-size: 12px;
color: #F7BA2F;
font-family: Roboto, sans-serif;
font-weight: bold;
font-style: oblique;
.sidebar
display: none
#mobile-bar
&.top
background-color: $theme
box-shadow: none
.logo
display: none
#hero
padding: 100px 40px 40px 200px
background-color: #fff
.inner
max-width: $width
margin: 0 auto
.left, .right
display: inline-block
vertical-align: top
.left
width: 45%
.right
width: 55%
.hero-logo
width: 290px
float: right
margin-right: 60px
border-radius: 5px
box-shadow: 0 20px 80px rgba(0, 0, 0, 0.4)
h1
text-transform: uppercase
font-weight: 500
margin: 10px 0px
margin-top: 0px
font-size: 3.2em
h2
text-transform: uppercase
font-weight: 300
font-size: 2.4em
margin: 0 0 10px
h4
font-style: oblique
font-weight: 200
margin-bottom: 0px
font-size: 2em
.button
margin: 1em 0
font-size: 1.05em
font-weight: 600
letter-spacing: .1em
min-width: 8em
text-align: center
&:first-child
margin-right: 1em
.social-buttons
list-style-type: none
padding: 0
li
display: inline-block
vertical-align: middle
margin-right: 15px
#highlights
background-color: #fff
padding-bottom: 70px
.inner
max-width: $width
margin: 0 auto
text-align: center
.point
width: 33%
display: inline-block
vertical-align: top
box-sizing: border-box
padding: 0 2em
h2
color: $theme
font-size: 1.5em
font-weight: 400
margin: 0
padding: .5em 0
p
color: $light
#footer
background-color: #1e2318
bottom: 0
padding: 10px 0
position: fixed
width: 100%
color: #fff
text-align: center
a
font-weight: 700
color: #fff
@media screen and (max-width: $width)
body
-webkit-text-size-adjust: none
font-size: 14px
.sidebar
display: block
#header
display: none
#mobile-bar
display: block
#hero
padding: 70px 40px 100px
.hero-logo
float: none
margin: 30px 0 30px
width: 200px
.left, .right
text-align: center
width: 100%
h1
text-transform: capitalize
font-size: 2.0em
display: block
h2
font-size: 1.0em
.button
font-size: .9em
h4
font-size: 0.9em
#highlights
.point
display: block
margin: 0 auto
width: 300px
padding: 0 40px 30px
&:before
content: ""
color: $theme

View File

@@ -0,0 +1,239 @@
@import "_common"
@import "_animations"
@import "_header"
@import "_sidebar"
#header
box-shadow: 0 0 1px rgba(0,0,0,.25)
transition: background-color .3s ease-in-out
.beta
font-size: 12px;
color: #F7BA2F;
font-family: Roboto, sans-serif;
font-weight: bold;
font-style: oblique;
.content
position: relative
padding: 2.2em 0
max-width: 600px
margin: 0 auto
padding-left: 50px
&.api
> a:first-of-type > h2
margin-top: 0
padding-top: 0
ul
padding-left: 1.25em
line-height: 1.4em
ul, p:not(.tip)
padding-bottom: 0
margin: 1.2em 0
a.button
font-size: .9em
color: #fff
margin: .2em 0
width: 180px
text-align: center
padding: 12px 24px
display: inline-block
vertical-align: middle
img
max-width: 100%
span.light
color: $light
span.info
font-size: .85em
display: inline-block
vertical-align: middle
width: 280px
margin-left: 20px
h1
margin: 0 0 1em
h2, h3
&:before
content: ""
display: block
margin-top: -1 * $heading-link-padding-top
height: $heading-link-padding-top
visibility: hidden
h2
margin: $h2-margin-top 0 .8em
padding-bottom: .7em
border-bottom: 1px solid $border
z-index: -1
h3
margin: $h3-margin-top 0 1.2em
position: relative
z-index: -1
&:after
content: "#"
color: $theme
position: absolute
left: -0.7em
bottom: -2px
font-size: 1.2em
font-weight: bold
figure
margin: 1.2em 0
p, ul, ol
line-height: 1.6em
// HACK: Create area underneath paragraphs
// and lists that will be on top of heading
// anchors, for easier text highlighting.
margin: 1.2em 0 -1.2em
padding-bottom: 1.2em
position: relative
z-index: 1
ul, ol
padding-left: 1.5em
// FIX: Some link click targets are covered without this
position: inherit
a
color: $theme
font-weight: 600
blockquote
margin: 2em 0
padding-left: 20px
border-left: 4px solid $theme
p
font-weight: 600
margin-left: 0
margin-bottom: 0
padding-bottom: 0
iframe
margin: 1em 0
> table
border-spacing: 0
border-collapse: collapse
margin: 1.2em auto
padding: 0
display: block
overflow-x: auto
td, th
line-height: 1.5em
padding: .4em .8em
border: none
border: 1px solid #ddd
th
font-weight: bold
text-align: left
th, tr:nth-child(2n)
background-color: #f8f8f8
code
background-color: #efefef
p
&.tip, &.success
padding: 12px 24px 12px 30px
margin: 2em 0
border-left-width: 4px
border-left-style: solid
background-color: $codebg
position: relative
border-bottom-right-radius: $radius
border-top-right-radius: $radius
&:before
position: absolute
top: 14px
left: -12px
color: #fff
width: 20px
height: 20px
border-radius: 100%
text-align: center
line-height: 20px
font-weight: bold
font-family: $logo-font
font-size: 14px
code
background-color: #efefef
em
color: $medium
&.tip
border-left-color: $red
&:before
content: "!"
background-color: $red
&.success
border-left-color: $theme
&:before
content: "\f00c"
font-family: FontAwesome
background-color: $theme
.guide-links
margin-top: 2em
margin-bottom: 2em
height: 1em
.footer
color: $light
margin-top: 2em
padding-top: 2em
border-top: 1px solid #e5e5e5
font-size: .9em
#main.fix-sidebar
position: static
.sidebar
position: fixed
@media screen and (min-width: 1590px)
#header
background-color: $theme
@media screen and (max-width: 1300px)
.content.with-sidebar
margin-left: 290px
#ad
z-index: 1
position: relative
padding: 0
bottom: 0
right: 0
float: right
padding: 0 0 20px 30px
@media screen and (max-width: 900px)
body
-webkit-text-size-adjust: none
font-size: 14px
#header
display: none
#logo
display: none
.nav-link
padding-bottom: 1px
&:hover, &.current
border-bottom: 2px solid $theme
#mobile-bar
display: block
#main
padding: 2em 1.4em 0
.highlight pre
padding: 1.2em 1em
.content
padding-left 0
&.with-sidebar
margin: auto
h2, h3
&:before
content: ""
display: block
margin-top: -1 * $mobile-heading-link-padding-top
height: $mobile-heading-link-padding-top
visibility: hidden
.footer
margin-left: 0
text-align: center
@media screen and (max-width: 560px)
#downloads
text-align: center
margin-bottom: 25px
.info
margin-top: 5px
margin-left: 0
iframe
margin: 0 !important