master
xaoxuu 4 years ago
parent 2d27460a83
commit a9dab6e3eb
  1. 84
      source/css/_highlight/index.styl
  2. 16
      source/css/_layout/article.styl
  3. 6
      source/css/_layout/main.styl

@ -45,7 +45,7 @@
margin-left: 0 margin-left: 0
position: sticky position: sticky
left: 0 left: 0
background-color: darken($color-codeblock, 5%) background-color: darken($color-codeblock, 5)
pre pre
color: $color-meta color: $color-meta
@ -70,21 +70,23 @@
padding: 4px 8px padding: 4px 8px
if hexo-config('style.body.highlight.language') == true if hexo-config('style.body.highlight.language') == true
&.md .code:before,&.markdown .code:before
content: "md"
&.yaml .code:before &.yaml .code:before
content: "YAML" content: "YAML"
&.md .code:before &.json .code:before
content: "md" content: "JSON"
&.html .code:before &.html .code:before
content: "HTML" content: "HTML"
&.js .code:before &.js .code:before,&.javascript .code:before
content: "JS" content: "JS"
&.css .code:before &.css .code:before
content: "css" content: "CSS"
&.less .code:before &.less .code:before
content: "less" content: "Less"
&.stylus .code:before &.stylus .code:before
content: "stylus" content: "Stylus"
&.bash .code:before &.bash .code:before
content: "bash" content: "bash"
@ -92,13 +94,15 @@
content: "shell" content: "shell"
&.sh .code:before &.sh .code:before
content: "sh" content: "sh"
&.ini .code:before
content: "ini"
&.c .code:before &.c .code:before
content: "C" content: "C"
&.cpp .code:before &.cpp .code:before
content: "C++" content: "C++"
&.objc .code:before &.objc .code:before,&.objectivec .code:before
content: "ObjC" content: "Objective-C"
&.swift .code:before &.swift .code:before
content: "Swift" content: "Swift"
@ -108,6 +112,18 @@
content: "Python" content: "Python"
&.php .code:before &.php .code:before
content: "PHP" content: "PHP"
&.rust .code:before
content: "Rust"
&.sql .code:before
content: "SQL"
&.ruby .code:before
content: "Ruby"
&.makefile .code:before
content: "Makefile"
&.go .code:before
content: "Go"
&.typescript .code:before
content: "TypeScript"
@ -121,41 +137,41 @@ $hl-red = #EE2B29
$hl-orange = #FB3F1B $hl-orange = #FB3F1B
$hl-amber = #FD8607 $hl-amber = #FD8607
pre .highlight pre
// //
// line-height: 1.5 // line-height: 1.5
.line .line,.params
color: alpha($color-text, 90%) color: alpha($color-text, .9)
.marked .marked
background-color: alpha(#FED542, 40%) background-color: alpha(#FED542, .4)
padding: 2px 8px 2px 0 padding: 2px 8px 2px 0
border-radius: 2px border-radius: 2px
width: 100% width: 100%
.title .title, .attr, .attribute
color: $color-md-indigo color: $color-md-indigo
// //
.comment .comment
color: alpha($color-p, .5) color: alpha($color-p, .5)
.keyword, .javascript .function, .attr .keyword, .meta-keyword, .javascript .function
color: $hl-keyword color: $hl-keyword
.type, .built_in, .tag .name .type, .built_in, .tag .name
color: $color-md-light-blue color: $color-md-light-blue
.variable, .attribute, .regexp, .ruby .constant, .xml .tag .title, .xml .pi, .xml .doctype, .html .doctype, .css .id, .css .class, .css .pseudo .variable, .regexp, .ruby .constant, .xml .tag .title, .xml .pi, .xml .doctype, .html .doctype, .css .id, .css .class, .css .pseudo
color: $hl-amber color: $hl-amber
.number, .preprocessor, .literal, .params, .constant .number, .preprocessor, .literal, .constant
color: $hl-amber color: $hl-amber
.class, .ruby .class .title, .css .rules .attribute .class, .ruby .class .title, .css .rules .attribute
color: $color-md-orange color: $color-md-orange
.string .string, .meta-string
color: darken($color-md-green, 10%) color: darken($color-md-green, 10%)
.value, .inheritance, .header, .ruby .symbol, .xml .cdata .value, .inheritance, .header, .ruby .symbol, .xml .cdata
@ -168,7 +184,33 @@ pre
color: #6699cc color: #6699cc
.highlight.html,.highlight.css,.highlight.less,.highlight.stylus
.html .line
.tag .name .tag .name, .selector-tag
color: $hl-red color: $hl-red
.selector-class, .selector-attr
color: $hl-amber
.attribute
color: $color-md-indigo
.number
color: $hl-cyan
.highlight.objc,.highlight.objectivec,.highlight.swift
.line
.meta
color: $hl-keyword
.meta-string,.string
color: $hl-orange
.class
.title
color: $hl-blue
.comment
color: $hl-green
.highlight.json
.line
.attr
color: $hl-orange
.literal
color: $color-md-indigo

@ -88,10 +88,18 @@
max-width: 100% max-width: 100%
margin: 0 margin: 0
box-shadow: none box-shadow: none
s s,del
opacity: 0.7 opacity: 0.7
u u
color: $color-hover color: $color-hover
kbd
border-radius: $border-codeblock * 0.5
border: 1px solid darken($color-codeblock, 6)
background: $color-codeblock
padding-left: 4px
padding-right: 4px
margin-left: 2px
margin-right: 2px
p p
margin-top: $gap-block margin-top: $gap-block
margin-bottom: $gap-block margin-bottom: $gap-block
@ -193,9 +201,11 @@
background: $color-codeblock background: $color-codeblock
font-size: $fontsize-code font-size: $fontsize-code
font-family: $fontfamily-code font-family: $fontfamily-code
border: 1px solid darken($color-codeblock, 10%) border: 1px solid darken($color-codeblock, 6)
padding: $gap padding: $gap
border-radius: $border-codeblock
>code
background: transparent
div>pre div>pre
border-radius: $border-codeblock border-radius: $border-codeblock
&>code &>code

@ -71,7 +71,7 @@
mobile-post() mobile-post()
.post .post
.meta div.meta
margin-bottom: $gap margin-bottom: $gap
.title .title
font-size: $fontsize-h3 font-size: $fontsize-h3
@ -81,7 +81,7 @@
.post-wrapper .post-wrapper
margin-bottom: $gap margin-bottom: $gap
.post .post
.meta div.meta
margin-bottom: $gap margin-bottom: $gap
.title .title
font-size: $fontsize-h2 font-size: $fontsize-h2
@ -126,7 +126,7 @@
h1 h1
font-weight: normal font-weight: normal
font-size: $fontsize-h1 font-size: $fontsize-h1
.meta div.meta
color: $color-meta color: $color-meta
&#header-meta &#header-meta
margin-top: 0 margin-top: 0

Loading…
Cancel
Save