removed vuepress default theme styles

added some missing stuff
This commit is contained in:
Jakob Schrettenbrunner 2018-07-27 00:40:32 +02:00
parent f351a92e42
commit ea7d1ed8a9
20 changed files with 43 additions and 499 deletions

View File

@ -50,7 +50,7 @@ export default {
}
</script>
<style lang="stylus">
<!--<style lang="stylus">
@import './styles/config.styl'
.dropdown-wrapper
@ -152,4 +152,4 @@ export default {
border-radius 0.25rem
white-space nowrap
margin 0
</style>
</style>-->

View File

@ -22,8 +22,9 @@ export default {
}
</script>
<style lang="stylus">
.dropdown-enter, .dropdown-leave-to
height 0 !important
<style>
.dropdown-enter, .dropdown-leave-to {
height: 0 !important;
}
</style>
</style>

View File

@ -42,7 +42,7 @@ export default {
}
</script>
<style lang="stylus">
<!--<style lang="stylus">
@import './styles/config.styl'
.home-gtfo
@ -131,4 +131,4 @@ export default {
.feature
h2
font-size 1.25rem
</style>
</style>-->

View File

@ -156,7 +156,7 @@ function find (page, items, offset) {
}
</script>
<style lang="stylus">
<!--<style lang="stylus">
@import './styles/config.styl'
@require './styles/wrapper.styl'
@ -205,4 +205,4 @@ function find (page, items, offset) {
float none
text-align left
</style>
</style>-->

View File

@ -136,7 +136,7 @@ export default {
}
</script>
<style lang="stylus">
<!--<style lang="stylus">
@import './styles/config.styl'
.search-box-no
@ -218,4 +218,4 @@ export default {
width calc(100vw - 4rem)
input:focus
width 8rem
</style>
</style>-->

View File

@ -69,7 +69,7 @@ function resolveOpenGroupIndex (route, items) {
}
</script>
<style lang="stylus">
<!--<style lang="stylus">
@import './styles/config.styl'
.sidebar-no
@ -102,3 +102,4 @@ function resolveOpenGroupIndex (route, items) {
.sidebar-links
padding 1rem 0
</style>
-->

View File

@ -6,7 +6,7 @@
</div>
</template>
<style lang="stylus">
<!--<style lang="stylus">
@import './styles/config.styl'
.sidebar-button-x
@ -26,3 +26,4 @@
.sidebar-button
display block
</style>
-->

View File

@ -27,7 +27,7 @@ export default {
}
</script>
<style lang="stylus">
<!--<style lang="stylus">
.sidebar-group-away
&:not(.first)
margin-top 1em
@ -61,3 +61,4 @@ export default {
transition height .1s ease-out
overflow hidden
</style>
-->

View File

@ -1,22 +0,0 @@
@require './config'
.arrow
display inline-block
width 0
height 0
&.up
border-left 4px solid transparent
border-right 4px solid transparent
border-bottom 6px solid $arrowBgColor
&.down
border-left 4px solid transparent
border-right 4px solid transparent
border-top 6px solid $arrowBgColor
&.right
border-top 4px solid transparent
border-bottom 4px solid transparent
border-left 6px solid $arrowBgColor
&.left
border-top 4px solid transparent
border-bottom 4px solid transparent
border-right 6px solid $arrowBgColor

View File

@ -1,129 +0,0 @@
@require './config'
.content
code
color lighten($textColor, 20%)
padding 0.25rem 0.5rem
margin 0
font-size 0.85em
background-color rgba(27,31,35,0.05)
border-radius 3px
.content
pre, pre[class*="language-"]
line-height 1.4
padding 1.25rem 1.5rem
margin 0.85rem 0
background-color $codeBgColor
border-radius 6px
overflow auto
code
color #fff
padding 0
background-color transparent
border-radius 0
div[class*="language-"]
position relative
background-color $codeBgColor
border-radius 6px
.highlight-lines
user-select none
padding-top 1.3rem
position absolute
top 0
left 0
width 100%
line-height 1.4
.highlighted
background-color rgba(0, 0, 0, 66%)
pre, pre[class*="language-"]
background transparent
position relative
z-index 1
&::before
position absolute
z-index 3
top 0.8em
right 1em
font-size 0.75rem
color rgba(255, 255, 255, 0.4)
&:not(.line-numbers-mode)
.line-numbers-wrapper
display none
&.line-numbers-mode
.highlight-lines .highlighted
position relative
&:before
content ' '
position absolute
z-index 3
left 0
top 0
display block
width $lineNumbersWrapperWidth
height 100%
background-color rgba(0, 0, 0, 66%)
pre
padding-left $lineNumbersWrapperWidth + 1 rem
vertical-align middle
.line-numbers-wrapper
position absolute
top 0
width $lineNumbersWrapperWidth
text-align center
color rgba(255, 255, 255, 0.3)
padding 1.25rem 0
line-height 1.4
br
user-select none
.line-number
position relative
z-index 4
user-select none
font-size 0.85em
&::after
content ''
position absolute
z-index 2
top 0
left 0
width $lineNumbersWrapperWidth
height 100%
border-radius 6px 0 0 6px
border-right 1px solid rgba(0, 0, 0, 66%)
background-color $codeBgColor
for lang in js ts html md vue css sass scss less stylus go java c sh yaml
div{'[class~="language-' + lang + '"]'}
&:before
content ('' + lang)
div[class~="language-javascript"]
&:before
content "js"
div[class~="language-typescript"]
&:before
content "ts"
div[class~="language-markup"]
&:before
content "html"
div[class~="language-markdown"]
&:before
content "md"
div[class~="language-json"]:before
content "json"
div[class~="language-ruby"]:before
content "rb"
div[class~="language-python"]:before
content "py"
div[class~="language-bash"]:before
content "sh"

View File

@ -1,19 +0,0 @@
// colors
$accentColor = #3eaf7c
$textColor = #2c3e50
$borderColor = #eaecef
$codeBgColor = #282c34
$arrowBgColor = #ccc
// layout
$navbarHeight = 3.6rem
$sidebarWidth = 20rem
$contentWidth = 840px
// responsive breakpoints
$MQNarrow = 959px
$MQMobile = 719px
$MQMobileNarrow = 419px
// code
$lineNumbersWrapperWidth = 3.5rem

View File

@ -1,28 +0,0 @@
.custom-block
.custom-block-title
font-weight 600
margin-bottom -0.4rem
&.tip, &.warning, &.danger
padding .1rem 1.5rem
border-left-width .5rem
border-left-style solid
margin 1rem 0
&.tip
background-color #f3f5f7
border-color #42b983
&.warning
background-color rgba(255,229,100,.3)
border-color darken(#ffe564, 35%)
color darken(#ffe564, 70%)
.custom-block-title
color darken(#ffe564, 50%)
a
color $textColor
&.danger
background-color #ffe6e6
border-color darken(red, 20%)
color darken(red, 70%)
.custom-block-title
color darken(red, 40%)
a
color $textColor

View File

@ -8,6 +8,28 @@
max-width: $content-width;
}
.table-of-contents {
@apply .my-8 .p-2 .rounded .border .border-grey-lighter;
}
.page-edit {
@apply .mx-auto .px-8 .pb-8;
max-width: $content-width;
}
.page-nav {
@apply .mx-auto .px-8 .pb-8;
max-width: $content-width;
.inner {
@apply .m-0 .pt-8 .border-t .border-grey-lighter;
}
.next {
@apply .float-right;
}
}
table td, table th {
@apply .border;
padding: 0.6rem 1rem !important;

View File

@ -1,37 +0,0 @@
@require './config'
$mobileSidebarWidth = $sidebarWidth * 0.82
// narrow desktop / iPad
@media (max-width: $MQNarrow)
.sidebar
font-size 15px
width $mobileSidebarWidth
.page
padding-left $mobileSidebarWidth
// wide mobile
@media (max-width: $MQMobile)
.sidebar
top 0
padding-top $navbarHeight
transform translateX(-100%)
transition transform .2s ease
.page
padding-left 0
.theme-container
&.sidebar-open
.sidebar
transform translateX(0)
&.no-navbar
.sidebar
padding-top: 0
// narrow mobile
@media (max-width: $MQMobileNarrow)
h1
font-size 1.9rem
.content
div[class*="language-"]
margin 0.85rem -1.5rem
border-radius 0

View File

@ -12,7 +12,7 @@
}
.home-link {
@apply .text-white .font-light .flex-no-shrink;
@apply .block .text-white .font-light .flex-no-shrink;
.logo {
@apply .h-full .float-left;

View File

@ -1,48 +0,0 @@
#nprogress
pointer-events none
.bar
background $accentColor
position fixed
z-index 1031
top 0
left 0
width 100%
height 2px
.peg
display block
position absolute
right 0px
width 100px
height 100%
box-shadow 0 0 10px $accentColor, 0 0 5px $accentColor
opacity 1.0
transform rotate(3deg) translate(0px, -4px)
.spinner
display block
position fixed
z-index 1031
top 15px
right 15px
.spinner-icon
width 18px
height 18px
box-sizing border-box
border solid 2px transparent
border-top-color $accentColor
border-left-color $accentColor
border-radius 50%
animation nprogress-spinner 400ms linear infinite
.nprogress-custom-parent
overflow hidden
position relative
.nprogress-custom-parent #nprogress .spinner,
.nprogress-custom-parent #nprogress .bar
position absolute
@keyframes nprogress-spinner
0%
transform rotate(0deg)
100%
transform rotate(360deg)

View File

@ -89,7 +89,7 @@ $arrow-bg: #000;
}
.sidebar-group-items {
transition: height 100ms ease-out;
transition: height .1s ease-out;
overflow: hidden;
}

View File

@ -1,187 +0,0 @@
@require './config'
@require './nprogress'
@require './code'
@require './custom-blocks'
@require './arrow'
@require './wrapper'
@require './toc'
html, body
padding 0
margin 0
body
font-family -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif
-webkit-font-smoothing antialiased
-moz-osx-font-smoothing grayscale
font-size 16px
color $textColor
.page
padding-left $sidebarWidth
.navbar
position fixed
z-index 20
top 0
left 0
right 0
height $navbarHeight
background-color #fff
box-sizing border-box
border-bottom 1px solid $borderColor
.sidebar-mask
position fixed
z-index 9
top 0
left 0
width 100vw
height 100vh
display none
.sidebar
font-size 15px
background-color #fff
width $sidebarWidth
position fixed
z-index 10
margin 0
top $navbarHeight
left 0
bottom 0
box-sizing border-box
border-right 1px solid $borderColor
overflow-y auto
.content: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
padding 0
margin 0
img
max-width 100%
a
font-weight 500
color $accentColor
text-decoration none
p a code
font-weight 400
color $accentColor
kbd
background #eee
border solid 0.15rem #ddd
border-bottom solid 0.25rem #ddd
border-radius 0.15rem
padding 0 0.15em
blockquote
font-size 1.2rem
color #999
border-left .25rem solid #dfe2e5
margin-left 0
padding-left 1rem
ul, ol
padding-left 1.2em
strong
font-weight 600
h1, h2, h3, h4, h5, h6
font-weight 600
line-height 1.25
.content: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
h1
font-size 2.2rem
h2
font-size 1.65rem
padding-bottom .3rem
border-bottom 1px solid $borderColor
h3
font-size 1.35rem
a.header-anchor
font-size 0.85em
float left
opacity 0
&:hover
text-decoration none
code, kbd, .line-number
font-family source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace
p, ul, ol
line-height 1.7
hr
border 0
border-top 1px solid $borderColor
table
border-collapse collapse
margin 1rem 0
display: block
overflow-x: auto
tr
border-top 1px solid #dfe2e5
&:nth-child(2n)
background-color #f6f8fa
th, td
border 1px solid #dfe2e5
padding .6em 1em
.custom-layout
padding-top $navbarHeight
.theme-container
&.sidebar-open
.sidebar-mask
display: block
&.no-navbar
.content:not(.custom) > h1, h2, h3, h4, h5, h6
margin-top 1.5rem
padding-top 0
.sidebar
top 0
.custom-layout
padding-top 0
@media (min-width: ($MQMobile + 1px))
.theme-container.no-sidebar
.sidebar
display none
.page
padding-left 0
@require './mobile.styl'

View File

@ -1,3 +0,0 @@
.table-of-contents
.badge
vertical-align middle

View File

@ -1,9 +0,0 @@
$wrapper
max-width $contentWidth
margin 0 auto
padding 2rem 2.5rem
@media (max-width: $MQNarrow)
padding 2rem
@media (max-width: $MQMobileNarrow)
padding 1.5rem