Editing Template:Boxcodelite
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
<div style="float:{{{float|right}}} | <div style="float:{{{float|right}}}; font-size:85%; margin:5px; background:#eebb99; border:3px double #bb8866; box-shadow: 4px 4px 2px 1px #eeeeee;"> | ||
<div style="margin-bottom:-5px; text-align:center; font-weight:bold;">{{{title|Title}}}</div> | |||
<div style="margin:5px; border:1px dashed #bb8866;"> | |||
<div style="margin-top:-12px; margin-bottom:-12px;">{{#tag:pre|{{{code|Code}}}}}</div> | |||
</div><noinclude> | </div> | ||
</div><noinclude>[[Category:Templates]]<noinclude> | |||
{{clear}} | {{clear}}<br> | ||
== Usage == | == Usage == | ||
*<nowiki>{{</nowiki>boxcodelite|'''title'''=Title|'''code'''=Code<nowiki>}}</nowiki> | |||
*<nowiki>{{</nowiki>boxcodelite|'''title'''= | **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|''' | *<nowiki>{{</nowiki>boxcodelite|'''title'''=Title|'''float'''=left|'''code'''=Code<nowiki>}}</nowiki> | ||
*<nowiki>{{</nowiki>boxcodelite | **By default it floats to right, but can be configured to float left | ||
*<nowiki>{{</nowiki>boxcodelite|''' | *<nowiki>{{</nowiki>boxcodelite|'''title'''=Title|'''code'''=<nowiki><pre></nowiki>Code<nowiki></pre>}}</nowiki> | ||
* | **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>Code<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 the default '''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 == | |||
{{boxcodelite|title=BLJM85001|code= | {{boxcodelite|title=BLJM85001|code= | ||
VERSION = 0xFFFFFFFF | VERSION = 0xFFFFFFFF | ||
Line 45: | Line 28: | ||
}} | }} | ||
{{boxcodelite|title= | {{boxcodelite|title=BLJM85001|code= | ||
VERSION = 0xFFFFFFFF | |||
S3D.ENABLE = 2 | |||
SDRAM_SIZE = 02800000 | |||
MIPS_CODE_BLOCK_SIZE = 8192 | |||
}} | }} | ||
[[Category:Templates]]</noinclude> | [[Category:Templates]]</noinclude> |