-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
👽 🐛 fix: Updating code due to API changes of VuePress
- Loading branch information
Showing
9 changed files
with
140 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -135,8 +135,4 @@ export default { | |
p | ||
color: #888 | ||
pre | ||
border: 1px solid #333 | ||
background-color: $black !important | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,95 +1,154 @@ | ||
@require '../_variables' | ||
|
||
.content | ||
|
||
code | ||
color #f81ce5 | ||
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-"] | ||
background-color $codeBgColor | ||
line-height 1.4 | ||
border-radius 6px | ||
padding 1.5rem 1.5rem | ||
margin 0.85rem 0 | ||
white-space pre-wrap | ||
word-break break-word | ||
padding 1.25rem 1.5rem | ||
background transparent | ||
overflow auto | ||
position relative | ||
|
||
code | ||
color #fff | ||
padding 0 | ||
background-color transparent | ||
border-radius 0 | ||
|
||
&:before | ||
div[class*="language-"] | ||
position relative | ||
border: 1px solid $codeBgColor | ||
margin 0.85rem 0 | ||
background-color $codeBgColor | ||
border-radius 6px | ||
|
||
.highlight-lines | ||
user-select none | ||
position absolute | ||
top 0 | ||
left 0 | ||
width 100% | ||
padding 1.25rem 0 | ||
margin: 0.5em 0 | ||
line-height 1.4 | ||
|
||
.highlighted | ||
background-color rgba(0, 0, 0, 66%) | ||
|
||
|
||
pre | ||
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 3.5rem | ||
height 100% | ||
background-color rgba(0, 0, 0, 66%) | ||
pre | ||
padding-left 5.5rem | ||
vertical-align middle | ||
|
||
.line-numbers-wrapper | ||
position absolute | ||
top 0.8em | ||
right 1em | ||
font-size 0.75rem | ||
color rgba(255, 255, 255, 0.4) | ||
|
||
.highlighted-line | ||
background-color rgba(0, 0, 0, 66%) | ||
display block | ||
margin 0 -1.5rem | ||
padding 0 1.5rem | ||
|
||
.examples | ||
.highlighted-line | ||
background-color rgba(255, 255, 255, 0.2) | ||
|
||
pre[class="language-js"], pre[class="language-javascript"] | ||
top 0 | ||
width 3.5rem | ||
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 3.5rem | ||
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" | ||
|
||
pre[class="language-html"], pre[class="language-markup"] | ||
div[class*="language-typescript"] | ||
&:before | ||
content "ts" | ||
|
||
div[class*="language-markup"] | ||
&:before | ||
content "html" | ||
|
||
pre[class="language-markdown"], pre[class="language-md"] | ||
div[class*="language-markdown"] | ||
&:before | ||
content "md" | ||
|
||
pre[class="language-vue"]:before | ||
content "vue" | ||
|
||
pre[class="language-css"]:before | ||
content "css" | ||
|
||
pre[class="language-sass"]:before | ||
content "sass" | ||
|
||
pre[class="language-less"]:before | ||
content "less" | ||
|
||
pre[class="language-scss"]:before | ||
content "scss" | ||
|
||
pre[class="language-stylus"]:before | ||
content "stylus" | ||
|
||
pre[class="language-json"]:before | ||
div[class*="language-json"]:before | ||
content "json" | ||
|
||
pre[class="language-ruby"]:before | ||
div[class*="language-ruby"]:before | ||
content "rb" | ||
|
||
pre[class="language-python"]:before | ||
div[class*="language-python"]:before | ||
content "py" | ||
|
||
pre[class="language-go"]:before | ||
content "go" | ||
|
||
pre[class="language-java"]:before | ||
content "java" | ||
div[class*="language-bash"]:before | ||
content "sh" | ||
|
||
pre[class="language-c"]:before | ||
content "c" | ||
.examples | ||
div[class*="language-"] | ||
background: black | ||
border-color: #333 | ||
|
||
pre[class="language-bash"]:before | ||
content "sh" | ||
.highlighted | ||
background-color rgba(255, 255, 255, 0.2) !important |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters