Template:Boxcodelite: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 8: | Line 8: | ||
{{clear}}<br> | {{clear}}<br> | ||
== Usage == | == Usage == | ||
*<nowiki>{{</nowiki>boxcodelite|'''title'''=Title|'''code'''=Config<nowiki>}}</nowiki> | |||
* | |||
**This way allows to display some plain text inside the box, consider it a "hack" that eventually could come in handy incase there are problems with the other modes, but better avoid it | **This way allows to display some plain text inside the box, consider it a "hack" that eventually could come in handy incase there are problems with the other modes, but better avoid it | ||
* | *<nowiki>{{</nowiki>boxcodelite|'''title'''=Title|'''float'''=left|'''code'''=Config<nowiki>}}</nowiki> | ||
**By default it floats to right, but can be configured to float left | **By default it floats to right, but can be configured to float left | ||
* | *<nowiki>{{</nowiki>boxcodelite|'''title'''=Title|'''code'''=<nowiki><pre></nowiki>Config<nowiki></pre>}}</nowiki> | ||
**This displays the texts "preformatted", preserves linespaces, black monospace font on top of white background | **This displays the texts "preformatted", preserves linespaces, black monospace font on top of white background | ||
* | *<nowiki>{{</nowiki>boxcodelite|'''title'''=Title|'''code'''=<nowiki><syntaxhighlight</nowiki> lang=bash>Config<nowiki></syntaxhighlight>}}</nowiki> | ||
**This displays the texts with color highlights for the '''lang=[https://www.mediawiki.org/wiki/Extension:SyntaxHighlight#Supported_languages supported_programming_languages]''', if there is no language that fits use '''lang=[https://en.wikipedia.org/wiki/Bash_%28Unix_shell%29 bash]''' | **This displays the texts with color highlights for the '''lang=[https://www.mediawiki.org/wiki/Extension:SyntaxHighlight#Supported_languages supported_programming_languages]''', if there is no language that fits use '''lang=[https://en.wikipedia.org/wiki/Bash_%28Unix_shell%29 bash]''' | ||
When this template was created (august 2021) the <nowiki><syntaxhighlight></nowiki> extension is broken in this wiki, so the result of <nowiki><syntaxhighlight></nowiki> or <nowiki><pre></nowiki> is exactly the same, but better use the display mode with the <nowiki><syntaxhighlight></nowiki> as a prevention because eventually the <nowiki><syntaxhighlight></nowiki> extension could be fixed | |||
== Examples == | == Examples == |
Revision as of 07:21, 30 August 2021
Code Sample
code
Usage
- {{boxcodelite|title=Title|code=Config}}
- This way allows to display some plain text inside the box, consider it a "hack" that eventually could come in handy incase there are problems with the other modes, but better avoid it
- {{boxcodelite|title=Title|float=left|code=Config}}
- By default it floats to right, but can be configured to float left
- {{boxcodelite|title=Title|code=<pre>Config</pre>}}
- This displays the texts "preformatted", preserves linespaces, black monospace font on top of white background
- {{boxcodelite|title=Title|code=<syntaxhighlight lang=bash>Config</syntaxhighlight>}}
- This displays the texts with color highlights for the lang=supported_programming_languages, if there is no language that fits use lang=bash
When this template was created (august 2021) the <syntaxhighlight> extension is broken in this wiki, so the result of <syntaxhighlight> or <pre> is exactly the same, but better use the display mode with the <syntaxhighlight> as a prevention because eventually the <syntaxhighlight> extension could be fixed
Examples
BLJM85001
VERSION = 0xFFFFFFFF S3D.ENABLE = 2 SDRAM_SIZE = 02800000 MIPS_CODE_BLOCK_SIZE = 8192
BLJM85001
VERSION = 0xFFFFFFFF
S3D.ENABLE = 2
SDRAM_SIZE = 02800000
MIPS_CODE_BLOCK_SIZE = 8192