Difference between revisions of "Scanbox"
From Sega Retro
(added rotation & extended top/bottom) |
|||
Line 1: | Line 1: | ||
− | <includeonly><div align="center" style="display:inline-block; padding-right:8px; padding-bottom:8px; vertical-align:top; text-align:center; ">{{#ifeq: {{{square}}} | yes | {{#vardefine:coverheight|80}} | {{#vardefine:coverheight|120}} }}{{#vardefine:coverwidth|{{#if:{{{cover|}}}|{{h2w|{{{cover}}}|{{#var:coverheight}}}}|0}}}}{{#vardefine:frontwidth|{{#if:{{{front|}}}|{{h2w|{{{front}}}|{{#var:coverheight}}}}|0}}}}{{#vardefine:backwidth|{{#if:{{{back|}}}|{{h2w|{{{back}}}|{{#var:coverheight}}}}|0}}}}{{#vardefine:spinewidth|{{#if:{{{spine|}}}|{{h2w|{{{spine}}}|{{#var:coverheight}}}}|0}}}}{{#vardefine:spine2width|{{#if:{{{spine2|}}}|{{h2w|{{{spine2}}}|{{#var:coverheight}}}}|0}}}}{{#vardefine:nospinewidth|{{#if:{{{spinemissing|}}}|{{#if:{{{square|}}}|{{#mediawidth:Nospine-small.png}}|{{#mediawidth:Nospine.png}}}}|0}}}} | + | <includeonly><div align="center" style="display:inline-block; padding-right:8px; padding-bottom:8px; vertical-align:top; text-align:center; ">{{#ifeq: {{{square}}} | yes | {{#vardefine:coverheight|80}} | {{#vardefine:coverheight|120}} }}{{#vardefine:coverwidth|{{#if:{{{cover|}}}|{{h2w|{{{cover}}}|{{#var:coverheight}}}}|0}}}}{{#vardefine:frontwidth|{{#if:{{{front|}}}|{{h2w|{{{front}}}|{{#var:coverheight}}}}|0}}}}{{#vardefine:backwidth|{{#if:{{{back|}}}|{{h2w|{{{back}}}|{{#var:coverheight}}}}|0}}}}{{#vardefine:spinewidth|{{#if:{{{spine|}}}|{{h2w|{{{spine}}}|{{#var:coverheight}}}}|0}}}}{{#vardefine:spine2width|{{#if:{{{spine2|}}}|{{h2w|{{{spine2}}}|{{#var:coverheight}}}}|0}}}}{{#vardefine:nospinewidth|{{#if:{{{spinemissing|}}}|{{#if:{{{square|}}}|{{#mediawidth:Nospine-small.png}}|{{#mediawidth:Nospine.png}}}}|0}}}}{{#vardefine:topwidth|{{#var:frontwidth}}}}{{#vardefine:bottomwidth|{{#var:frontwidth}}}}{{#vardefine:topalign|{{#var:spine2width}}}}{{#vardefine:bottomalign|{{#var:spine2width}}}}{{#if:{{{topright|}}}|{{#vardefine:topalign|0}}{{addvar|topwidth|{{#var:spine2width}}}}|}}{{#if:{{{bottomright|}}}|{{#vardefine:bottomalign|0}}{{addvar|bottomwidth|{{#var:spine2width}}}}|}}{{#if:{{{topleft|}}}|{{addvar|topwidth|{{#var:spinewidth}}}}|}}{{#if:{{{bottomleft|}}}|{{addvar|bottomwidth|{{#var:spinewidth}}}}|}} |
{| class="breakout" style="text-align:center;" | {| class="breakout" style="text-align:center;" | ||
! style="border: 0px;" | {{#if: {{{title|}}} | '''{{{title}}}''' | {{#if: {{{console|}}} | '''{{{console}}}, ''' | }} {{#if: {{{region|}}} | '''{{{region}}}''' | }}}} | ! style="border: 0px;" | {{#if: {{{title|}}} | '''{{{title}}}''' | {{#if: {{{console|}}} | '''{{{console}}}, ''' | }} {{#if: {{{region|}}} | '''{{{region}}}''' | }}}} | ||
|- | |- | ||
− | | align="center" style="text-align:center;" | <div style="margin:auto; max-width:{{#expr:{{#var:coverwidth}}+{{#var:frontwidth}}+{{#var:backwidth}}+{{#var:spinewidth}}+{{#var:spine2width}}+{{#var:nospinewidth}}}}px">{{#if: {{{top|}}} | <div style="text-align:right; line-height:0px; padding-right:{{#var: | + | | align="center" style="text-align:center;" | <div style="margin:auto; max-width:{{#expr:{{#var:coverwidth}}+{{#var:frontwidth}}+{{#var:backwidth}}+{{#var:spinewidth}}+{{#var:spine2width}}+{{#var:nospinewidth}}}}px"><!-- top of box start -->{{#if: {{{top|}}} | <div style="text-align:right; line-height:0px; padding-right:{{#var:topalign}}px">{{rotate|[[File:{{{top}}}|{{#var:topwidth}}px]]|angle={{#if:{{{rotatetop|}}}|180|0}}}}</div> | }}<!-- top of box end --> |
− | {{nobr|{{#if: {{{cover|}}} | [[File:{{{cover}}}|320x{{#var:coverheight}}px]] | }}{{#if: {{{back|}}} | [[File:{{{back}}}|320x{{#var:coverheight}}px]] | }}{{#if: {{{spine|}}} | [[File:{{{spine}}}|320x{{#var:coverheight}}px]] | }}{{#if: {{{spinemissing|}}} | {{#if: {{{square|}}} | [[File:Nospine-small.png]] | [[File:Nospine.png]] }} | }}{{#if: {{{front|}}} | [[File:{{{front}}}|320x{{#var:coverheight}}px]] | }}{{#if: {{{spine2|}}} | [[File:{{{spine2}}}|320x{{#var:coverheight}}px]] | }}}}{{#if: {{{bottom|}}} | <div style="text-align:right; line-height:0px; padding-right:{{#var: | + | {{nobr|{{#if: {{{cover|}}} | [[File:{{{cover}}}|320x{{#var:coverheight}}px]] | }}{{#if: {{{back|}}} | [[File:{{{back}}}|320x{{#var:coverheight}}px]] | }}{{#if: {{{spine|}}} | [[File:{{{spine}}}|320x{{#var:coverheight}}px]] | }}{{#if: {{{spinemissing|}}} | {{#if: {{{square|}}} | [[File:Nospine-small.png]] | [[File:Nospine.png]] }} | }}{{#if: {{{front|}}} | [[File:{{{front}}}|320x{{#var:coverheight}}px]] | }}{{#if: {{{spine2|}}} | [[File:{{{spine2}}}|320x{{#var:coverheight}}px]] | }}}}<!-- bottom of box start -->{{#if: {{{bottom|}}} | <div style="text-align:right; line-height:0px; padding-right:{{#var:bottomalign}}px">{{rotate|[[File:{{{bottom}}}|{{#var:bottomwidth}}px]]|angle={{#if:{{{rotatebottom|}}}|180|0}}}}</div> | }}<!-- bottom of box end -->{{#if: {{{cover|}}}{{{front|}}} | <div style="text-align:center">Cover</div> | }} |
</div> | </div> | ||
|- | |- |
Revision as of 13:26, 12 July 2015
- Attention: This template is now automatically feeding data into the MySQL database via KwikiData. Please contact an administrator if you need to add/remove/rename/change any parameters. Changes to the appearance or documentation of the template should still be fine.
Usage
{{Scanbox | console= | region= | cover= (if the cover is one piece, like DVD and Mega Drive cases) | front= (otherwise) | back= | spine= | spinemissing= | square= | spinecard= | inlay= | cart= | disc= | manual= }}
Use square=yes for games with square-shaped boxes, such as Dreamcast, Game Boy Advance or Nintendo DS games.
For additional items, use:
| item1= | item1name= | item2= | item2name= | item3= | item3name= | item4= | item4name=