From 175fab5477aa833e43472a0c4a9134f495f63960 Mon Sep 17 00:00:00 2001 From: Fabian Tamp Date: Sat, 21 Sep 2019 20:02:23 +0200 Subject: Initial copy of theme from personal website to separate repo --- README.md | 12 + buildscripts/drop-resources.py | 41 +++ config.toml | 10 + layouts/_default/baseof.html | 9 + layouts/_default/list.html | 30 ++ layouts/_default/single.droplist | 3 + layouts/_default/single.html | 28 ++ layouts/index.html | 29 ++ layouts/partials/feature_image.html | 15 + layouts/partials/footer.html | 0 layouts/partials/head.html | 0 layouts/partials/head_includes.html | 7 + layouts/partials/header.html | 31 ++ layouts/partials/meta.html | 28 ++ layouts/partials/right-links.html | 9 + layouts/partials/scripts.html | 0 layouts/partials/twitter_cards_default_small.html | 30 ++ layouts/posts/single.html | 64 ++++ layouts/shortcodes/aside.html | 10 + layouts/shortcodes/expander.html | 18 + layouts/shortcodes/fitfigure.html | 52 +++ layouts/taxonomy/taxonomy.html | 32 ++ layouts/taxonomy/terms.html | 39 +++ static/css/style.css | 407 ++++++++++++++++++++++ static/css/syntax.css | 59 ++++ 25 files changed, 963 insertions(+) create mode 100644 README.md create mode 100755 buildscripts/drop-resources.py create mode 100644 config.toml create mode 100644 layouts/_default/baseof.html create mode 100644 layouts/_default/list.html create mode 100644 layouts/_default/single.droplist create mode 100644 layouts/_default/single.html create mode 100644 layouts/index.html create mode 100644 layouts/partials/feature_image.html create mode 100644 layouts/partials/footer.html create mode 100644 layouts/partials/head.html create mode 100644 layouts/partials/head_includes.html create mode 100644 layouts/partials/header.html create mode 100644 layouts/partials/meta.html create mode 100644 layouts/partials/right-links.html create mode 100644 layouts/partials/scripts.html create mode 100644 layouts/partials/twitter_cards_default_small.html create mode 100644 layouts/posts/single.html create mode 100644 layouts/shortcodes/aside.html create mode 100644 layouts/shortcodes/expander.html create mode 100644 layouts/shortcodes/fitfigure.html create mode 100644 layouts/taxonomy/taxonomy.html create mode 100644 layouts/taxonomy/terms.html create mode 100644 static/css/style.css create mode 100644 static/css/syntax.css diff --git a/README.md b/README.md new file mode 100644 index 0000000..3e540ec --- /dev/null +++ b/README.md @@ -0,0 +1,12 @@ +# capnfabs-lite + +The theme in use on capnfabs.net. + +This _probably_ isn't ready for drop-in production use (hence why it hasn't been published on the Hugo themes site), but it's got a couple of interesting ideas that I wanted to make available for other people to borrow. + +Those features are: + +- A mechanism for excluding source images after they've been processed or resized, and +- Visual differentiation for drafts. + +The explanation for how it all works is in [this blog post](https://capnfabs.net/posts/hugo-theme-exclude-processed-images/), so take a look there for the comprehensive explanation, and what you need to do to integrate these ideas into your own themes. diff --git a/buildscripts/drop-resources.py b/buildscripts/drop-resources.py new file mode 100755 index 0000000..ffe7f50 --- /dev/null +++ b/buildscripts/drop-resources.py @@ -0,0 +1,41 @@ +#!/usr/bin/env python3 +import sys +import os +import pathlib +import typing + +def die(msg): + print(msg) + exit(1) + +def line_to_path(base_path, line): + path = pathlib.Path(base_path, line.lstrip('/')) + return path + +def get_filenames_from_droplist(base_path, path): + lines = path.read_text().strip().splitlines() + return [line_to_path(base_path, line) for line in lines if line] + +def drop_paths(paths, output_dir): + for f in paths: + assert f.is_file() + f.unlink() + print(f"Removed {f.relative_to(output_dir)}") + +def main(): + if len(sys.argv) != 2: + die(f'Usage: {sys.argv[0]} [hugo-output-directory]') + + output_dir = pathlib.Path(sys.argv[1]) + + if not output_dir.is_dir(): + die(f'{output_dir} must be a hugo output directory') + + all_droplists = list(output_dir.rglob('*.droplist')) + all_files_to_drop = [f for droplist in all_droplists for f in get_filenames_from_droplist(output_dir, droplist)] + drop_paths(all_files_to_drop, output_dir) + drop_paths(all_droplists, output_dir) + + +if __name__ == "__main__": + main() diff --git a/config.toml b/config.toml new file mode 100644 index 0000000..eba7dba --- /dev/null +++ b/config.toml @@ -0,0 +1,10 @@ +[mediaTypes] + [mediaTypes."text/droplist"] + suffixes = ["droplist"] + +[outputFormats.droplist] +mediatype = "text/droplist" +isPlainText = true + +[outputs] +page = ["HTML", "droplist"] diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..f32d502 --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,9 @@ + + + {{- partial "head.html" . -}} + + {{- partial "header.html" . -}} +
{{- block "main" . }}{{ -end }}
+ {{- partial "footer.html" . -}} + + diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..dd0b7a3 --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,30 @@ +{{ partial "header.html" . }} + + +
+
+

