Template:Boxcodelite: Difference between revisions

From PS3 Developer wiki
Jump to navigation Jump to search
mNo edit summary
m (Trying to do the <pre> inside the template... i dont remember well if this was working, but worths another try)
Line 2: Line 2:
  <div style="margin-bottom:-5px; text-align:center; font-weight:bold;">{{{title|Title}}}</div>
  <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:5px; border:1px dashed #bb8866;">
   <div style="margin-top:-12px; margin-bottom:-12px;">{{{code|Code}}}</div>
   <div style="margin-top:-12px; margin-bottom:-12px;">{{#tag:pre|{{{code|Code}}}}}</div>
  </div>
  </div>
</div><noinclude>[[Category:Templates]]<noinclude>
</div><noinclude>[[Category:Templates]]<noinclude>
Line 21: Line 21:


== Examples ==
== Examples ==
{{boxcodelite|title=BLJM85001|code=<pre>
{{boxcodelite|title=BLJM85001|code=
VERSION = 0xFFFFFFFF
VERSION = 0xFFFFFFFF
S3D.ENABLE = 2
S3D.ENABLE = 2
SDRAM_SIZE = 02800000
SDRAM_SIZE = 02800000
MIPS_CODE_BLOCK_SIZE = 8192
MIPS_CODE_BLOCK_SIZE = 8192
</pre>}}
}}


{{boxcodelite|title=BLJM85001|code=<syntaxhighlight lang=xml>
{{boxcodelite|title=BLJM85001|code=
VERSION = 0xFFFFFFFF
VERSION = 0xFFFFFFFF
S3D.ENABLE = 2
S3D.ENABLE = 2
SDRAM_SIZE = 02800000
SDRAM_SIZE = 02800000
MIPS_CODE_BLOCK_SIZE = 8192
MIPS_CODE_BLOCK_SIZE = 8192
</syntaxhighlight>}}
}}


[[Category:Templates]]</noinclude>
[[Category:Templates]]</noinclude>

Revision as of 17:26, 7 September 2021

Title
Code


Usage

  • {{boxcodelite|title=Title|code=Code}}
    • 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=Code}}
    • By default it floats to right, but can be configured to float left
  • {{boxcodelite|title=Title|code=<pre>Code</pre>}}
    • This displays the texts "preformatted", preserves linespaces, black monospace font on top of white background
  • {{boxcodelite|title=Title|code=<syntaxhighlight lang=bash>Code</syntaxhighlight>}}


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