Template:Codeblock: Difference between revisions

From TF2 Classified Wiki
Jump to navigation Jump to search
VivaRomania (talk | contribs)
mNo edit summary
VivaRomania (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
See Also: [[Template:Code]]
<div style="max-width:{{{width|unset}}}; overflow:hidden;background-color:{{#switch:{{{style|}}}|1=rgba(241, 233, 203, 1)|rgba(241, 233, 203, 1)}};{{#switch:{{{style|}}}|1=border:1px solid rgba(48,48,48,1);|}}border-radius:4px; font-family:monospace,monospace; color: black; line-height:1.52rem<!--lines-->; text-indent:0; white-space:pre-wrap; margin: {{{margin|.3em 0 .3em 0}}}"><!--
<includeonly>
 
<onlyinclude><!--
        --><div style="max-width:{{{width|unset}}}; overflow:hidden;background-color:{{#switch:{{{style|}}}|1=rgba(241, 233, 203, 1)|rgba(241, 233, 203, 1)}};{{#switch:{{{style|}}}|1=border:1px solid rgba(48,48,48,1);|}}border-radius:4px; font-family:monospace,monospace; color: black; line-height:1.52rem<!--lines-->; text-indent:0; white-space:pre-wrap; margin: {{{margin|.3em 0 .3em 0}}}"><!--
             -->{{#if:{{{src|{{{lang|}}}}}}|<div style="width=100%; display:flex;justify-content:space-between;background-color:rgba(88, 58, 49, 1);
             -->{{#if:{{{src|{{{lang|}}}}}}|<div style="width=100%; display:flex;justify-content:space-between;background-color:rgba(88, 58, 49, 1);
border-bottom:1px solid rgba(164, 145, 126, 1); font-family:monospace,monospace; color: white; line-height:1.125rem<!--header-->; text-indent:0; white-space:pre-wrap; padding:.5em"><!--
border-bottom:1px solid rgba(164, 145, 126, 1); font-family:monospace,monospace; color: white; line-height:1.125rem<!--header-->; text-indent:0; white-space:pre-wrap; padding:.5em"><!--
Line 44: Line 40:
             --></div><!--
             --></div><!--
--><!--
--><!--
         --></div></onlyinclude>
         --></div>
 
<noinclude>
</includeonly>
 
== Documentation ==
== Documentation ==
Just go to Valve Dev Community for their documentation, only difference is formatting (styling).
Just go to Valve Dev Community for their documentation, only difference is formatting (styling).
Line 99: Line 93:
16</nowiki>}}
16</nowiki>}}


<noinclude>
[[Category:Layout templates]]
[[Category:Layout templates]]
</noinclude>
</noinclude>

Latest revision as of 01:35, 18 August 2025

Documentation

Just go to Valve Dev Community for their documentation, only difference is formatting (styling). Link: VDC Code Documentation

Examples

With header

tf2classic/scripts/items/items_game.txt (directory)
txt (file type)
(code) This is a test! "Beep Boop!" - Soldier ''no italics'' - - - '''no bold''' <nowiki> tag makes formatting no format for code stuff!

yes italics - - - yes bold

Codey code code


Without header

(code) Hello, world! I'm headerless :( ''"blah blah blah"''

With lines enabled + Locked Height/Width

Note:It is not fully aligned and may break with lots of lines. Fast scrolling also breaks alignment but will refix.

The source was not specified
txt
  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
A1 B2 C3 D4 Start of Long Line ----------------- End of Long Line You can also leave gaps 9 10 11 12 13 14 15 16