feat($theme-default): using '.theme-default-content' to replace '.content' in <Content /> outlet.

This commit is contained in:
ULIVZ
2019-06-02 15:52:24 +08:00
parent d84bfe77c2
commit 85ff63065b
3 changed files with 24 additions and 8 deletions
@@ -38,7 +38,7 @@
</div>
</div>
<Content class="content custom"/>
<Content class="theme-default-content custom"/>
<div
class="footer"
@@ -2,7 +2,7 @@
<main class="page">
<slot name="top"/>
<Content class="content"/>
<Content class="theme-default-content"/>
<footer class="page-edit">
<div
@@ -4,6 +4,8 @@
@require './wrapper'
@require './toc'
$contentClass = '.theme-default-content'
html, body
padding 0
margin 0
@@ -53,22 +55,26 @@ body
border-right 1px solid $borderColor
overflow-y auto
.content:not(.custom)
{$contentClass}:not(.custom)
@extend $wrapper
> *:first-child
margin-top $navbarHeight
a:hover
text-decoration underline
p.demo
padding 1rem 1.5rem
border 1px solid #ddd
border-radius 4px
img
max-width 100%
.content.custom
{$contentClass}.custom
padding 0
margin 0
img
max-width 100%
@@ -94,6 +100,7 @@ blockquote
border-left .5rem solid #dfe2e5
margin 0.5rem 0
padding .25rem 0 .25rem 1rem
& > p
margin 0
@@ -106,15 +113,19 @@ strong
h1, h2, h3, h4, h5, h6
font-weight 600
line-height 1.25
.content:not(.custom) > &
{$contentClass}:not(.custom) > &
margin-top (0.5rem - $navbarHeight)
padding-top ($navbarHeight + 1rem)
margin-bottom 0
&:first-child
margin-top -1.5rem
margin-bottom 1rem
+ p, + pre, + .custom-block
margin-top 2rem
&:hover .header-anchor
opacity: 1
@@ -136,6 +147,7 @@ a.header-anchor
padding-right 0.23em
margin-top 0.125em
opacity 0
&:hover
text-decoration none
@@ -157,6 +169,7 @@ table
tr
border-top 1px solid #dfe2e5
&:nth-child(2n)
background-color #f6f8fa
@@ -168,10 +181,12 @@ th, td
&.sidebar-open
.sidebar-mask
display: block
&.no-navbar
.content:not(.custom) > h1, h2, h3, h4, h5, h6
margin-top 1.5rem
padding-top 0
{$contentClass}:not(.custom) > h1, h2, h3, h4, h5, h6
margin-top 1.5rem
padding-top 0
.sidebar
top 0
@@ -180,6 +195,7 @@ th, td
.theme-container.no-sidebar
.sidebar
display none
.page
padding-left 0