diff --git a/site/src/components/code-block.js b/site/src/components/code-block.js index 22e163c..a518d5a 100644 --- a/site/src/components/code-block.js +++ b/site/src/components/code-block.js @@ -2,6 +2,7 @@ class CodeBlockComponent extends HTMLElement { connectedCallback() { const trimmed = this.innerHTML.trim(); const lang = this.getAttribute("language"); + const inline = this.getAttribute("inline") !== null; this.innerHTML = `
${trimmed}
@@ -28,6 +29,13 @@ class CodeBlockComponent extends HTMLElement {
borderRadius: '5px'
};
+ console.log('>>> inline', inline, this)
+
+ if (inline) {
+ style.display = 'inline';
+ style.padding = '0.3em';
+ }
+
Object.keys(style).forEach((rule) => {
pre.style[rule] = style[rule];
});
diff --git a/site/src/components/my-head.html b/site/src/components/my-head.html
index 0e3c1d0..2b1aa90 100644
--- a/site/src/components/my-head.html
+++ b/site/src/components/my-head.html
@@ -1,8 +1,7 @@
- This custom 404 page is possible in McFly by adding a