{{.CurrentSection.Name}}

+ +
+
+ + {{ partial "footer.html" . }} + + diff --git a/layouts/_default/single.droplist b/layouts/_default/single.droplist new file mode 100644 index 0000000..2a67a1d --- /dev/null +++ b/layouts/_default/single.droplist @@ -0,0 +1,3 @@ +{{ with (.Page.Scratch.Get "droplist") }} + {{- range (. | sort | uniq) }}{{.}} +{{end -}}{{end}} diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..f2bfbc2 --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,28 @@ +{{ partial "header.html" . }} + + + + +
+

{{ .Title }}

+
+ {{ .Content }} +
+
+ {{ partial "footer.html" . }} + + diff --git a/layouts/index.html b/layouts/index.html new file mode 100644 index 0000000..42ce451 --- /dev/null +++ b/layouts/index.html @@ -0,0 +1,29 @@ +{{ partial "header.html" . }} + + + +
+
+

{{.Site.Title}}

+ +
+
+ + {{ partial "footer.html" . }} + + + diff --git a/layouts/partials/feature_image.html b/layouts/partials/feature_image.html new file mode 100644 index 0000000..31d2be2 --- /dev/null +++ b/layouts/partials/feature_image.html @@ -0,0 +1,15 @@ +{{/* The featured image, using the same rules as what the twitter cards use. */}} +{{- with $.Params.images -}} + {{- index . 0 | absURL -}} +{{- else -}} + {{- $images := $.Resources.ByType "image" -}} + {{- $featured := $images.GetMatch "*feature*" -}} + {{- $featured := cond (ne $featured nil) $featured ($images.GetMatch "{*cover*,*thumbnail*}") -}} + {{- with $featured -}} + {{- $featured.Permalink -}} + {{- else -}} + {{- with $.Site.Params.images -}} + {{- index . 0 | absURL -}} + {{- end -}} + {{- end -}} +{{- end -}} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000..e69de29 diff --git a/layouts/partials/head.html b/layouts/partials/head.html new file mode 100644 index 0000000..e69de29 diff --git a/layouts/partials/head_includes.html b/layouts/partials/head_includes.html new file mode 100644 index 0000000..cb95b79 --- /dev/null +++ b/layouts/partials/head_includes.html @@ -0,0 +1,7 @@ + + + + + + +{{ template "_internal/google_analytics_async.html" . }} diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100644 index 0000000..d398a7d --- /dev/null +++ b/layouts/partials/header.html @@ -0,0 +1,31 @@ + + + + + + {{ partial "meta.html" . }} + + {{ .Title }} + + + {{/* + Have to explicitly filter to only include the 'RSS' type because we've + defined an RSS2 type as well, and output both of them. The RSS2 type exists + so that we can create a second identical RSS link at /feed.xml (which + apparently people are still subscribed to? Crazy!) - but we only want to + refer to the new feed location here, because that's the canonical one going + forward. + */}} + {{ with .OutputFormats.Get "rss" -}} + {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} + {{ end -}} + + {{ partial "head_includes.html" . }} + + + + diff --git a/layouts/partials/meta.html b/layouts/partials/meta.html new file mode 100644 index 0000000..2dccf74 --- /dev/null +++ b/layouts/partials/meta.html @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + +{{ with.Description }} +{{ end }} + + +{{ template "_internal/opengraph.html" . }} + + +{{ partial "twitter_cards_default_small.html" . }} + +{{ template "_internal/schema.html" . }} diff --git a/layouts/partials/right-links.html b/layouts/partials/right-links.html new file mode 100644 index 0000000..fd318ea --- /dev/null +++ b/layouts/partials/right-links.html @@ -0,0 +1,9 @@ + diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html new file mode 100644 index 0000000..e69de29 diff --git a/layouts/partials/twitter_cards_default_small.html b/layouts/partials/twitter_cards_default_small.html new file mode 100644 index 0000000..946a5fa --- /dev/null +++ b/layouts/partials/twitter_cards_default_small.html @@ -0,0 +1,30 @@ +{{/* This is a modified copy/paste of https://github.com/gohugoio/hugo/blob/2b73e89d6d2822e86360a6c92c87f539677c119b/tpl/tplimpl/embedded/templates/twitter_cards.html */}} +{{- with $.Params.images -}} + + +{{ else -}} +{{- $images := $.Resources.ByType "image" -}} +{{- $featured := $images.GetMatch "*feature*" -}} +{{- $featured := cond (ne $featured nil) $featured ($images.GetMatch "{*cover*,*thumbnail*}") -}} +{{- with $featured -}} + + +{{- else -}} +{{- with $.Site.Params.images -}} + + +{{ else -}} + +{{- end -}} +{{- end -}} +{{- end }} + + +{{ with .Site.Social.twitter -}} + +{{ end -}} +{{ range .Site.Authors }} +{{ with .twitter -}} + +{{ end -}} +{{ end -}} diff --git a/layouts/posts/single.html b/layouts/posts/single.html new file mode 100644 index 0000000..9fefe2a --- /dev/null +++ b/layouts/posts/single.html @@ -0,0 +1,64 @@ +{{ partial "header.html" . }} + + + + + + + +
+

