From 13fab742e5dd5181a7092084f05726fd22290ca6 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Fri, 18 Aug 2023 16:19:37 -0400 Subject: [PATCH] Add a sample output code block. --- static/index.html | 4 ++-- static/reset.css | 48 +++++++++++++++++++++++++++++++++++++++++++++++ static/style.css | 32 +++++++++++++++++++++++++++++++ 3 files changed, 82 insertions(+), 2 deletions(-) create mode 100644 static/reset.css diff --git a/static/index.html b/static/index.html index 5564d9f..feeb983 100644 --- a/static/index.html +++ b/static/index.html @@ -1,5 +1,6 @@ + @@ -7,7 +8,6 @@ Input org-mode source:

-
-
+
This is line 1This is line 2This is line 3
diff --git a/static/reset.css b/static/reset.css new file mode 100644 index 0000000..56af891 --- /dev/null +++ b/static/reset.css @@ -0,0 +1,48 @@ +/* http://meyerweb.com/eric/tools/css/reset/ + v2.0 | 20110126 + License: none (public domain) +*/ + +html, body, div, span, applet, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, big, cite, code, +del, dfn, em, img, ins, kbd, q, s, samp, +small, strike, strong, sub, sup, tt, var, +b, u, i, center, +dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td, +article, aside, canvas, details, embed, +figure, figcaption, footer, header, hgroup, +menu, nav, output, ruby, section, summary, +time, mark, audio, video { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; +} +/* HTML5 display-role reset for older browsers */ +article, aside, details, figcaption, figure, +footer, header, hgroup, menu, nav, section { + display: block; +} +body { + line-height: 1; +} +ol, ul { + list-style: none; +} +blockquote, q { + quotes: none; +} +blockquote:before, blockquote:after, +q:before, q:after { + content: ''; + content: none; +} +table { + border-collapse: collapse; + border-spacing: 0; +} diff --git a/static/style.css b/static/style.css index e69de29..3822e6a 100644 --- a/static/style.css +++ b/static/style.css @@ -0,0 +1,32 @@ +.code_block { + font: 14px/1.4 "Cascadia Mono", monospace; + background: #272822ff; + color: #f8f8f2ff; + display: table; + white-space: break-spaces; + padding: 5px; + + /* color for line numbers */ +} + +.code_block > code { + display: table; + counter-increment: code_line_number; +} + +.code_block > code::before { + content: counter(code_line_number) " "; + display: inline-block; + position: absolute; + transform: TranslateX(-100%); + padding-right: 5px; + color: #eeeeee; +} + +.code_block > code.highlighted { + background: #307351ff; +} + +.code_block > code.highlighted::before { + background: #307351ff; +}