Difference between revisions of "Bobscreen"
From NEC Retro
Line 2: | Line 2: | ||
{{#vardefine:screenwidth|{{#mediawidth:{{{1}}}}}}} | {{#vardefine:screenwidth|{{#mediawidth:{{{1}}}}}}} | ||
{{#vardefine:scale|1}} | {{#vardefine:scale|1}} | ||
− | {{#ifexpr: {{#mediawidth:{{{1}}}}} > | + | {{#ifexpr: {{#mediawidth:{{{1}}}}} > 320 | {{#vardefine:screenwidth|320}} }} |
{{#ifeq: {{#mediadimensions:{{{1}}}}} | 512 × 448 | {{#vardefine:screenwidth|256}}{{#vardefine:scale|1.25}} }} | {{#ifeq: {{#mediadimensions:{{{1}}}}} | 512 × 448 | {{#vardefine:screenwidth|256}}{{#vardefine:scale|1.25}} }} | ||
{{#ifeq: {{#mediadimensions:{{{1}}}}} | 512 × 480 | {{#vardefine:screenwidth|256}}{{#vardefine:scale|1.25}} }} | {{#ifeq: {{#mediadimensions:{{{1}}}}} | 512 × 480 | {{#vardefine:screenwidth|256}}{{#vardefine:scale|1.25}} }} | ||
Line 11: | Line 11: | ||
{{#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:scaley}}|<div style="transform:scaley({{#var:scaley}}); transform-origin:50%">|}}<div style="transform:scalex({{#var:scale}}); transform-origin:50%">[[File:{{{1}}}|{{#var:screenwidth}}x384px]]</div>{{#if:{{#var:scaley}}|</div>|}}</div></includeonly><noinclude> | + | </div><div style="width:{{#var:visiblewidth}}px; display:inline-block; text-align:center;">{{#if:{{#var:scaley}}|<div style="transform:scaley({{#var:scaley}}); transform-origin:50%">|}}<div style="transform:scalex({{#var:scale}}); transform-origin:50%">[[File:{{{1}}}|{{#var:screenwidth}}{{#if:{{#var:scaley}}||x384px}}]]</div>{{#if:{{#var:scaley}}|</div>|}}</div></includeonly><noinclude> |
[[Category:Breakout box templates]] | [[Category:Breakout box templates]] | ||
</noinclude> | </noinclude> |
Revision as of 12:47, 30 January 2016