master
xaoxuu 4 years ago
parent 2845fe6a66
commit 6f094643e3
  1. 4
      _config.yml
  2. 2
      layout/_partial/scripts.ejs
  3. 2
      source/css/_base/index.styl
  4. 4
      source/css/_defines/layout.styl
  5. 64
      source/css/_highlight/index.styl
  6. 42
      source/css/_layout/article.styl
  7. 14
      source/css/_layout/main.styl
  8. 4
      source/css/_layout/sidebar.styl
  9. 12
      source/css/_tag-plugins/folding.styl
  10. 2
      source/css/_tag-plugins/media.styl
  11. 10
      source/css/_tag-plugins/note.styl
  12. 10
      source/css/_tag-plugins/tabs.styl
  13. 4
      source/css/_third-party/clipboard.styl
  14. 2
      source/css/_third-party/fancybox.styl

@ -41,8 +41,8 @@ style:
h2: 48px # Spacing above H2 (only px unit) h2: 48px # Spacing above H2 (only px unit)
h3: 32px # Spacing above H3 (only px unit) h3: 32px # Spacing above H3 (only px unit)
h4: 16px # Spacing above H4 (only px unit) h4: 16px # Spacing above H4 (only px unit)
block: 1rem # Paragraph spacing between blocks paragraph: 1.5rem # Paragraph spacing between paragraphs
p: .5rem # Paragraph spacing within a block row: .5rem # Paragraph spacing between other elements
border_radius: border_radius:
card: 8px card: 8px
codeblock: 4px codeblock: 4px

@ -228,7 +228,7 @@
<!-- 复制 --> <!-- 复制 -->
<% if (theme.plugins.clipboard && theme.style.body.highlight.copy_btn) { %> <% if (theme.plugins.clipboard && (theme.style.body.highlight.copy_btn == true)) { %>
<%- partial('_third-party/clipboard') %> <%- partial('_third-party/clipboard') %>
<% } %> <% } %>

@ -250,7 +250,7 @@ table
display: inline-block display: inline-block
max-width: 100% max-width: 100%
scrollbar() scrollbar()
margin-right: $gap-p margin-right: $gap-row
vertical-align: text-top; vertical-align: text-top;
th th
background-color: darken($color-block, 2) background-color: darken($color-block, 2)

@ -21,8 +21,8 @@ $gap = convert(hexo-config('style.gap.base')) || 16px
$gap-h2 = convert(hexo-config('style.gap.h2')) || 48px $gap-h2 = convert(hexo-config('style.gap.h2')) || 48px
$gap-h3 = convert(hexo-config('style.gap.h3')) || 32px $gap-h3 = convert(hexo-config('style.gap.h3')) || 32px
$gap-h4 = convert(hexo-config('style.gap.h4')) || 16px $gap-h4 = convert(hexo-config('style.gap.h4')) || 16px
$gap-block = convert(hexo-config('style.gap.block')) || 1rem // $gap-paragraph = convert(hexo-config('style.gap.paragraph')) || 1rem //
$gap-p = convert(hexo-config('style.gap.p')) || .5rem // $gap-row = convert(hexo-config('style.gap.row')) || .5rem //
$gap-card = $gap $gap-card = $gap
// border width // border width

@ -4,11 +4,73 @@ pre
margin: 0 - $gap !important margin: 0 - $gap !important
padding: $gap !important padding: $gap !important
scrollbar() scrollbar()
if hexo-config('style.body.highlight.language') == true
&:before
position: absolute
top: 0
right: 0
color: $color-meta
font-size: $fontsize-footnote
padding: 4px 8px
&.md:before,&.markdown:before
content: "md"
&.yaml:before
content: "YAML"
&.json:before
content: "JSON"
&.html:before
content: "HTML"
&.js:before,&.javascript:before
content: "JS"
&.css:before
content: "CSS"
&.less:before
content: "Less"
&.stylus:before
content: "Stylus"
&.bash:before
content: "bash"
&.shell:before
content: "shell"
&.sh:before
content: "sh"
&.ini:before
content: "ini"
&.c:before
content: "C"
&.cpp:before
content: "C++"
&.objc:before,&.objectivec:before
content: "Objective-C"
&.swift:before
content: "Swift"
&.java:before
content: "Java"
&.python:before
content: "Python"
&.php:before
content: "PHP"
&.rust:before
content: "Rust"
&.sql:before
content: "SQL"
&.ruby:before
content: "Ruby"
&.makefile:before
content: "Makefile"
&.go:before
content: "Go"
&.typescript:before
content: "TypeScript"
.highlight .highlight
position: relative position: relative
width: 100% width: 100%
margin: $gap-block 0 margin: $gap-row 0
display: block display: block
background: $color-codeblock background: $color-codeblock
font-size: $fontsize-code font-size: $fontsize-code

