Browse Source

Added highlight.js for code highlighting

v3
KindlyFire 3 years ago
parent
commit
fb778e633b
12 changed files with 26 additions and 9 deletions
  1. +1
    -1
      assets/built/custom.css
  2. +1
    -1
      assets/built/custom.css.map
  3. +2
    -0
      assets/built/highlight.theme.min.css
  4. +1
    -0
      assets/built/highlight.theme.min.css.map
  5. +1
    -1
      assets/built/screen.css
  6. +1
    -1
      assets/built/screen.css.map
  7. +8
    -0
      assets/css/custom.css
  8. +1
    -0
      assets/css/highlight.theme.min.css
  9. +1
    -5
      assets/css/screen.css
  10. +3
    -0
      assets/js/highlight.min.js
  11. +3
    -0
      default.hbs
  12. +3
    -0
      post.hbs

+ 1
- 1
assets/built/custom.css View File

@ -1,2 +1,2 @@
@font-face{font-family:Lora;font-weight:400;src:local('Lora Regular'),local('Lora-Regular'),url(../fonts/Lora-Regular.ttf)}@font-face{font-family:Lora;font-weight:700;src:local('Lora Bold'),local('Lora-Bold'),url(../fonts/Lora-Bold.ttf)}@font-face{font-family:Lora;font-style:italic;src:local('Lora Italic'),local('Lora-Italic'),url(../fonts/Lora-Italic.ttf)}@font-face{font-family:Lora;font-style:italic;font-weight:700;src:local('Lora Bold Italic'),local('Lora-Bold-Italic'),url(../fonts/Lora-BoldItalic.ttf)}body{color:rgba(0,0,0,.84)}.post-card-excerpt,.post-full-content,.post-full-content h5,.site-header-content .author-meta,.subscribe-overlay-description{font-family:Lora,Georgia,serif}.post-full-content{text-align:justify;font-size:1.9rem}.post-full-content h2{margin:.5em 0;font-size:3rem}#isso-thread{padding:0 100px!important}@media (max-width:1170px){#isso-thread{padding:5vw 7vw 0!important}}@media (max-width:500px){#isso-thread{padding:0!important}}.post-full-footer{padding:3vw 0}@media (min-width:900px){.floating-header{height:50px}}.post-template .kg-card-markdown>p:first-child{font-size:inherit;line-height:inherit}.site-footer{padding-bottom:20px}.author-card-name{padding:0 0 5px}.post-full-content img,.post-full-content video{margin:.5em auto}.post-full-content pre{margin:0 0 2em}.post-full-header{padding:3vw}@media (max-width:500px){.post-full-header{padding:10vw 3vw 8vw}}.post-header-image{display:block;margin:auto}.post-full-content:after,.post-full-content:before{display:none}@media (max-width:500px){.post-full-content{padding:30px 0 0}}.floating-header-blog-title{margin-right:1px}.inner{max-width:1100px}.post-full-content code{font-size:90%}.post-full-content code,code,kbd,pre,samp{padding:.2em .4em;margin:0;background-color:rgba(27,31,35,.05);border-radius:3px;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace}code,kbd,pre,samp{font-size:100%}
@font-face{font-family:Lora;font-weight:400;src:local('Lora Regular'),local('Lora-Regular'),url(../fonts/Lora-Regular.ttf)}@font-face{font-family:Lora;font-weight:700;src:local('Lora Bold'),local('Lora-Bold'),url(../fonts/Lora-Bold.ttf)}@font-face{font-family:Lora;font-style:italic;src:local('Lora Italic'),local('Lora-Italic'),url(../fonts/Lora-Italic.ttf)}@font-face{font-family:Lora;font-style:italic;font-weight:700;src:local('Lora Bold Italic'),local('Lora-Bold-Italic'),url(../fonts/Lora-BoldItalic.ttf)}body{color:rgba(0,0,0,.84)}.post-card-excerpt,.post-full-content,.post-full-content h5,.site-header-content .author-meta,.subscribe-overlay-description{font-family:Lora,Georgia,serif}.post-full-content{text-align:justify;font-size:1.9rem}.post-full-content h2{margin:.5em 0;font-size:3rem}#isso-thread{padding:0 100px!important}@media (max-width:1170px){#isso-thread{padding:5vw 7vw 0!important}}@media (max-width:500px){#isso-thread{padding:0!important}}.post-full-footer{padding:3vw 0}@media (min-width:900px){.floating-header{height:50px}}.post-template .kg-card-markdown>p:first-child{font-size:inherit;line-height:inherit}.site-footer{padding-bottom:20px}.author-card-name{padding:0 0 5px}.post-full-content img,.post-full-content video{margin:.5em auto}.post-full-content pre{margin:0 0 2em}.post-full-header{padding:3vw}@media (max-width:500px){.post-full-header{padding:10vw 3vw 8vw}}.post-header-image{display:block;margin:auto}.post-full-content:after,.post-full-content:before{display:none}@media (max-width:500px){.post-full-content{padding:30px 0 0}}.floating-header-blog-title{margin-right:1px}.inner{max-width:1100px}.post-full-content code{padding:.2em .4em;margin:0;font-size:90%;background-color:rgba(27,31,35,.05);border-radius:3px;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace}.post-full-content pre ::-moz-selection{background:#4d4d4d}.post-full-content pre ::selection{background:#4d4d4d}code,kbd,pre,samp{padding:.2em .4em;margin:0;font-size:100%;background-color:rgba(27,31,35,.05);border-radius:3px;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace}
/*# sourceMappingURL=custom.css.map */

