Browse Source

feat: light code block theme

main
Inhji Y. 6 months ago
parent
commit
8aedb765ec
  1. 3
      assets/.babelrc
  2. 4
      assets/css/_markdown.scss
  3. 122
      assets/css/_prism.scss
  4. 1
      assets/css/app.scss

3
assets/.babelrc

@ -6,8 +6,7 @@
["prismjs", {
"languages": ["javascript", "css", "markup", "markdown", "elixir", "bash", "sql", "vbnet", "json", "html", "svg", ],
"plugins": [],
"theme": "tomorrow",
"css": true
"css": false
}]
]
}

4
assets/css/_markdown.scss

@ -78,9 +78,9 @@
}
}
blockquote, pre {
padding: 1rem;
@include color-assign(background-color, surface-var);
margin-bottom: 1rem;
}
@ -88,6 +88,7 @@
position: relative;
font-size: 1.1rem;
font-style: italic;
@include color-assign(background-color, surface-var);
&:after {
@include color-assign(color, primary);
@ -102,7 +103,6 @@
pre {
overflow: auto;
@include color-assign(background-color, surface-dark);
}
code.inline {

122
assets/css/_prism.scss

@ -0,0 +1,122 @@
/**
* GHColors theme by Avi Aryan (http://aviaryan.in)
* Inspired by Github syntax coloring
*/
code[class*="language-"],
pre[class*="language-"] {
color: #393A34;
font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace;
direction: ltr;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
font-size: .9em;
line-height: 1.2em;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
pre > code[class*="language-"] {
font-size: 1em;
}
pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
background: #b3d4fc;
}
pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
code[class*="language-"]::selection, code[class*="language-"] ::selection {
background: #b3d4fc;
}
/* Code blocks */
pre[class*="language-"] {
padding: 1em;
margin: .5em 0;
overflow: auto;
border: 1px solid #dddddd;
background-color: white;
}
/* Inline code */
:not(pre) > code[class*="language-"] {
padding: .2em;
padding-top: 1px;
padding-bottom: 1px;
background: #f8f8f8;
border: 1px solid #dddddd;
}
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: #999988;
font-style: italic;
}
.token.namespace {
opacity: .7;
}
.token.string,
.token.attr-value {
color: #e3116c;
}
.token.punctuation,
.token.operator {
color: #393A34; /* no highlight */
}
.token.entity,
.token.url,
.token.symbol,
.token.number,
.token.boolean,
.token.variable,
.token.constant,
.token.property,
.token.regex,
.token.inserted {
color: #36acaa;
}
.token.atrule,
.token.keyword,
.token.attr-name,
.language-autohotkey .token.selector {
color: #00a4db;
}
.token.function,
.token.deleted,
.language-autohotkey .token.tag {
color: #9a050f;
}
.token.tag,
.token.selector,
.language-autohotkey .token.keyword {
color: #00009f;
}
.token.important,
.token.function,
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}

1
assets/css/app.scss

@ -75,6 +75,7 @@ $shadow: 1px 1px 3px 0px rgba(50, 50, 50, 0.75);
@import "./navigation";
@import "./forms";
@import "./tablesort";
@import "./prism";
/* === Base === */

Loading…
Cancel
Save