Add hljs
This commit is contained in:
parent
2d899dc79b
commit
6641a1acaf
|
@ -7,6 +7,28 @@ pre {
|
||||||
|
|
||||||
pre[class*="language-"] { .bn; .br0 }
|
pre[class*="language-"] { .bn; .br0 }
|
||||||
|
|
||||||
|
pre code,
|
||||||
|
p code {
|
||||||
|
font-size: .8125rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre code,
|
||||||
|
pre code.hljs,
|
||||||
|
.hljs {
|
||||||
|
.db;
|
||||||
|
.pa3;
|
||||||
|
.bl;
|
||||||
|
.bw2;
|
||||||
|
.b--black-40;
|
||||||
|
.mv2;
|
||||||
|
background: #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
p code {
|
||||||
|
background: #eee;
|
||||||
|
padding: 1px 3px;
|
||||||
|
}
|
||||||
|
|
||||||
pre code {
|
pre code {
|
||||||
.pre;
|
.pre;
|
||||||
word-break: normal;
|
word-break: normal;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
@import (less) "~font-awesome/css/font-awesome.css";
|
@import (less) "~font-awesome/css/font-awesome.css";
|
||||||
// @import (less) "~prismjs/themes/prism-twilight.css";
|
@import (less) "~highlightjs/styles/github-gist.css";
|
||||||
|
|
||||||
@import "~tachyons-less/less/_colors";
|
@import "~tachyons-less/less/_colors";
|
||||||
|
|
||||||
|
@ -13,26 +13,6 @@ td {
|
||||||
a { color: @blue }
|
a { color: @blue }
|
||||||
}
|
}
|
||||||
|
|
||||||
pre code,
|
|
||||||
p code {
|
|
||||||
font-size: .8125rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
pre code {
|
|
||||||
.db;
|
|
||||||
.bg-black-10;
|
|
||||||
.pa3;
|
|
||||||
.bl;
|
|
||||||
.bw2;
|
|
||||||
.b--black-40;
|
|
||||||
.mv2;
|
|
||||||
}
|
|
||||||
|
|
||||||
p code {
|
|
||||||
.bg-black-10;
|
|
||||||
padding: 1px 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.button {
|
.button {
|
||||||
.bg-blue;
|
.bg-blue;
|
||||||
.bn;
|
.bn;
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
"autoprefixer": "postcss -u autoprefixer -r $npm_package_config_outputCss/*.css",
|
"autoprefixer": "postcss -u autoprefixer -r $npm_package_config_outputCss/*.css",
|
||||||
"build": "npm run init && npm-run-all -p build:css build:js copy:fonts",
|
"build": "npm run init && npm-run-all -p build:css build:js copy:fonts",
|
||||||
"build:css": "npm run less -- && npm run autoprefixer",
|
"build:css": "npm run less -- && npm run autoprefixer",
|
||||||
"build:js": "concat -o $npm_package_config_outputJs/site.js ./node_modules/jquery/dist/jquery.js $npm_package_config_jsPath/vendor/*.js $npm_package_config_jsPath/main.js",
|
"build:js": "concat -o $npm_package_config_outputJs/site.js ./node_modules/jquery/dist/jquery.js ./node_modules/highlightjs/highlight.pack.js $npm_package_config_jsPath/vendor/*.js $npm_package_config_jsPath/main.js",
|
||||||
"copy:fonts": "cp -R ./node_modules/font-awesome/fonts/* $npm_package_config_outputFonts",
|
"copy:fonts": "cp -R ./node_modules/font-awesome/fonts/* $npm_package_config_outputFonts",
|
||||||
"dev": "npm run build && npm-run-all -p watch:css watch:js",
|
"dev": "npm run build && npm-run-all -p watch:css watch:js",
|
||||||
"init": "mkdir -p $npm_package_config_outputCss $npm_package_config_outputFonts $npm_package_config_outputJs",
|
"init": "mkdir -p $npm_package_config_outputCss $npm_package_config_outputFonts $npm_package_config_outputJs",
|
||||||
|
@ -25,6 +25,7 @@
|
||||||
"concat": "^1.0.3",
|
"concat": "^1.0.3",
|
||||||
"font-awesome": "^4.7.0",
|
"font-awesome": "^4.7.0",
|
||||||
"graceful-fs": "^4.1.11",
|
"graceful-fs": "^4.1.11",
|
||||||
|
"highlightjs": "^9.10.0",
|
||||||
"jquery.2": "^1.0.0",
|
"jquery.2": "^1.0.0",
|
||||||
"less": "2.7.1",
|
"less": "2.7.1",
|
||||||
"less-plugin-clean-css": "^1.5.1",
|
"less-plugin-clean-css": "^1.5.1",
|
||||||
|
@ -32,7 +33,6 @@
|
||||||
"npm-run-all": "^4.1.1",
|
"npm-run-all": "^4.1.1",
|
||||||
"onchange": "^3.2.1",
|
"onchange": "^3.2.1",
|
||||||
"postcss-cli": "^4.1.1",
|
"postcss-cli": "^4.1.1",
|
||||||
"prismjs": "^1.6.0",
|
|
||||||
"tachyons-less": "^1.0.4"
|
"tachyons-less": "^1.0.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,3 +10,7 @@
|
||||||
{% include 'post/pager' %}
|
{% include 'post/pager' %}
|
||||||
{% include 'post/about-author' %}
|
{% include 'post/about-author' %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block scripts %}
|
||||||
|
<script>hljs.initHighlightingOnLoad();</script>
|
||||||
|
{% endblock %}
|
||||||
|
|
36
yarn.lock
36
yarn.lock
|
@ -298,14 +298,6 @@ cli-spinners@^1.0.0:
|
||||||
version "1.1.0"
|
version "1.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-1.1.0.tgz#f1847b168844d917a671eb9d147e3df497c90d06"
|
resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-1.1.0.tgz#f1847b168844d917a671eb9d147e3df497c90d06"
|
||||||
|
|
||||||
clipboard@^1.5.5:
|
|
||||||
version "1.7.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/clipboard/-/clipboard-1.7.1.tgz#360d6d6946e99a7a1fef395e42ba92b5e9b5a16b"
|
|
||||||
dependencies:
|
|
||||||
good-listener "^1.2.2"
|
|
||||||
select "^1.1.2"
|
|
||||||
tiny-emitter "^2.0.0"
|
|
||||||
|
|
||||||
cliui@^3.2.0:
|
cliui@^3.2.0:
|
||||||
version "3.2.0"
|
version "3.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d"
|
resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d"
|
||||||
|
@ -432,10 +424,6 @@ delayed-stream@~1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
|
resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
|
||||||
|
|
||||||
delegate@^3.1.2:
|
|
||||||
version "3.1.3"
|
|
||||||
resolved "https://registry.yarnpkg.com/delegate/-/delegate-3.1.3.tgz#9a8251a777d7025faa55737bc3b071742127a9fd"
|
|
||||||
|
|
||||||
delegates@^1.0.0:
|
delegates@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a"
|
resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a"
|
||||||
|
@ -725,12 +713,6 @@ globby@^6.1.0:
|
||||||
pify "^2.0.0"
|
pify "^2.0.0"
|
||||||
pinkie-promise "^2.0.0"
|
pinkie-promise "^2.0.0"
|
||||||
|
|
||||||
good-listener@^1.2.2:
|
|
||||||
version "1.2.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/good-listener/-/good-listener-1.2.2.tgz#d53b30cdf9313dffb7dc9a0d477096aa6d145c50"
|
|
||||||
dependencies:
|
|
||||||
delegate "^3.1.2"
|
|
||||||
|
|
||||||
graceful-fs, graceful-fs@^4.1.6:
|
graceful-fs, graceful-fs@^4.1.6:
|
||||||
version "4.1.11"
|
version "4.1.11"
|
||||||
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658"
|
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658"
|
||||||
|
@ -783,6 +765,10 @@ hawk@~3.1.3, hawk@3.1.3:
|
||||||
hoek "2.x.x"
|
hoek "2.x.x"
|
||||||
sntp "1.x.x"
|
sntp "1.x.x"
|
||||||
|
|
||||||
|
highlightjs:
|
||||||
|
version "9.10.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/highlightjs/-/highlightjs-9.10.0.tgz#fca9b78ddaa3b1abca89d6c3ee105ad270a80190"
|
||||||
|
|
||||||
hoek@2.x.x:
|
hoek@2.x.x:
|
||||||
version "2.16.3"
|
version "2.16.3"
|
||||||
resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed"
|
resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed"
|
||||||
|
@ -1459,12 +1445,6 @@ pretty-hrtime@^1.0.3:
|
||||||
version "1.0.3"
|
version "1.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1"
|
resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1"
|
||||||
|
|
||||||
prismjs@^1.6.0:
|
|
||||||
version "1.6.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/prismjs/-/prismjs-1.6.0.tgz#118d95fb7a66dba2272e343b345f5236659db365"
|
|
||||||
optionalDependencies:
|
|
||||||
clipboard "^1.5.5"
|
|
||||||
|
|
||||||
process-nextick-args@~1.0.6:
|
process-nextick-args@~1.0.6:
|
||||||
version "1.0.7"
|
version "1.0.7"
|
||||||
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3"
|
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3"
|
||||||
|
@ -1663,10 +1643,6 @@ safe-buffer@^5.0.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
|
||||||
version "5.1.1"
|
version "5.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853"
|
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853"
|
||||||
|
|
||||||
select@^1.1.2:
|
|
||||||
version "1.1.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/select/-/select-1.1.2.tgz#0e7350acdec80b1108528786ec1d4418d11b396d"
|
|
||||||
|
|
||||||
semver@^5.3.0:
|
semver@^5.3.0:
|
||||||
version "5.4.1"
|
version "5.4.1"
|
||||||
resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e"
|
resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e"
|
||||||
|
@ -1881,10 +1857,6 @@ through@~2.3, through@~2.3.1, through@2:
|
||||||
version "2.3.8"
|
version "2.3.8"
|
||||||
resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"
|
resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"
|
||||||
|
|
||||||
tiny-emitter@^2.0.0:
|
|
||||||
version "2.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/tiny-emitter/-/tiny-emitter-2.0.0.tgz#bad327adb1804b42a231afa741532bd884cd09ad"
|
|
||||||
|
|
||||||
tough-cookie@~2.3.0:
|
tough-cookie@~2.3.0:
|
||||||
version "2.3.1"
|
version "2.3.1"
|
||||||
resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.1.tgz#99c77dfbb7d804249e8a299d4cb0fd81fef083fd"
|
resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.1.tgz#99c77dfbb7d804249e8a299d4cb0fd81fef083fd"
|
||||||
|
|
Loading…
Reference in a new issue