Skip to content

Commit

Permalink
feat: support highlight-disabled mode (#168)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArcticLampyrid committed Dec 6, 2022
1 parent 72e2704 commit 1274684
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 25 deletions.
3 changes: 0 additions & 3 deletions layout/_partial/head.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@
<% if (config.highlight && config.highlight.enable && theme.highlight_theme) { %>
<%- css_theme_cdn(`css/highlight/${theme.highlight_theme || 'night-eighties'}.min.css`, {id: "highlight-css", media:"all"}) %>
<% } %>
<% if (config.prismjs && config.prismjs.enable) { %>
<%- css_theme_cdn('css/prismjs.min.css', {id: "prismjs-css", media:"all"}) %>
<% } %>
<%- css_npm_cdn('font-awesome', 'css/font-awesome.min.css', {id:"fontawe-css", media:"all"}) %>
<%- css_npm_cdn('nprogress', 'nprogress.css', {id:"nprogress-css", media:"all"}) %>
<% const commentProvider = theme.posts.comments?.provider ?? theme.posts.comments; %>
Expand Down
2 changes: 1 addition & 1 deletion source/css/kratosr.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion source/maps/kratosr.min.css.map

Large diffs are not rendered by default.

31 changes: 31 additions & 0 deletions src/scss/kratosr.scss
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,37 @@ code, kbd {
white-space: normal;
}

// prismjs 或 无高亮模式 或 highlightjs的nowarp模式
pre:has(code) {
border-radius: 8px;
padding-top: 30px!important;
position: relative;
overflow: auto;
background-color: #1d1f21;
font-size: 14px;
font-weight: unset;

&::before {
content: " ";
position: absolute;
-webkit-border-radius: 50%;
border-radius: 50%;
background-color: #fc625d;
width: 12px;
height: 12px;
left: 10px;
top: 10px;
-webkit-box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b;
box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b;
}
}

pre code {
white-space: pre;
background-color: inherit;
font-size: inherit;
}

legend {
display: block;
width: 100%;
Expand Down
20 changes: 0 additions & 20 deletions src/scss/prismjs.scss

This file was deleted.

0 comments on commit 1274684

Please sign in to comment.