Add 'code' block

This commit is contained in:
Michael Fabian 'Xaymar' Dirks
2022-01-12 21:46:43 +01:00
parent 8f4bb9ddf5
commit b6d9f52fef
3 changed files with 38 additions and 17 deletions
+4
View File
@@ -0,0 +1,4 @@
{% capture content %}
<code class="content">{{ include.content }}</code>
{% endcapture %}
{% include blocks/_base.liquid type="code" content=content float=include.float align=include.align %}
+33
View File
@@ -0,0 +1,33 @@
// --------------------------------------------------------------------------------
// Block: Code
// --------------------------------------------------------------------------------
.block-code {
padding: .2rem;
background: $theme-code-background;
font-size: 0.9em;
}
.block-code > .content {
display: block;
padding: .25rem;
max-height: 10em;
font-family: monospace;
font-size: 0.9em;
line-height: 1.25em;
white-space: pre;
overflow: auto;
}
// --------------------------------------------------------------------------------
// Inline: Code
// --------------------------------------------------------------------------------
.inline-code {
margin: 0;
padding: 0;
background: $theme-code-background;
font-size: 0.9em;
font-family: monospace;
font-size: 1em;
line-height: 1.25em;
white-space: pre;
}
+1 -17
View File
@@ -99,26 +99,10 @@
padding: .2em 0 0 0;
}
// --------------------------------------------------------------------------------
// Block: Code
// --------------------------------------------------------------------------------
.block-code {
padding: .2rem;
background: $theme-code-background;
font-size: 0.9em;
}
.inline-code {
margin: 0;
padding: 0;
background: $theme-code-background;
font-size: 0.9em;
}
// --------------------------------------------------------------------------------
// Specialized Blocks
// --------------------------------------------------------------------------------
@import "_block-code.scss";
@import "_block-columns.scss";
@import "_block-details.scss";
@import "_block-heading.scss";