Difference between revisions of "Bobscreen"
From NEC Retro
Line 10: | Line 10: | ||
{{#ifeq: {{#mediadimensions:{{{1}}}}} | 336 × 224 | {{#vardefine:scale|0.9524}} }} | {{#ifeq: {{#mediadimensions:{{{1}}}}} | 336 × 224 | {{#vardefine:scale|0.9524}} }} | ||
{{#if: {{{width|}}} | {{#vardefine:screenwidth|{{#expr:{{{width}}}/{{#var:scale}}}}}} }} | {{#if: {{{width|}}} | {{#vardefine:screenwidth|{{#expr:{{{width}}}/{{#var:scale}}}}}} }} | ||
− | {{#vardefine:visiblewidth|{{#expr:{{#var:screenwidth}}*{{#var:scale}}}}}}{{#if:{{#expr: {{#var:visiblewidth}} < {{#mediawidth:{{{1}}}}} }} |{{#vardefine:visiblewidth| | + | {{#vardefine:visiblewidth|{{#expr:{{#var:screenwidth}}*{{#var:scale}}}}}}{{#if:{{#expr: {{#var:visiblewidth}} < {{#mediawidth:{{{1}}}}} }} |{{#vardefine:visiblewidth|320}}|}} |
</div><div style="width:{{#var:visiblewidth}}px; display:inline-block; text-align:center;"><div style="transform:scale({{#var:scale}},1); transform-origin:50%">[[File:{{{1}}}|{{#var:screenwidth}}x384px]]</div></div></includeonly><noinclude> | </div><div style="width:{{#var:visiblewidth}}px; display:inline-block; text-align:center;"><div style="transform:scale({{#var:scale}},1); 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 13:08, 30 January 2016