+ 1
- 1
assets/built/custom.css.map
File diff suppressed because it is too large
View File


+ 2
- 0
assets/built/highlight.theme.min.css View File

@ -0,0 +1,2 @@
.hljs{display:block;overflow-x:auto;padding:.5em;background:#23241f}.hljs,.hljs-subst,.hljs-tag{color:#f8f8f2}.hljs-emphasis,.hljs-strong{color:#a8a8a2}.hljs-bullet,.hljs-link,.hljs-literal,.hljs-number,.hljs-quote,.hljs-regexp{color:#ae81ff}.hljs-code,.hljs-section,.hljs-selector-class,.hljs-title{color:#a6e22e}.hljs-strong{font-weight:700}.hljs-emphasis{font-style:italic}.hljs-attr,.hljs-keyword,.hljs-name,.hljs-selector-tag{color:#f92672}.hljs-attribute,.hljs-symbol{color:#66d9ef}.hljs-class .hljs-title,.hljs-params{color:#f8f8f2}.hljs-addition,.hljs-built_in,.hljs-builtin-name,.hljs-selector-attr,.hljs-selector-id,.hljs-selector-pseudo,.hljs-string,.hljs-template-variable,.hljs-type,.hljs-variable{color:#e6db74}.hljs-comment,.hljs-deletion,.hljs-meta{color:#75715e}
/*# sourceMappingURL=highlight.theme.min.css.map */

+ 1
- 0
assets/built/highlight.theme.min.css.map View File

@ -0,0 +1 @@
{"version":3,"sources":["highlight.theme.min.css"],"names":[],"mappings":"AAAA,MAAM,cAAc,gBAAgB,aAAc,kBAAkB,CAAC,4BAA4B,aAAa,CAAC,4BAA4B,aAAa,CAAC,4EAA4E,aAAa,CAAC,0DAA0D,aAAa,CAAC,aAAa,eAAgB,CAAC,eAAe,iBAAiB,CAAC,uDAAuD,aAAa,CAAC,6BAA6B,aAAa,CAAC,qCAAqC,aAAa,CAAC,4KAA4K,aAAa,CAAC,wCAAwC,aAAa,CAAC","file":"highlight.theme.min.css","sourcesContent":[".hljs{display:block;overflow-x:auto;padding:0.5em;background:#23241f}.hljs,.hljs-tag,.hljs-subst{color:#f8f8f2}.hljs-strong,.hljs-emphasis{color:#a8a8a2}.hljs-bullet,.hljs-quote,.hljs-number,.hljs-regexp,.hljs-literal,.hljs-link{color:#ae81ff}.hljs-code,.hljs-title,.hljs-section,.hljs-selector-class{color:#a6e22e}.hljs-strong{font-weight:bold}.hljs-emphasis{font-style:italic}.hljs-keyword,.hljs-selector-tag,.hljs-name,.hljs-attr{color:#f92672}.hljs-symbol,.hljs-attribute{color:#66d9ef}.hljs-params,.hljs-class .hljs-title{color:#f8f8f2}.hljs-string,.hljs-type,.hljs-built_in,.hljs-builtin-name,.hljs-selector-id,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-addition,.hljs-variable,.hljs-template-variable{color:#e6db74}.hljs-comment,.hljs-deletion,.hljs-meta{color:#75715e}\n"],"sourceRoot":"/source/"}

+ 1
- 1
assets/built/screen.css
File diff suppressed because it is too large
View File


+ 1
- 1
assets/built/screen.css.map
File diff suppressed because it is too large
View File


+ 8
- 0
assets/css/custom.css View File

@ -164,6 +164,14 @@ body {
font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
}
.post-full-content pre *::selection {
background: color(black lightness(+30%));
}
.post-full-content pre::-webkit-scrollbar-thumb {
}
code,
kbd,
pre,


+ 1
- 0
assets/css/highlight.theme.min.css View File

@ -0,0 +1 @@
.hljs{display:block;overflow-x:auto;padding:0.5em;background:#23241f}.hljs,.hljs-tag,.hljs-subst{color:#f8f8f2}.hljs-strong,.hljs-emphasis{color:#a8a8a2}.hljs-bullet,.hljs-quote,.hljs-number,.hljs-regexp,.hljs-literal,.hljs-link{color:#ae81ff}.hljs-code,.hljs-title,.hljs-section,.hljs-selector-class{color:#a6e22e}.hljs-strong{font-weight:bold}.hljs-emphasis{font-style:italic}.hljs-keyword,.hljs-selector-tag,.hljs-name,.hljs-attr{color:#f92672}.hljs-symbol,.hljs-attribute{color:#66d9ef}.hljs-params,.hljs-class .hljs-title{color:#f8f8f2}.hljs-string,.hljs-type,.hljs-built_in,.hljs-builtin-name,.hljs-selector-id,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-addition,.hljs-variable,.hljs-template-variable{color:#e6db74}.hljs-comment,.hljs-deletion,.hljs-meta{color:#75715e}

+ 1
- 5
assets/css/screen.css View File

@ -821,10 +821,6 @@ Usage (In Ghost editor):
background: transparent;
}
.post-full-content pre code * {
color: inherit;
}
.post-full-content .fluid-width-video-wrapper {
margin: 1.5em 0 3em;
}
@ -1912,4 +1908,4 @@ Usage (In Ghost editor):
.site-footer-nav a:first-child {
margin-left: 0;
}
}
}

+ 3
- 0
assets/js/highlight.min.js
File diff suppressed because it is too large
View File


+ 3
- 0
default.hbs View File

@ -15,6 +15,9 @@
<link rel="stylesheet" type="text/css" href="{{asset "built/screen.css"}}" />
<link rel="stylesheet" type="text/css" href="{{asset "built/custom.css"}}" />
<!-- Highlight.JS theme -->
<link rel="stylesheet" href="{{asset "css/highlight.theme.min.css"}}">
{{!-- This tag outputs SEO meta+structured data and other important settings --}}
{{ghost_head}}


+ 3
- 0
post.hbs View File

@ -196,4 +196,7 @@ $(document).ready(function () {
update();
});
</script>
<script src="{{asset "js/highlight.min.js"}}"></script>
<script>hljs.initHighlightingOnLoad();</script>
{{/contentFor}}

Loading…
Cancel
Save