Template:ArtBox/doc: Difference between revisions
Created page with "{{Documentation subpage}} {{Uses TemplateStyles |Template:Codesample/borland.css |Template:Codesample/bw.css |Template:ArtBox/dark.css |Template:ArtBox/default.css |Template:Codesample/github-dark.css |Template:ArtBox/light.css |Template:Codesample/lightbulb.css |Template:Codesample/monokai.css |Template:Codesample/rrt.css |Template:Codesample/sas.css |Template:Codesample/staroffice.css |Template:ArtBox/style.css |Template:Codesample/xcode.css }} <templatedata> { "param..." |
No edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{Documentation subpage}} |
{{Documentation subpage}} |
||
{{Uses TemplateStyles |
{{Uses TemplateStyles |
||
|Template: |
|Template:ArtBox/borland.css |
||
|Template: |
|Template:ArtBox/bw.css |
||
|Template:ArtBox/dark.css |
|Template:ArtBox/dark.css |
||
|Template:ArtBox/default.css |
|Template:ArtBox/default.css |
||
|Template: |
|Template:ArtBox/github-dark.css |
||
|Template:ArtBox/light.css |
|Template:ArtBox/light.css |
||
|Template: |
|Template:ArtBox/lightbulb.css |
||
|Template: |
|Template:ArtBox/monokai.css |
||
|Template: |
|Template:ArtBox/rrt.css |
||
|Template: |
|Template:ArtBox/sas.css |
||
|Template: |
|Template:ArtBox/staroffice.css |
||
|Template:ArtBox/style.css |
|Template:ArtBox/style.css |
||
|Template: |
|Template:ArtBox/xcode.css |
||
}} |
}} |
||
<templatedata> |
<templatedata> |
||
| Line 89: | Line 89: | ||
| <code><nowiki>{{ArtBox |echo "hello world!"}}</nowiki></code> || {{ArtBox |echo "hello world!"}} |
| <code><nowiki>{{ArtBox |echo "hello world!"}}</nowiki></code> || {{ArtBox |echo "hello world!"}} |
||
|- |
|- |
||
| <code><nowiki>{{ArtBox |echo "hello world!" |lang=text |
| <code><nowiki>{{ArtBox |echo "hello world!" |lang=text |
||
|scheme=light}}</nowiki></code> || {{ArtBox |echo "hello world!" |lang=text |scheme=light}} |
|||
|- |
|- |
||
| <code><nowiki>{{ArtBox |$ echo "hello world!" |lang=shell-session |
| <code><nowiki>{{ArtBox |$ echo "hello world!" |lang=shell-session |
||
|scheme=dark}}</nowiki></code> || {{ArtBox |$ echo "hello world!" |lang=shell-session |scheme=dark}} |
|||
|- |
|- |
||
| <code><nowiki>{{ArtBox |code=<nowiki>{{ArtBox}}</nowiki> |lang=wikitext}}</nowiki></code> || {{ArtBox |code=<nowiki>{{ |
| <code><nowiki>{{ArtBox |code=<nowiki>{{ArtBox}}</nowiki> |lang=wikitext}}</nowiki></code> || {{ArtBox |code=<nowiki>{{ArtBox}}</nowiki> |lang=wikitext}} |
||
|- |
|- |
||
| <pre>{{ArtBox |name=ingress.yaml |lang=yaml |
| <pre>{{ArtBox |name=ingress.yaml |lang=yaml |
||
|scheme=dark |line=1 |highlight=5,8 |code= |
|||
--- |
--- |
||
apiVersion: networking.k8s.io/v1beta1 |
apiVersion: networking.k8s.io/v1beta1 |
||
| Line 119: | Line 123: | ||
}} |
}} |
||
|- |
|- |
||
| <pre>{{ |
| <pre>{{ArtBox |name=metadata |lang=yaml |
||
|scheme=light |line=1 |start=5 |highlight=1,4 |code= |
|||
name: foo-redirect |
name: foo-redirect |
||
namespace: tool-foo |
namespace: tool-foo |
||
| Line 133: | Line 138: | ||
annotations: |
annotations: |
||
kubernetes.io/ingress.class: nginx |
kubernetes.io/ingress.class: nginx |
||
}} |
|||
|- |
|||
| <pre>{{ArtBox |icon=Text-x-generic-attention.svg |
|||
|name=NBEXEC |lang=nbexec |
|||
|scheme=light |line=1 |
|||
|start=5 |highlight=1,4 |
|||
|code= |
|||
!Comment lang="nbexec" |
|||
$SETS JOBNAME FPADTE1 |
|||
!************************************* |
|||
!DESCRIPTION: Delete Files * |
|||
!************************************* |
|||
! jjjj-mm-dd AUTHOR AENDERUNGSGRUND * |
|||
! ---------- ------ --------------- * |
|||
! 2005-00-00 AV Initial Version * |
|||
!************************************* |
|||
$SETS LISTVAR OFF |
|||
$SETS LISTBAT BATCH |
|||
$CHAIN $BATCH.TAKEOVER.GENV1 |
|||
$LIST BATCH |
|||
$IF PROD $GOTO WORK010 |
|||
$IF BACK $GOTO WORK010 |
|||
$GOTO FINISH |
|||
! Global Settings --- Do not change |
|||
$SETS J-S-T '#TODAY %d %m %Y %H:%M' |
|||
$SETS LOG-FIL $WORK1.ZDBASE.F'#TODAY %y%j' |
|||
$SETS CC 0 |
|||
$SETS TI 0 |
|||
$SETS D-F 0 |
|||
:DELAY 1 minute |
|||
.SETCC |
|||
$SETS #CC 'CC' |
|||
$SETS #TI 'TI' |
|||
$SETS #BP 'BP' |
|||
.FINISH |
|||
}}</pre> || {{ArtBox |icon=Text-x-generic-attention.svg|name=NBEXEC |lang=nbexec |scheme=light |line=1 |start=5 |highlight=1,4 |copy=1 |code= |
|||
!Comment lang="nbexec" |
|||
$SETS JOBNAME FPADTE1 |
|||
!************************************* |
|||
!DESCRIPTION: Delete Files * |
|||
!************************************* |
|||
! jjjj-mm-dd AUTHOR AENDERUNGSGRUND * |
|||
! ---------- ------ --------------- * |
|||
! 2005-00-00 AV Initial Version * |
|||
!************************************* |
|||
$SETS LISTVAR OFF |
|||
$SETS LISTBAT BATCH |
|||
$CHAIN $BATCH.TAKEOVER.GENV1 |
|||
$LIST BATCH |
|||
$IF PROD $GOTO WORK010 |
|||
$IF BACK $GOTO WORK010 |
|||
$GOTO FINISH |
|||
! Global Settings --- Do not change |
|||
$SETS J-S-T '#TODAY %d %m %Y %H:%M' |
|||
$SETS LOG-FIL $WORK1.ZDBASE.F'#TODAY %y%j' |
|||
$SETS CC 0 |
|||
$SETS TI 0 |
|||
$SETS D-F 0 |
|||
:DELAY 1 minute |
|||
.SETCC |
|||
$SETS #CC 'CC' |
|||
$SETS #TI 'TI' |
|||
$SETS #BP 'BP' |
|||
.FINISH |
|||
}} |
}} |
||
|- |
|- |
||
| Line 139: | Line 219: | ||
== Display File == |
== Display File == |
||
[[File:OOjs UI icon notice-destructive.svg]] |
[[File:OOjs UI icon notice-destructive.svg]] |
||
https://www.flaticon.com/free-icons/script" title="script icons">Script icons created by kerismaker - Flaticon |
|||
== Adding a new color scheme == |
== Adding a new color scheme == |
||
The <code>scheme=...</code> parameter will load a css sub-page to add styles matching the [https://pygments.org Pygments] markup definitions. The easiest way to introduce a new scheme is to export it from Pygments itself: <code>pygmentize -f html -S $style -a .wt-codesample-${style}</code>. |
The <code>scheme=...</code> parameter will load a css sub-page to add styles matching the [https://pygments.org Pygments] markup definitions. The easiest way to introduce a new scheme is to export it from Pygments itself: <code>pygmentize -f html -S $style -a .wt-codesample-${style}</code>. |
||
Latest revision as of 11:16, 11 April 2026
| This is a documentation subpage for Template:ArtBox. It contains usage information, categories and other content that is not part of the original Template page. |
This template augments a <syntaxhighlight> block with fancy colors and an optional title
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Title | name | Title (name) of this code sample. Often a filename | String | suggested |
| Programming language | lang | Name of lexer to use for highlighting
| String | suggested |
| Code | code 1 | Code sample to render | String | required |
| Highlighted lines | highlight | Line(s) in example to highlight. Comma separated list of line numbers | String | optional |
| Show line numbers | line | Enable line numbers for sample | Boolean | optional |
| Starting line number | start | Starting line number when line numbers are shown. Note: Does not effect line numbers used for highlights.
| Number | optional |
| Color scheme | scheme | Color scheme to use.
| String | optional |
| Copy button | copy | Show a "copy" button to copy the code to the clipboard | Boolean | optional |
Examples
{{ArtBox |echo "hello world!"}} |
echo "hello world!"
|
{{ArtBox |echo "hello world!" |lang=text
|scheme=light}} |
echo "hello world!"
|
{{ArtBox |$ echo "hello world!" |lang=shell-session
|scheme=dark}} |
$ echo "hello world!"
|
{{ArtBox |code=<nowiki>{{ArtBox}}</nowiki> |lang=wikitext}} |
{{ArtBox}}
|
{{ArtBox |name=ingress.yaml |lang=yaml
|scheme=dark |line=1 |highlight=5,8 |code=
---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: foo-redirect
namespace: tool-foo
labels:
name: foo-redirect
annotations:
kubernetes.io/ingress.class: nginx
}} |
ingress.yaml
---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: foo-redirect
namespace: tool-foo
labels:
name: foo-redirect
annotations:
kubernetes.io/ingress.class: nginx
|
{{ArtBox |name=metadata |lang=yaml
|scheme=light |line=1 |start=5 |highlight=1,4 |code=
name: foo-redirect
namespace: tool-foo
labels:
name: foo-redirect
annotations:
kubernetes.io/ingress.class: nginx
}} |
metadata
name: foo-redirect
namespace: tool-foo
labels:
name: foo-redirect
annotations:
kubernetes.io/ingress.class: nginx
|
{{ArtBox |icon=Text-x-generic-attention.svg
|name=NBEXEC |lang=nbexec
|scheme=light |line=1
|start=5 |highlight=1,4
|code=
!Comment lang="nbexec"
$SETS JOBNAME FPADTE1
!*************************************
!DESCRIPTION: Delete Files *
!*************************************
! jjjj-mm-dd AUTHOR AENDERUNGSGRUND *
! ---------- ------ --------------- *
! 2005-00-00 AV Initial Version *
!*************************************
$SETS LISTVAR OFF
$SETS LISTBAT BATCH
$CHAIN $BATCH.TAKEOVER.GENV1
$LIST BATCH
$IF PROD $GOTO WORK010
$IF BACK $GOTO WORK010
$GOTO FINISH
! Global Settings --- Do not change
$SETS J-S-T '#TODAY %d %m %Y %H:%M'
$SETS LOG-FIL $WORK1.ZDBASE.F'#TODAY %y%j'
$SETS CC 0
$SETS TI 0
$SETS D-F 0
:DELAY 1 minute
.SETCC
$SETS #CC 'CC'
$SETS #TI 'TI'
$SETS #BP 'BP'
.FINISH
}} |
NBEXEC
!Comment lang="nbexec"
$SETS JOBNAME FPADTE1
!*************************************
!DESCRIPTION: Delete Files *
!*************************************
! jjjj-mm-dd AUTHOR AENDERUNGSGRUND *
! ---------- ------ --------------- *
! 2005-00-00 AV Initial Version *
!*************************************
$SETS LISTVAR OFF
$SETS LISTBAT BATCH
$CHAIN $BATCH.TAKEOVER.GENV1
$LIST BATCH
$IF PROD $GOTO WORK010
$IF BACK $GOTO WORK010
$GOTO FINISH
! Global Settings --- Do not change
$SETS J-S-T '#TODAY %d %m %Y %H:%M'
$SETS LOG-FIL $WORK1.ZDBASE.F'#TODAY %y%j'
$SETS CC 0
$SETS TI 0
$SETS D-F 0
:DELAY 1 minute
.SETCC
$SETS #CC 'CC'
$SETS #TI 'TI'
$SETS #BP 'BP'
.FINISH
|
{{ArtBox |echo "hello world!" |copy=}} |
echo "hello world!"
|
Display File
https://www.flaticon.com/free-icons/script" title="script icons">Script icons created by kerismaker - Flaticon
Adding a new color scheme
The scheme=... parameter will load a css sub-page to add styles matching the Pygments markup definitions. The easiest way to introduce a new scheme is to export it from Pygments itself: pygmentize -f html -S $style -a .wt-codesample-${style}.
See also
- {{Codesample-header}}
- {{Code}}
- {{Inline-code}}
- {{Codesample}}
- {{Terminal}}
- Template:Colored box/doc#Example: Compare code § Notes