mirror of
https://github.com/gethinode/hinode.git
synced 2025-10-10 19:43:11 +00:00
Address linting errors
This commit is contained in:
@@ -1,43 +1,43 @@
|
|||||||
/* Adapted from PrismJS 1.29.0
|
/* Adapted from PrismJS 1.29.0
|
||||||
https://prismjs.com/download.html#themes=prism&plugins=command-line */
|
https://prismjs.com/download.html#themes=prism&plugins=command-line */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* prism.js default theme for JavaScript, CSS and HTML
|
* prism.js default theme for JavaScript, CSS and HTML
|
||||||
* Based on dabblet (http://dabblet.com)
|
* Based on dabblet (http://dabblet.com)
|
||||||
* @author Lea Verou
|
* @author Lea Verou
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.command-line-prompt {
|
.command-line-prompt {
|
||||||
border-right: 1px solid #999;
|
border-right: 1px solid #999;
|
||||||
display: block;
|
display: block;
|
||||||
float: left;
|
float: left;
|
||||||
font-size: 100%;
|
font-size: 100%;
|
||||||
letter-spacing: -1px;
|
letter-spacing: -1px;
|
||||||
margin-right: 1em;
|
margin-right: 1em;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
-webkit-user-select: none;
|
||||||
-webkit-user-select: none;
|
-moz-user-select: none;
|
||||||
-moz-user-select: none;
|
-ms-user-select: none;
|
||||||
-ms-user-select: none;
|
user-select: none;
|
||||||
user-select: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.command-line-prompt > span:before {
|
.command-line-prompt > span::before {
|
||||||
opacity: 0.7;
|
opacity: 0.7;
|
||||||
content: " ";
|
content: " ";
|
||||||
display: block;
|
display: block;
|
||||||
padding-right: 0.8em;
|
padding-right: 0.8em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.command-line-prompt > span[data-prompt]:before {
|
.command-line-prompt > span[data-prompt]::before {
|
||||||
content: attr(data-prompt);
|
content: attr(data-prompt);
|
||||||
}
|
}
|
||||||
|
|
||||||
.command-line-prompt > span[data-continuation-prompt]:before {
|
.command-line-prompt > span[data-continuation-prompt]::before {
|
||||||
content: attr(data-continuation-prompt);
|
content: attr(data-continuation-prompt);
|
||||||
}
|
}
|
||||||
|
|
||||||
.command-line span.token.output {
|
.command-line span.token.output {
|
||||||
/* Make shell output lines a bit lighter to distinguish them from shell commands */
|
/* Make shell output lines a bit lighter to distinguish them from shell commands */
|
||||||
opacity: 0.7;
|
opacity: 0.7;
|
||||||
}
|
}
|
||||||
|
@@ -61,9 +61,10 @@ func GetTitleFunc(style string) func(s string) string {
|
|||||||
The `command` shortcode generates terminal output for either `bash`, `powershell`, or `sql` shell languages.
|
The `command` shortcode generates terminal output for either `bash`, `powershell`, or `sql` shell languages.
|
||||||
|
|
||||||
### Bash (default shell)
|
### Bash (default shell)
|
||||||
|
|
||||||
Use the `command` shortcode to generate a block with a default bash command prompt.
|
Use the `command` shortcode to generate a block with a default bash command prompt.
|
||||||
|
|
||||||
```
|
```html
|
||||||
{{%/* command */%}}
|
{{%/* command */%}}
|
||||||
export MY_VAR=123
|
export MY_VAR=123
|
||||||
{{%/* /command */%}}
|
{{%/* /command */%}}
|
||||||
@@ -76,7 +77,7 @@ export MY_VAR=123
|
|||||||
|
|
||||||
Specify `user` and `host` to add the user context to the prompt. In addition, use `(out)` to specify an output line and use `\` to denote a line continuation.
|
Specify `user` and `host` to add the user context to the prompt. In addition, use `(out)` to specify an output line and use `\` to denote a line continuation.
|
||||||
|
|
||||||
```
|
```html
|
||||||
{{%/* command user="user" host="localhost" */%}}
|
{{%/* command user="user" host="localhost" */%}}
|
||||||
export MY_VAR=123
|
export MY_VAR=123
|
||||||
echo "hello"
|
echo "hello"
|
||||||
@@ -104,9 +105,10 @@ echo "goodbye"
|
|||||||
{{% /command %}}
|
{{% /command %}}
|
||||||
|
|
||||||
### PowerShell
|
### PowerShell
|
||||||
|
|
||||||
Set the `shell` argument to `powershell` to generate a PowerShell terminal. Override the `prompt` to add a directory if needed. Use the backtick `` ` `` symbol to denote a line continuation.
|
Set the `shell` argument to `powershell` to generate a PowerShell terminal. Override the `prompt` to add a directory if needed. Use the backtick `` ` `` symbol to denote a line continuation.
|
||||||
|
|
||||||
```
|
```html
|
||||||
{{%/* command prompt="PS C:\Users\User>" shell="powershell" */%}}
|
{{%/* command prompt="PS C:\Users\User>" shell="powershell" */%}}
|
||||||
Write-Host `
|
Write-Host `
|
||||||
'Hello' `
|
'Hello' `
|
||||||
@@ -130,9 +132,10 @@ Write-Host 'Goodbye from PowerShell!'
|
|||||||
{{% /command %}}
|
{{% /command %}}
|
||||||
|
|
||||||
### SQL
|
### SQL
|
||||||
|
|
||||||
Set the `shell` argument to `sql` to generate a SQL terminal. Use the `(con)` suffix to denote a line continuation.
|
Set the `shell` argument to `sql` to generate a SQL terminal. Use the `(con)` suffix to denote a line continuation.
|
||||||
|
|
||||||
```
|
```html
|
||||||
{{%/* command prompt="mysql>" shell="sql" */%}}
|
{{%/* command prompt="mysql>" shell="sql" */%}}
|
||||||
set @my_var = 'foo';
|
set @my_var = 'foo';
|
||||||
set @my_other_var = 'bar';
|
set @my_other_var = 'bar';
|
||||||
@@ -177,4 +180,4 @@ order by last_name;
|
|||||||
(out)| John | Doe |
|
(out)| John | Doe |
|
||||||
(out)+------------+-----------+
|
(out)+------------+-----------+
|
||||||
(out)1 row in set (0.00 sec)
|
(out)1 row in set (0.00 sec)
|
||||||
{{% /command %}}
|
{{% /command %}}
|
||||||
|
Reference in New Issue
Block a user