Support light&dark syntax on code blocks.

This commit is contained in:
Sergio Martínez Portela 2022-11-15 21:20:25 +01:00
parent fe052d3468
commit b9ac52a1a9
3 changed files with 14 additions and 4 deletions

3
.gitignore vendored
View File

@ -1 +1,2 @@
_gen
_gen
static/syntax.css

View File

@ -609,7 +609,7 @@ def render_as_document(headline, doc, headlineLevel, graph, title):
<title>{title} @ {SITE_NAME}</title>
<meta http-equiv="refresh" content="0;./{topLevelHeadline.id}.node.html#{headline.id}" />
<link href="../static/style.css" rel="stylesheet"/>
<link href="../static/light-syntax.css" rel="stylesheet"/>
<link href="../static/syntax.css" rel="stylesheet"/>
</head>
<body>
<nav>
@ -699,7 +699,7 @@ def as_document(html, title):
<meta charset="utf-8">
<title>{title} @ {SITE_NAME}</title>
<link href="../static/style.css" rel="stylesheet"/>
<link href="../static/light-syntax.css" rel="stylesheet"/>
<link href="../static/syntax.css" rel="stylesheet"/>
<script type="text/javascript">
function toggle_expand(header_id) {{
var e = document.getElementById(header_id);

View File

@ -265,6 +265,11 @@ pre code {
color: #000;
border: none;
font-size: 85%;
border-radius: 4px;
}
.highlight pre {
padding: 0.5ex;
}
code {
@ -426,6 +431,10 @@ tr.__table-separator {
}
/* Code blocks */
.highlight pre {
padding: 1ex;
background-color: #262826;
}
pre {
padding: 0.5ex;
background-color: inherit;
@ -435,7 +444,7 @@ tr.__table-separator {
padding: 1ex;
font-size: medium;
border: none;
background: #000;
background: #262826;
color: #fff;
}