Actions

Template

Difference between revisions of "Bobscreen"

From NEC Retro

(bleh)
Line 8: Line 8:
 
{{#ifeq: {{#mediadimensions:{{{1}}}}} | 256 × 224 | {{#vardefine:scale|1.25}} }}
 
{{#ifeq: {{#mediadimensions:{{{1}}}}} | 256 × 224 | {{#vardefine:scale|1.25}} }}
 
{{#ifeq: {{#mediadimensions:{{{1}}}}} | 256 × 240 | {{#vardefine:scale|1.25}} }}
 
{{#ifeq: {{#mediadimensions:{{{1}}}}} | 256 × 240 | {{#vardefine:scale|1.25}} }}
{{#ifeq: {{#mediadimensions:{{{1}}}}} | 336 × 224 | {{#vardefine:scale|0.95}}{{#vardefine:scaleHeight}} }}
+
{{#ifeq: {{#mediadimensions:{{{1}}}}} | 336 × 224 | {{#vardefine:scale|0.95}} }}
 
{{#if: {{{width|}}} | {{#vardefine:screenwidth|{{#expr:{{{width}}}/{{#var:scale}}}}}} }}
 
{{#if: {{{width|}}} | {{#vardefine:screenwidth|{{#expr:{{{width}}}/{{#var:scale}}}}}} }}
 
{{#vardefine:visiblewidth|{{#expr:{{#var:screenwidth}}*{{#var:scale}}}}}}
 
{{#vardefine:visiblewidth|{{#expr:{{#var:screenwidth}}*{{#var:scale}}}}}}
</div><div style="width:{{#var:visiblewidth}}px; display:inline-block; text-align:center;">{{#if: {{#var:scaleHeight}}|<div style="transform:scaley(1.05); transform-origin:50%">|}}<div style="transform:scalex({{#var:scale}}); transform-origin:50%">[[File:{{{1}}}|{{#var:screenwidth}}x384px]]</div></div>{{#if: {{#var:scaleHeight}}|</div>|}}</includeonly><noinclude>
+
</div><div style="width:{{#var:visiblewidth}}px; display:inline-block; text-align:center;"><div style="transform:scalex({{#var:scale}}); transform-origin:50%">[[File:{{{1}}}|{{#var:screenwidth}}x384px]]</div></div></includeonly><noinclude>
 
[[Category:Breakout box templates]]
 
[[Category:Breakout box templates]]
 
</noinclude>
 
</noinclude>

Revision as of 12:31, 30 January 2016