Add a sample output code block.
This commit is contained in:
parent
893de9a65e
commit
13fab742e5
@ -1,5 +1,6 @@
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="reset.css">
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<script type="text/javascript" src="script.js" defer></script>
|
||||
</head>
|
||||
@ -7,7 +8,6 @@
|
||||
Input org-mode source:<br/>
|
||||
<textarea id="org-input" rows="24" cols="80"></textarea>
|
||||
<hr/>
|
||||
<div id="parse-output" class="code_block">
|
||||
</div>
|
||||
<div id="parse-output" class="code_block" style="padding-left: calc(2ch + 10px); counter-set: code_line_number 0;"><code>This is line 1</code><code class="highlighted">This is line 2</code><code>This is line 3</code></div>
|
||||
</body>
|
||||
</html>
|
||||
|
48
static/reset.css
Normal file
48
static/reset.css
Normal file
@ -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;
|
||||
}
|
@ -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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user