diff --git a/.gitignore b/.gitignore index 96e0abb..551cd43 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .DS_Store public -resources \ No newline at end of file +resources +.hugo_build.lock \ No newline at end of file diff --git a/assets/sass/main.scss b/assets/sass/main.scss index 8e948e0..4f1b1a5 100644 --- a/assets/sass/main.scss +++ b/assets/sass/main.scss @@ -51,7 +51,7 @@ h5 { } p { - line-height: 1.8; + line-height: 1.6; text-align: justify; } @@ -62,8 +62,10 @@ hr { pre, code { + overflow: auto hidden; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 13px; + line-height: 1.3; } .minima-tag, diff --git a/assets/sass/syntax.scss b/assets/sass/syntax.scss index 4cd165b..086182d 100644 --- a/assets/sass/syntax.scss +++ b/assets/sass/syntax.scss @@ -1,14 +1,5 @@ -pre[class*="language-"], -code[class*="language-"] { +.chroma code { color: #d4d4d4; - font-size: 13px; - text-shadow: none; - font-family: Menlo, Monaco, Consolas, "Courier New", monospace; - line-height: 1.5; -} - -pre { - line-height: 1.5; } .chroma { @@ -24,29 +15,30 @@ pre { border: 0; } -.chroma .lntable { - border-spacing: 0; - padding: 0; - margin: 0; - border: 0; - width: auto; - overflow: auto; - display: block; -} - .chroma .lntable tbody { border: 0; } +.chroma .lntable td:nth-child(2) { + width: 100%; +} + +.chroma .lnt, +.chroma .line { + display: block; + line-height: 1.3; +} + /* LineNumbersTable */ .chroma .lnt { color: #999; - display: block; padding-left: .9em; padding-right: 1em; text-align: right; - line-height: 1.5; - font-size: 13px; +} + +.chroma .hl .lnt { + display: inline; } /* Keyword */ @@ -143,3 +135,8 @@ pre { color: #c586c0; } +.chroma .hl { + display: block; + background-color: #585858; +} + diff --git a/exampleSite/content/markdown-syntax.md b/exampleSite/content/markdown-syntax.md index 8fedb1d..08e41f5 100644 --- a/exampleSite/content/markdown-syntax.md +++ b/exampleSite/content/markdown-syntax.md @@ -96,7 +96,7 @@ Tables aren't part of the core Markdown spec, but Hugo supports supports them ou #### Code block with Golang -```go +```go {hl_lines=[3]} type Registry interface { Register(*Service, ...RegisterOption) error Deregister(*Service, ...DeregisterOption) error