v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Difference between revisions of "Template:Diagram"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
m
m
 
(18 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{| style="{{{style|border-spacing: 0; font-family: 'Courier New', 'Quicktype Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', 'Lucida Sans Typewriter', monospace; font-size: 135%; font-weight: bold; color:{{{color|#C0C0C0}}}; background:{{{bgcolor|#000}}}; line-height:.95em}}}"
+
{| style="{{{style|border-spacing: 0; font-family: 'Courier New', 'Quicktype Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', 'Lucida Sans Typewriter', monospace; font-size: {{{font-size|135%}}}; font-weight: bold; color:{{{color|#C0C0C0}}}; background:{{{bgcolor|#000}}}; line-height:.98em; {{#if:{{{float|}}}|float:{{{float}}};}}}}}"
{{#rreplace:{{#rreplace:{{#rreplace:{{{1}}}| \n | ♫}}| / *(?:\[(#[A-Fa-f0-9]+)\])? *(?:\[(#[A-Fa-f0-9]+)\])? *([^♫ ]) */u | {{!}}style="padding: 0; color: \1; background: \2"{{!}}\3
+
{{#ifeq:{{{spaces|}}}|yes|{{diagram/block2|{{{1|}}}}}|{{diagram/block|{{{1|}}}}}}}
\9}} | | {{!-}}
+
|}<noinclude>{{documentation}}</noinclude>
\9}}
 
|}<noinclude>
 
Easy to use color diagram template. Newlines are converted to new table rows. Spaces are cropped. Use [#color]x to change the color of a tile. Use [#color][#bgcolor]x to change both the color and background of a tile. The optional color and bgcolor parameters can be used to change the default colors.
 
 
 
Usage:
 
<pre><nowiki>
 
  {{diagram|
 
  ╔══╦══╦══╦══╗
 
  ║..║..║..║..║
 
  ║.┼╩┼.║.┼╩┼.║
 
  ╠═╣X╠═╬═╣X╠═╣
 
  ║.┼╦┼.║.┼╦┼.║
 
  ║..║..║..║..║}}</nowiki></pre>
 
 
 
  {{diagram|
 
  ╔══╦══╦══╦══╗
 
  ║..║..║..║..║
 
  ║.┼╩┼.║.┼╩┼.║
 
  ╠═╣X╠═╬═╣X╠═╣
 
  ║.┼╦┼.║.┼╦┼.║
 
  ║..║..║..║..║}}
 
 
 
 
 
<pre><nowiki>
 
{{diagram|
 
╔══╦══╦══            ╦══╗
 
║..║..║..[#f00]      ║..║
 
║.┼╩┼.║.┼            ╩┼.║
 
╠═╣X╠═╬═╣[#000][#fff]X╠═╣
 
║.┼╦┼.║.┼            ╦┼.║
 
║..║..║..            ║..║}}</nowiki></pre>
 
 
 
{{diagram|
 
╔══╦══╦══            ╦══╗
 
║..║..║..[#f00]      ║..║
 
║.┼╩┼.║.┼            ╩┼.║
 
╠═╣X╠═╬═╣[#000][#fff]X╠═╣
 
║.┼╦┼.║.┼            ╦┼.║
 
║..║..║..            ║..║}}
 
 
 
 
 
<pre><nowiki>
 
{{diagram|color=#000|bgcolor=fff|
 
╔══╦══╦══╦══╗
 
║..║..║..║..║
 
║.┼╩┼.║.┼╩┼.║
 
╠═╣X╠═╬═╣X╠═╣
 
║.┼╦┼.║.┼╦┼.║
 
║..║..║..║..║}}</nowiki></pre>
 
 
 
 
 
{{diagram|color=#000|bgcolor=fff|
 
╔══╦══╦══╦══╗
 
║..║..║..║..║
 
║.┼╩┼.║.┼╩┼.║
 
╠═╣X╠═╬═╣X╠═╣
 
║.┼╦┼.║.┼╦┼.║
 
║..║..║..║..║}}
 
[[Category:Formatting Templates]]
 
</noinclude>
 

Latest revision as of 10:38, 23 July 2013