Template:Codeblue

{{{1}}}
{{{2}}}



Summary

edit

Produces a box for displaying lines of code, poetry, or any other set of lines that need to remain in such a textual format.

Parameters

edit

Main Text Content Parameters

edit
  • {{{1}}}: Box heading text at the top. Enter 1= and then the text.
  • {{{2}}}: The code lines for the main content in the middle section. Enter 2= the code lines.

Outer Box Formatting Parameters

edit
  • align: Alignment of the box on the page; options are, left, middle, right.
  • background: The general background color of the box. This is overridden by fixed colors in the content section.
  • width: The overall width of the outer box. Set it to auto to stretch to fit the longest line, or specify a pixel width and it will wrap lines of code.

Code Content Formatting Parameters

edit
  • cff: The font family for the code lines.

Example of Use

edit

Writing the following code line in editing mode...

{{codeblue|1=This is my heading text...|2=
 a=3
 s=4
 d=5
 a=s=d=12
HHHHHHHHHH
IIIIIIIIII
0000000000
OOOOOOOOOO
1111111111
llllllllll
}}

...Produces this code box...

This is my heading text...
a=3
s=4
d=5
a=s=d=12
HHHHHHHHHH
IIIIIIIIII
0000000000
OOOOOOOOOO
1111111111
llllllllll