{{ .Title }}

+ + {{ if .Params.tags }} + + {{ end }} + {{ if eq .Lastmod .Date }} + + + {{ else }} + + + {{ end }} +
+ {{ .Content }} +
+
+ + + {{ partial "footer.html" . }} + + diff --git a/layouts/shortcodes/aside.html b/layouts/shortcodes/aside.html new file mode 100644 index 0000000..601e50b --- /dev/null +++ b/layouts/shortcodes/aside.html @@ -0,0 +1,10 @@ +{{ $_hugo_config := `{ "version": 1 }` }} + +
+{{- .Inner -}} +
diff --git a/layouts/shortcodes/expander.html b/layouts/shortcodes/expander.html new file mode 100644 index 0000000..d19e153 --- /dev/null +++ b/layouts/shortcodes/expander.html @@ -0,0 +1,18 @@ +{{ $_hugo_config := `{ "version": 1 }` }} + + +
+{{ $radioGroup := anchorize (.Get "title") }} +

{{ .Get "title" }}

+ + + +
+{{ .Inner }} +
+
diff --git a/layouts/shortcodes/fitfigure.html b/layouts/shortcodes/fitfigure.html new file mode 100644 index 0000000..78650e5 --- /dev/null +++ b/layouts/shortcodes/fitfigure.html @@ -0,0 +1,52 @@ +{{- $path := (.Get "src") -}} +{{- $original := .Page.Resources.GetMatch $path -}} +{{- if not $original -}} + {{- errorf "couldn't find resource for src: %s" $path -}} +{{- else if and ((ne "jpg" $original.MediaType.SubType) (ne "png" $original.MediaType.SubType)) -}} + {{- errorf "src %s is a %s, expected image/jpg or image/png" $path $original.MediaType -}} +{{- else -}} + {{- /* Below is a copy paste of "_internal/shortcodes/figure.html" from Hugo commit aba2647c152ffff927f42523b77ee6651630cd67, with the img tag modified to use srcsets */ -}} + + {{- if .Get "link" -}} + + {{- end }} + {{ if (or (ge $original.Width 1304) (ge $original.Height 1304)) -}} + {{/* Add the original to the droplist, so it will get removed later. */}} + {{- if not (.Page.Scratch.Get "droplist") -}} + {{- .Page.Scratch.Set "droplist" (slice) -}} + {{- end -}} + {{- .Page.Scratch.Add "droplist" $original.RelPermalink -}} + {{/* Note: 652px is the max width of an img in article content. I measured this using dev tools; but it's dependent on the styles for the page. */}} + {{- $resized_1x := $original.Fit "652x652 q95" -}} + {{- $resized_2x := $original.Fit "1304x1304 q95" -}} + {{ with .Get + {{- if .Get "link" }}{{ end -}} + {{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}} +
+ {{ with (.Get "title") -}} +

{{ . }}

+ {{- end -}} + {{- if or (.Get "caption") (.Get "attr") -}}

+ {{- .Get "caption" | markdownify -}} + {{- with .Get "attrlink" }} + + {{- end -}} + {{- .Get "attr" | markdownify -}} + {{- if .Get "attrlink" }}{{ end }}

+ {{- end }} +
+ {{- end }} + +{{- end -}} diff --git a/layouts/taxonomy/taxonomy.html b/layouts/taxonomy/taxonomy.html new file mode 100644 index 0000000..5958214 --- /dev/null +++ b/layouts/taxonomy/taxonomy.html @@ -0,0 +1,32 @@ +{{ partial "header.html" . }} + + + +
+
+

{{.Data.Term}}

+ +
+
+ + {{ partial "footer.html" . }} + + diff --git a/layouts/taxonomy/terms.html b/layouts/taxonomy/terms.html new file mode 100644 index 0000000..e11461a --- /dev/null +++ b/layouts/taxonomy/terms.html @@ -0,0 +1,39 @@ +{{ partial "header.html" . }} + + + +
+
+

{{.Data.Plural}}

+ +
+
+ + {{ partial "footer.html" . }} + + diff --git a/static/css/style.css b/static/css/style.css new file mode 100644 index 0000000..eddf8e8 --- /dev/null +++ b/static/css/style.css @@ -0,0 +1,407 @@ +body { + -webkit-font-smoothings: antialiased; + -moz-osx-font-smoothing: grayscale; + text-rendering: optimizeLegibility; +} + +code { + padding: 2px 4px; + font-size: 90%; + background-color: #eeeeee; + hyphens: none; /* reset changes from

*/ + /* border-radius: 4px; */ +} + +/* Reset these values when there's code inside a pre. Pre handles the styling then.*/ +pre code { + background-color: transparent; + padding: 0; +} + +pre { + display: block; + padding: 9.5px; + margin: 0 0 10px; + line-height: 1.4; + word-break: break-all; + word-wrap: break-word; + border: 1px solid #ccc; + box-shadow: 0 5px 5px -5px #777777; + max-width: 100%; + /* These two copied from chroma theme (syntax.css) */ + color: #f8f8f2; + background-color: #272822; +} + +pre, +code { + font-family: monocode, monospace; + -webkit-font-smoothings: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +h1,h2,h3,h4,h5,h6 { + font-family: 'Lora', serif; +} + +h1#title { + /*Some UA stylesheets put h1 to 1.5em when in an article, so we reset it back for our title here.*/ + font-size: 2em; +} + +body { + font-family: -apple-system,BlinkMacSystemFont,avenir next,avenir,helvetica neue,helvetica,ubuntu,roboto,noto,segoe ui,arial,sans-serif; +} + +.content-container { + padding-left: 1em; + padding-right: 1em; +} + +.content-container-narrow-pad { + padding: 0.5em; +} + +.v-center { + align-items: center; +} + +.look-sheet-bkg { + background-color: white; +} + +@media(min-width: 720px) { + .content-container { + /* ACHTUNG: + Images are scaled in the fitfigure shortcode with an assumption that the + page is 652px wide. If you change this value, remeasure and change the value + there too. */ + width: 45rem; + padding-left: 2em; + padding-right: 2em; + margin: 0 auto; + } + + .content-container-narrow-pad { + padding-left: 0.5em; + padding-right: 0.5em; + width: 45rem; + margin: 0 auto; + } + + .bottom-links { + border: 1px solid #ccc; + border-bottom: 0px; + } + + .look-sheet { + border: 1px solid #ccc; + box-shadow: 0 5px 5px -5px #777777; + margin-top: 1em; + margin-bottom: 1em; + min-height: 0px; + background-color: white; + } + + .look-sheet-bkg { + background-color: #fffdf7; + } +} + +.look-sheet-always { + border: 1px solid #ccc; + box-shadow: 0 5px 5px -5px #777777; + margin-top: 1em; + margin-bottom: 1em; + min-height: 0px; + background-color: white; +} + +.article-pad-v { + padding-top: 1em; + padding-bottom: 1em; +} + +blockquote { + border-left: #777 0.25em solid; + padding: 0 1.25em; + margin: 2em 0 2em 1em; +} + +.nav-bkg { + color: white; + box-shadow: 0 5px 5px -5px #777777; + background: #00223E; /* fallback for old browsers */ + background: -webkit-linear-gradient(135deg, #00223E 80%, #FFA17F 80%); /* Chrome 10-25, Safari 5.1-6 */ + background: linear-gradient(135deg, #00223E 80%, #FFA17F 80%); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */ +} + +.nav-bkg-50 { + color: white; + box-shadow: 0 5px 5px -5px #777777; + background: #00223E; /* fallback for old browsers */ + background: -webkit-linear-gradient(135deg, #00223E 50%, #FFA17F 50%); /* Chrome 10-25, Safari 5.1-6 */ + background: linear-gradient(135deg, #00223E 50%, #FFA17F 50%); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */ +} + +.nav-bkg a { + text-decoration: underline; +} + +.pagewide-bar-padding { + padding: 0.5em 1em; +} + +nav a, nav a:hover, nav a:visited { + color: white; +} + +.post-date { + font-size: 0.875em; + color: #777; +} + +.post-tags, .post-tags a, .post-tags a:hover, .post-tags a:visited { + color: #777; +} + +.margin-top-2em { + margin-top: 2em; +} + +.article-body h2,.article-body h3 { + margin-top: 2em; + margin-bottom: 0.5em; +} + +kbd { + background-color: #333; + color: #fff; + padding: 2px 4px; + border-radius: 4px; + font-size: 95%; + white-space: nowrap; +} + +figure { + margin: 2em auto; + display: table; +} + +figure:not(.no-border) video, figure:not(.no-border) img { + border: 1px solid #ccc; + box-shadow: 0 5px 5px -5px #777777; + max-width: 100%; + background-color: white; +} + +body { + background-color: #fffdf7; +} + +figcaption { + margin-top: 0.75em; + font-style: italic; + text-align: center; + font-size: 0.75em; + color: #5e5e5e; +} + +/* +The figure is handling the margin here, its last child doesn't need to. +This is a side-effect of using display: table on figure. This is gross and +will have side-effects if you have multiple nested elements under the figcaption I think. +*/ +figure figcaption :last-child { + margin-bottom: 0; +} + +.footnotes { + margin-top: 4em; + font-size: 85%; +} + +.footnotes hr { + margin-bottom: 1em; +} + +.footnotes li { + margin: 0 0 12px; +} + +twitter-widget { + /* + Have to use important here because the twitter oembed puts the styles in the + style attribute. + */ + margin: 2em auto !important; +} + +.list-unstyled { + padding-left: 0; + margin-bottom: 0; + list-style: none; +} + +.flex-row { + display: flex; + justify-content: space-between; +} + +a.no-underline:hover { + text-decoration: none; +} + +a.no-underline:hover .re-underline { + text-decoration: underline; +} + +.list-of-titles .post-title { + color: black; + font-size: 1.5em; +} +.list-of-titles li a { + text-decoration: none; + display: block; + padding: 1em; + border-bottom: 1px solid #ccc; + /* hacks so that the text doesn't move unintentionally */ + border-left: 1px solid transparent; + border-right: 1px solid transparent; +} + +.list-of-titles li a:hover { + background-color: white; + border-left: 1px solid #ccc; + border-right: 1px solid #ccc; + box-shadow: 0 5px 5px -5px #777777; +} + +.list-of-titles li a:hover .post-title { + text-decoration: underline; +} + +.list-of-titles li:first-child a { + border-top: 1px solid #ccc; +} + +.list-of-titles .post-meta { + font-size: 0.875em; + color: #777; +} + +ul.right-links { + display: none; + float: right; +} +ul.right-links li { + display: inline-block; + margin-right: 1em; +} + +@media(min-width: 440px) { + ul.right-links { + display: block; + } +} + +.embed.rich, img { + max-width: 100%; +} + +p { + hyphens: auto; +} + +.look-sheet-bkg.draft, .list-of-titles li.draft a:hover { + background: repeating-linear-gradient( 135deg, white, white 10px, #ffd4a3 12px, #ffd4a3 12px ); +} + +.list-of-titles li.draft { + background: repeating-linear-gradient( 135deg, #fffdf7, #fffdf7 10px, #ffd4a3 12px, #ffd4a3 12px ); +} + +.post-meta.draft { + font-weight: bold; +} + +.text-1p5 { + font-size: 1.5em; +} + +.text-0p75 { + font-size: 0.75em; +} + +.aside { + background-color: #fffdf7; + padding: 0 1em; + margin-top: 3em; +} + +.aside h2:first-child { + margin-top: 0.5em; + margin-bottom: 0.5em; +} + +.expander { + background-color: #fffdf7; + padding: 0 1em; + position: relative; /* anchor for the buttons */ +} + +.expander h2:first-child { + margin-top: 0.5em; + margin-bottom: 0.5em; +} + +.expander .button { + display: inline-block; + font-weight: 400; + text-align: center; + vertical-align: middle; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + background-color: transparent; + line-height: 1.5; + border-radius: .25rem; + font-family: -apple-system,BlinkMacSystemFont,avenir next,avenir,helvetica neue,helvetica,ubuntu,roboto,noto,segoe ui,arial,sans-serif; + padding: .25rem .75rem; + font-size: .875rem; + + color: white; + box-shadow: 0 5px 5px -5px #777777; + background: #00223E; /* fallback for old browsers */ + background: -webkit-linear-gradient(135deg, #00223E 85%, #FFA17F 85%); /* Chrome 10-25, Safari 5.1-6 */ + background: linear-gradient(135deg, #00223E 85%, #FFA17F 85%); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */ +} + +.expander .button { + position: absolute; + top: 0; + right: 0; + margin-right: 1em; + margin-top: 1em; +} + +.hidden { + display: none; +} + +.expander input.show:checked ~ .inner { + display:block; +} + +.expander input.hide:checked ~ .inner { + display: none; +} + +.expander input.show:checked ~ .button-show { + display: none; +} + +.expander input.hide:checked ~ .button-hide { + display: none; +} diff --git a/static/css/syntax.css b/static/css/syntax.css new file mode 100644 index 0000000..350286e --- /dev/null +++ b/static/css/syntax.css @@ -0,0 +1,59 @@ +/* Background */ .chroma { color: #f8f8f2; background-color: #272822 } +/* Error */ .chroma .err { color: #960050; background-color: #1e0010 } +/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; } +/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; } +/* LineHighlight */ .chroma .hl { display: block; width: 100%;background-color: #ffffcc } +/* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } +/* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } +/* Keyword */ .chroma .k { color: #66d9ef } +/* KeywordConstant */ .chroma .kc { color: #66d9ef } +/* KeywordDeclaration */ .chroma .kd { color: #66d9ef } +/* KeywordNamespace */ .chroma .kn { color: #f92672 } +/* KeywordPseudo */ .chroma .kp { color: #66d9ef } +/* KeywordReserved */ .chroma .kr { color: #66d9ef } +/* KeywordType */ .chroma .kt { color: #66d9ef } +/* NameAttribute */ .chroma .na { color: #a6e22e } +/* NameClass */ .chroma .nc { color: #a6e22e } +/* NameConstant */ .chroma .no { color: #66d9ef } +/* NameDecorator */ .chroma .nd { color: #a6e22e } +/* NameException */ .chroma .ne { color: #a6e22e } +/* NameFunction */ .chroma .nf { color: #a6e22e } +/* NameOther */ .chroma .nx { color: #a6e22e } +/* NameTag */ .chroma .nt { color: #f92672 } +/* Literal */ .chroma .l { color: #ae81ff } +/* LiteralDate */ .chroma .ld { color: #e6db74 } +/* LiteralString */ .chroma .s { color: #e6db74 } +/* LiteralStringAffix */ .chroma .sa { color: #e6db74 } +/* LiteralStringBacktick */ .chroma .sb { color: #e6db74 } +/* LiteralStringChar */ .chroma .sc { color: #e6db74 } +/* LiteralStringDelimiter */ .chroma .dl { color: #e6db74 } +/* LiteralStringDoc */ .chroma .sd { color: #e6db74 } +/* LiteralStringDouble */ .chroma .s2 { color: #e6db74 } +/* LiteralStringEscape */ .chroma .se { color: #ae81ff } +/* LiteralStringHeredoc */ .chroma .sh { color: #e6db74 } +/* LiteralStringInterpol */ .chroma .si { color: #e6db74 } +/* LiteralStringOther */ .chroma .sx { color: #e6db74 } +/* LiteralStringRegex */ .chroma .sr { color: #e6db74 } +/* LiteralStringSingle */ .chroma .s1 { color: #e6db74 } +/* LiteralStringSymbol */ .chroma .ss { color: #e6db74 } +/* LiteralNumber */ .chroma .m { color: #ae81ff } +/* LiteralNumberBin */ .chroma .mb { color: #ae81ff } +/* LiteralNumberFloat */ .chroma .mf { color: #ae81ff } +/* LiteralNumberHex */ .chroma .mh { color: #ae81ff } +/* LiteralNumberInteger */ .chroma .mi { color: #ae81ff } +/* LiteralNumberIntegerLong */ .chroma .il { color: #ae81ff } +/* LiteralNumberOct */ .chroma .mo { color: #ae81ff } +/* Operator */ .chroma .o { color: #f92672 } +/* OperatorWord */ .chroma .ow { color: #f92672 } +/* Comment */ .chroma .c { color: #75715e } +/* CommentHashbang */ .chroma .ch { color: #75715e } +/* CommentMultiline */ .chroma .cm { color: #75715e } +/* CommentSingle */ .chroma .c1 { color: #75715e } +/* CommentSpecial */ .chroma .cs { color: #75715e } +/* CommentPreproc */ .chroma .cp { color: #75715e } +/* CommentPreprocFile */ .chroma .cpf { color: #75715e } +/* GenericDeleted */ .chroma .gd { color: #f92672 } +/* GenericEmph */ .chroma .ge { font-style: italic } +/* GenericInserted */ .chroma .gi { color: #a6e22e } +/* GenericStrong */ .chroma .gs { font-weight: bold } +/* GenericSubheading */ .chroma .gu { color: #75715e } -- cgit v1.2.3