Vintage Story Wiki:Infobox tutorial: Difference between revisions

From Vintage Story Wiki
added a note about display flex
(actually wrote a tutorial)
(added a note about display flex)
 
Line 57: Line 57:


This shows the template has 3 parameters, <code>Name</code>, <code>Stackable</code>, and <code>Material</code>. <code>Name</code> is required; it must be defined for the template to be correct. When a require parameter isn't specified, not defined, it will appear as <nowiki>{{{Name}}}</nowiki> on the page. <code>Stackable</code> is optional; it may or may not be defined. If there is a second value after "Optional" that is the default value. <code>Stackable</code> defaults to 64. <code>Material</code> is optional but does not have a default value.
This shows the template has 3 parameters, <code>Name</code>, <code>Stackable</code>, and <code>Material</code>. <code>Name</code> is required; it must be defined for the template to be correct. When a require parameter isn't specified, not defined, it will appear as <nowiki>{{{Name}}}</nowiki> on the page. <code>Stackable</code> is optional; it may or may not be defined. If there is a second value after "Optional" that is the default value. <code>Stackable</code> defaults to 64. <code>Material</code> is optional but does not have a default value.
== Additional notes ==
Infoboxes can be positioned on screen by surrounding them with <code>div</code> HTML tags. For pages with multiple infoboxes the following groups them cleanly:
<pre>
<div style="display:flex">
{{Template}}
</div>
</pre>
Confirmedusers, Bureaucrats, editor, Administrators
1,522

edits