commit c2aaa689361794e378096fa5838714831ef2752f Author: Flycro <48244006+Flycro@users.noreply.github.com> Date: Fri Jul 12 20:24:21 2024 +0200 Init diff --git a/README.md b/README.md new file mode 100644 index 0000000..3b45609 --- /dev/null +++ b/README.md @@ -0,0 +1,22 @@ +# Hugo Terminal + +Simple Module to display a Terminal Styled Code Block. The Highlighter is set to Bash. + +## Install +`./config/_default/module.toml` +``` +[[imports]] +path = "https://git.octolabs.net/Flycro/hugo-terminal" +``` + +`assets\scss\custom.scss` +```css +@import 'hugo-terminal'; +``` + +## Usage +``` +{{}} +Text to be Rendered in a Terminal Styled Window +{{}} +``` \ No newline at end of file diff --git a/assets/scss/hugo-terminal.scss b/assets/scss/hugo-terminal.scss new file mode 100644 index 0000000..27ee045 --- /dev/null +++ b/assets/scss/hugo-terminal.scss @@ -0,0 +1,73 @@ +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +.terminal { + border-radius: 5px 5px 0 0; + display: flex; + flex-direction: column; + + margin: 25px auto; +} + +.terminal .top { + background: #E8E6E8; + color: black; + padding: 5px; + border-radius: 5px 5px 0 0; + display: flex; + justify-content: center; + align-items: center; + position: relative; +} + +.terminal .btns { + position: absolute; + left: 5px; + display: flex; +} + +.terminal .circle { + width: 14px; + height: 14px; + border-radius: 50%; + margin-right: 4px; +} + +.title { + flex-grow: 1; + text-align: center; +} + +.red { + background: #EC6A5F; + border-color: #D04E42; +} + +.green { + background: #64CC57; + border-color: #4EA73B; +} + +.yellow { + background: #F5C04F; + border-color: #D6A13D; +} + +.terminal .body { + padding: 8px; + overflow: auto; + flex-grow: 1; + margin: 0; + width: 100%; +} + +.terminal .body .highlight { + padding: 0 4rem 0 4rem; +} + +.shadow { + box-shadow: 0px 0px 10px rgba(0,0,0,.4) +} \ No newline at end of file diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..931d2d3 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module git.octolabs.net/Flycro/hugo-terminal + +go 1.22.4 diff --git a/layouts/shortcodes/hugo-terminal.html b/layouts/shortcodes/hugo-terminal.html new file mode 100644 index 0000000..3df9d56 --- /dev/null +++ b/layouts/shortcodes/hugo-terminal.html @@ -0,0 +1,18 @@ +
+
+
+ + + +
+
bash – {{.Site.Title}}
+
+
+ +
+
+ {{ highlight .Inner "bash" "" }} +
+ + +
\ No newline at end of file