Browse Source

Add new console short code

Functions as a more cool looking verion of <pre>, but I can add whatever
HTML I want in it.
Apis Necros 2 years ago
parent
commit
6826d0492c
2 changed files with 16 additions and 0 deletions
  1. 4 0
      layouts/shortcodes/inConsole.html
  2. 12 0
      static/css/base.css

+ 4 - 0
layouts/shortcodes/inConsole.html

@@ -0,0 +1,4 @@
+<div class="console">
+    <p>~$ {{ .Get "command" }}</p>
+    {{ .Inner | markdownify }}
+</div>

+ 12 - 0
static/css/base.css

@@ -214,4 +214,16 @@
     .blog-post--footer {
         @apply mt-8 p-2 font-mono text-sm border-t border-black;
     }
+
+    /* Console */
+    .console {
+        @apply p-2 bg-black font-mono rounded;
+        color: #00FF00;
+    }
+    .console p {
+        @apply m-0;
+    }
+    .console * {
+        color: inherit;
+    }
 }