@ -35,7 +35,7 @@
h1,h2,h3,h4,h5,h6 h1,h2,h3,h4,h5,h6
&:first-child &:first-child
margin-top: $gap-block margin-top: $gap-row
padding-top: 0 padding-top: 0
&.title &.title
left: 0 left: 0
@ -64,17 +64,17 @@
h5 h5
font-weight: bold font-weight: bold
color: $color-h5 color: $color-h5
margin-top: $gap-block margin-top: $gap-row
h6 h6
color: $color-h6 color: $color-h6
margin-top: $gap-block margin-top: $gap-row
center center
&,p &,p
text-align: center text-align: center
.aplayer .aplayer
margin: $gap-block 0 margin: $gap-row 0
display: inline-block display: inline-block
width: 400px width: 400px
max-width: 100% max-width: 100%
@ -100,11 +100,11 @@
padding-right: 4px padding-right: 4px
margin-left: 2px margin-left: 2px
margin-right: 2px margin-right: 2px
p p
margin-top: $gap-block margin-top: $gap-row
margin-bottom: $gap-block margin-bottom: $gap-row
text-align: $textalign-p text-align: $textalign-p
max-width: 100% max-width: 100%
overflow: auto overflow: auto
&.has-jax &.has-jax
@ -121,8 +121,8 @@
list-style: initial list-style: initial
padding-left: 8px padding-left: 8px
margin-left: $gap margin-left: $gap
margin-top: $gap-block margin-top: $gap-row
margin-bottom: $gap-block margin-bottom: $gap-row
ul,ol ul,ol
margin-top: 0 margin-top: 0
margin-bottom: 0 margin-bottom: 0
@ -163,8 +163,8 @@
text-align: left text-align: left
word-wrap: normal word-wrap: normal
font-size: $fontsize-list font-size: $fontsize-list
margin-top: $gap-p margin-top: $gap-row
margin-bottom: $gap-p margin-bottom: $gap-row
position: relative position: relative
width: 100% width: 100%
padding: .7em 1.2em padding: .7em 1.2em
@ -174,7 +174,7 @@
text-align: justify text-align: justify
color: inherit color: inherit
font-style: italic font-style: italic
margin: $gap-p 0 margin: $gap-row 0
cite cite
&::before &::before
content: '----' content: '----'
@ -195,8 +195,8 @@
display: block display: block
-moz-box-sizing: border-box -moz-box-sizing: border-box
box-sizing: border-box box-sizing: border-box
margin-top: $gap-block margin-top: $gap-row
margin-bottom: $gap-block margin-bottom: $gap-row
overflow: auto overflow: auto
background: $color-codeblock background: $color-codeblock
font-size: $fontsize-code font-size: $fontsize-code
@ -241,7 +241,7 @@
.widget .widget
background: transparent background: transparent
margin: $gap-block 0 margin: $gap-row 0
box-shadow: none box-shadow: none
border-radius: $border-codeblock border-radius: $border-codeblock
cursor: auto cursor: auto
@ -333,15 +333,17 @@
h4 h4
&:before &:before
margin-top: $gap-h4 - $navbar-height - 2 * $gap margin-top: $gap-h4 - $navbar-height - 2 * $gap
margin-bottom: $gap-block margin-bottom: $gap-row
h5 h5
font-weight: bold font-weight: bold
margin-bottom: $gap-block margin-bottom: $gap-row
h6 h6
margin-bottom: $gap-block margin-bottom: $gap-row
p
margin-top: $gap-paragraph
margin-bottom: $gap-paragraph
article .readmore article .readmore
margin-top: $gap-block margin-top: $gap-row
>a >a
font-size: $fontsize-meta font-size: $fontsize-meta

@ -93,13 +93,13 @@
.widget .widget
.content .content
p,ul,ol,table,.tabs,details p,ul,ol,table,.tabs,details
margin-top: $gap-p margin-top: $gap-row
margin-bottom: $gap-p margin-bottom: $gap-row
.post .post
padding-top: 0 padding-top: 0
padding-bottom: 0 padding-bottom: 0
margin-top: $gap-p margin-top: $gap-row
margin-bottom: $gap-p margin-bottom: $gap-row
&.grid .content .grid.fixed a &.grid .content .grid.fixed a
width: "calc(100%/8 - 0 * %s)" % $gap width: "calc(100%/8 - 0 * %s)" % $gap
@media screen and (max-width: $device-laptop) @media screen and (max-width: $device-laptop)
@ -322,12 +322,12 @@ div.hoverbox
.article .article
p[ct] p[ct]
margin-top: 0 margin-top: 0
margin-bottom: $gap-p margin-bottom: $gap-row
font-size: $fontsize-h4 font-size: $fontsize-h4
color: $color-text color: $color-text
p[cst] p[cst]
margin-top: $gap-p margin-top: $gap-row
margin-bottom: $gap-p margin-bottom: $gap-row
font-size: $fontsize-meta font-size: $fontsize-meta

