Difference between revisions of "Template:Infobox block"

From StarMade Wiki
(replaced French terms by English terms)
 
(31 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{infobox
+
{{infobox  
|name         =  
+
|name =
|bodystyle    = width: 21.5em; padding: 0em;
+
|bodystyle    = width: 19em; padding: 0em; <!-- old width : 21.5-->
|above        = {{{name|{{PAGENAME}}}}}
+
|above        = [[{{#if:{{{name|}}}|{{{name|}}}|{{{type|}}}}}|{{#if:{{{name|}}}|{{{name|}}}|{{{type|}}}}}]]
 
|abovestyle  = font-size: large; padding:5px;
 
|abovestyle  = font-size: large; padding:5px;
 
|image        =  
 
|image        =  
Line 12: Line 12:
 
|datastyle    = padding: 0.1em 0.5em;
 
|datastyle    = padding: 0.1em 0.5em;
  
|data2    = {{{image|[[File:{{PAGENAME}}.png|150px]]}}}
+
|data2    = {{{image|[[File:{{#if:{{{name|}}}|{{{name|}}}|{{{type|}}}}}.png|150px]]}}}
|label3  = Type
+
<!--|label3  = Type
|data3    = {{{type|}}}
+
|data3    = {{{type|}}}-->
 
|label4  = Hit Points
 
|label4  = Hit Points
 
|data4    = {{{hp|}}}
 
|data4    = {{{hp|}}}
 +
|label7  = Reactor Hit Points
 +
|data7    = {{{rhp|}}}
 
|label5  = Armor
 
|label5  = Armor
 
|data5    = {{{armor|}}}
 
|data5    = {{{armor|}}}
|label6  = Armor HP
 
|data6    = {{{ahp}}}
 
|label7  = Structure HP
 
|data7    = {{{shp}}}
 
 
|label8  = Mass
 
|label8  = Mass
 
|data8    = {{{mass|}}}
 
|data8    = {{{mass|}}}
 +
|label6  = Volume
 +
|data6    = {{{volume|}}}
 
|label9  = Luminosity
 
|label9  = Luminosity
 
|data9    = {{{light|}}}
 
|data9    = {{{light|}}}
|label10 = Data Value (ID)
+
|label10   = Placement Orientations
|data10 = {{{dv|}}}
+
|data10    = {{{orientation|}}}
 +
|label11 = Data Value (ID)
 +
|data11 = {{#if:{{{dv|}}}|{{{dv|}}}|{{{id|}}}}}
 
}}<noinclude>{{Documentation}}</noinclude>
 
}}<noinclude>{{Documentation}}</noinclude>

Latest revision as of 06:07, 15 April 2019

[[|]]
150px
[view] [edit] [history] [[[:Template:Purge]]] 50px Template documentation

Usage

{{infobox block
|type=Grey Hull
|hp=75
|armor=0%
|ahp=50
|shp=5
|mass=0.05
|light=no
|dv=598
}}

The above produces the table to the right. If the name of the page does not match the name of the block, the title will be incorrect.

There is an alternate version of the template - {{infobox blockalt}} - which does not take its name from the name of the current page.

.tooltipblock { position: relative; display: inline-block; border-bottom: 1px dotted black; }

.tooltipblock .info { visibility: hidden; text-align: center; border-radius: 6px; padding: 5px 0; position: absolute; z-index: 1; bottom: 100%; left: 50%; margin-left: -60px; opacity: 0; transition: opacity 0.5s; }

.tooltipblock .info { visibility: visible; opacity: 1; }