Init
commit
c2aaa68936
|
|
@ -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
|
||||||
|
```
|
||||||
|
{{<hugo-terminal>}}
|
||||||
|
Text to be Rendered in a Terminal Styled Window
|
||||||
|
{{</hugo-terminal>}}
|
||||||
|
```
|
||||||
|
|
@ -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)
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
module git.octolabs.net/Flycro/hugo-terminal
|
||||||
|
|
||||||
|
go 1.22.4
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
<div class="terminal space shadow">
|
||||||
|
<div class="top">
|
||||||
|
<div class="btns">
|
||||||
|
<span class="circle red"></span>
|
||||||
|
<span class="circle yellow"></span>
|
||||||
|
<span class="circle green"></span>
|
||||||
|
</div>
|
||||||
|
<div class="title">bash – {{.Site.Title}}</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="body">
|
||||||
|
{{ highlight .Inner "bash" "" }}
|
||||||
|
</div>
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
Loading…
Reference in New Issue