From 683a196fbe37f7fc78865930b94c05dfd08a8a01 Mon Sep 17 00:00:00 2001 From: Joe Wroten Date: Sat, 29 Dec 2018 21:07:38 -0600 Subject: [PATCH] Code highlighting, font adjustments, desktop fixes --- src/assets/highlightjs-dracula.css | 79 ++++++++++++++++++++++++++++++ src/assets/stylesheet.css | 23 +++++++-- src/templates/interior.hbs | 12 +++-- 3 files changed, 107 insertions(+), 7 deletions(-) create mode 100755 src/assets/highlightjs-dracula.css diff --git a/src/assets/highlightjs-dracula.css b/src/assets/highlightjs-dracula.css new file mode 100755 index 0000000..3d01e12 --- /dev/null +++ b/src/assets/highlightjs-dracula.css @@ -0,0 +1,79 @@ +/* Dracula Theme v1.2.5 + * + * https://github.com/dracula/highlightjs + * + * Copyright 2016-present, All rights reserved + * + * Code licensed under the MIT license + * + * @author Denis Ciccale + * @author Zeno Rocha + */ + +.hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #282a36; +} + +.hljs-built_in, +.hljs-selector-tag, +.hljs-section, +.hljs-link { + color: #8be9fd; +} + +.hljs-keyword { + color: #ff79c6; +} + +.hljs, +.hljs-subst { + color: #f8f8f2; +} + +.hljs-title { + color: #50fa7b; +} + +.hljs-string, +.hljs-meta, +.hljs-name, +.hljs-type, +.hljs-attr, +.hljs-symbol, +.hljs-bullet, +.hljs-addition, +.hljs-variable, +.hljs-template-tag, +.hljs-template-variable { + color: #f1fa8c; +} + +.hljs-comment, +.hljs-quote, +.hljs-deletion { + color: #6272a4; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-literal, +.hljs-title, +.hljs-section, +.hljs-doctag, +.hljs-type, +.hljs-name, +.hljs-strong { + font-weight: bold; +} + +.hljs-literal, +.hljs-number { + color: #bd93f9; +} + +.hljs-emphasis { + font-style: italic; +} diff --git a/src/assets/stylesheet.css b/src/assets/stylesheet.css index d18f51b..81d9685 100644 --- a/src/assets/stylesheet.css +++ b/src/assets/stylesheet.css @@ -1,7 +1,12 @@ html, body { padding: 0; margin: 0; - font-family: 'Open Sans', sans-serif; + font-family: 'Source Sans Pro', sans-serif; + font-size: 15pt; +} + +code { + font-family: 'Source Code Pro', monospace; } h1, h2, h3, h4, h5, h6 { @@ -22,6 +27,11 @@ h1 { padding-bottom: 20px; } +.-container { + max-width: 40rem; + margin: 0 auto; +} + .interior-header { background: #15202C; } @@ -31,12 +41,15 @@ h1 { } .interior-headline { - line-height: 1em; - margin: 0; background: linear-gradient(90deg, rgba(235, 181, 242, .3), rgba(128, 95, 132, .3)); color: white; } +.interior-headline h1 { + line-height: 1em; + margin: 0 auto; +} + .interior-content h1:first-child { display: none; speak: none; @@ -46,8 +59,10 @@ h1 { margin-top: 0; } -.interior-content code { +.interior-content pre code { + border-radius: 3px; max-width: 100%; + max-height: 6em; display: block; overflow: auto; } diff --git a/src/templates/interior.hbs b/src/templates/interior.hbs index c4ca118..aeb91a1 100644 --- a/src/templates/interior.hbs +++ b/src/templates/interior.hbs @@ -4,7 +4,8 @@ Wroten - {{name}} - + + @@ -17,10 +18,15 @@
...
-

{{name}}

+
+

{{name}}

+
-
+
{{{readme.html}}}
+ + +