@ -56,8 +56,8 @@
>.content >.content
padding: $gap * 0.5 0 padding: $gap * 0.5 0
p p
margin-top: $gap-p margin-top: $gap-row
margin-bottom: $gap-p margin-bottom: $gap-row
ul>li ul>li
a a
color: $color-meta color: $color-meta

@ -1,7 +1,7 @@
details details
display: block display: block
padding: $gap padding: $gap
margin: $gap-block 0 margin: $gap-row 0
border-radius: $border-codeblock border-radius: $border-codeblock
border: 1px solid darken($color-block, 4) border: 1px solid darken($color-block, 4)
background: $color-card background: $color-card
@ -25,8 +25,8 @@ details
float: right float: right
content: '+' content: '+'
>div.content >div.content
margin-top: $gap-block margin-top: $gap-row
margin-bottom: "calc(%s - %s)" % ($gap-block $gap) margin-bottom: "calc(%s - %s)" % ($gap-row $gap)
&[blue] &[blue]
border: 1px solid darken(bgcolor($color-md-blue), 4) border: 1px solid darken(bgcolor($color-md-blue), 4)
>summary >summary
@ -76,13 +76,13 @@ details[open]
border-bottom: 1px solid darken(bgcolor($color-mac-red), 8) border-bottom: 1px solid darken(bgcolor($color-mac-red), 8)
>summary >summary
color: $color-p color: $color-p
margin-bottom: $gap-block margin-bottom: $gap-row
&:hover &:hover
&:after &:after
content: '-' content: '-'
>div.content> >div.content>
p,.tabs,ul,ol,.highlight,div.note p,.tabs,ul,ol,.highlight,div.note
margin-top: $gap-p margin-top: $gap-row
margin-bottom: $gap-p margin-bottom: $gap-row
&:last-child &:last-child
margin-bottom: 0 margin-bottom: 0

@ -10,7 +10,7 @@ div.videos
flex-wrap: wrap flex-wrap: wrap
justify-content: space-start justify-content: space-start
align-items: flex-end align-items: flex-end
margin: $gap-p 0 - $sp margin: $gap-row 0 - $sp
video,iframe video,iframe
width: 100% width: 100%
margin: $sp margin: $sp

@ -5,9 +5,9 @@ div.note
border($c) border($c)
return mix($c, $color-card, 100) return mix($c, $color-card, 100)
position: relative position: relative
margin-top: $gap-block margin-top: $gap-row
margin-bottom: $gap-block margin-bottom: $gap-row
padding: $gap-p $gap padding: $gap-row $gap
padding-left: "calc(16px + %s)" % $gap padding-left: "calc(16px + %s)" % $gap
border-radius: $border-codeblock border-radius: $border-codeblock
@ -31,8 +31,8 @@ div.note
blockquote, blockquote,
img img
font-size: $fontsize-list font-size: $fontsize-list
margin-top: $gap-p margin-top: $gap-row
margin-bottom: $gap-p margin-bottom: $gap-row
&::before &::before
position: absolute position: absolute

@ -4,14 +4,14 @@ $tbr = 4px
div.tabs div.tabs
display: block display: block
position: relative position: relative
margin-top: $gap-block margin-top: $gap-row
margin-bottom: $gap-block margin-bottom: $gap-row
border-radius: $tbr border-radius: $tbr
background: $color-card background: $color-card
border: 1px solid $border-color border: 1px solid $border-color
.highlight,p,ul,ol,div.note,details .highlight,p,ul,ol,div.note,details
margin-top: $gap-p margin-top: $gap-row
margin-bottom: $gap-p margin-bottom: $gap-row
div.tabs div.tabs
ul.nav-tabs ul.nav-tabs
@ -49,7 +49,7 @@ div.tabs
border-top: 1px solid $border-color border-top: 1px solid $border-color
margin-top: -1px margin-top: -1px
.tab-pane .tab-pane
padding: $gap-p $gap padding: $gap-row $gap
&:not(.active) &:not(.active)
display: none display: none
&.active &.active

@ -1,10 +1,11 @@
// //
if hexo-config('style.body.highlight.copy_btn') if hexo-config('style.body.highlight.copy_btn') == true
.highlight .highlight
//便copybtn-copy //便copybtn-copy
position: relative position: relative
.btn-copy .btn-copy
z-index: 1
display: inline-block display: inline-block
cursor: pointer cursor: pointer
border: none border: none
@ -31,5 +32,6 @@ if hexo-config('style.body.highlight.copy_btn')
.highlight:hover .btn-copy .highlight:hover .btn-copy
opacity: 1 opacity: 1
.article pre:hover .btn-copy .article pre:hover .btn-copy
opacity: 1 opacity: 1

@ -1,5 +1,5 @@
div.fancybox div.fancybox
margin: $gap-block 0 margin: $gap-row 0
$sp = 1px $sp = 1px
>a,>p>a >a,>p>a
margin: $sp margin: $sp

Loading…
Cancel
Save