Template:Boxcode: Difference between revisions

From PS3 Developer wiki
Jump to navigation Jump to search
m (Probably there are better ways to implement the "custom title" but i dont want to break/update the other pages using this template, i think in the way im doing it is not going to break them)
mNo edit summary
Line 1: Line 1:
<div style="float:left; text-align:left; width:100%; background:#e5e5ff; border:3px ridge #8888ff;">[[image:Edit-copy_green.svg.png|link=|20x20px]]''{{{title|Code Sample}}}''
<div style="float:left; text-align:left; width:100%; background:#e5e5ff; border:3px ridge #8888ff;">[[image:Edit-copy_green.svg.png|link=|20x20px]]<span style="font-family:Arial; font-weight:bold; font-style:italic;">{{{title|Code Sample}}}</span>
  <div style="margin:10px; margin-top:-10px; overflow:auto;"><noinclude></noinclude>{{{content|}}}<noinclude></noinclude></div>
  <div style="margin:10px; margin-top:-10px; overflow:auto;">{{{content|}}}</div>
</div>
</div>
<div style="clear:both;"></div><noinclude>
<div style="clear:both;"></div><noinclude>


==Usage==
==Usage==
<nowiki>{{Boxcode|content=some code sample|title=code sample title}}</nowiki>
<nowiki>{{Boxcode|content=Code Sample}}</nowiki>
<br>...or...<br>
<nowiki>{{Boxcode|title=Custom Title|content=Code Sample}}</nowiki>
<br>...or...<br>
<strike><nowiki>{{Boxcode|content=Code Sample|title=Custom Title}}</nowiki></strike>. In this order works too, but is not convenient, better avoid it
 
==Example==
==Example==
{{Boxcode|content=
{{Boxcode|title=Custom Title|content=<syntaxhighlight lang="xml">
<syntaxhighlight lang="xml">
<code>
code
lines
lines
here
<!--here-->
very long lines adds a horizontal scroll bar to the template, this preserves the width of wiki pages............................................................................................................................................................................................................................................................................................... o/ sup
very long lines adds a horizontal scroll bar at bottom of the template to preserve the width of the wiki pages ...............................................................................................................................................................................................................................................................................................o/sup
</syntaxhighlight>|title=Custom Title}}
</syntaxhighlight>}}
 
[[Category:templates]]</noinclude>
[[Category:templates]]</noinclude>

Revision as of 01:22, 24 August 2021

Edit-copy green.svg.pngCode Sample

Usage

{{Boxcode|content=Code Sample}}
...or...
{{Boxcode|title=Custom Title|content=Code Sample}}
...or...
{{Boxcode|content=Code Sample|title=Custom Title}}. In this order works too, but is not convenient, better avoid it

Example

Edit-copy green.svg.pngCustom Title
<code>
lines
<!--here-->
very long lines adds a horizontal scroll bar at bottom of the template to preserve the width of the wiki pages ...............................................................................................................................................................................................................................................................................................o/sup