Difference between revisions of "Template:comic"

Explain xkcd: It's 'cause you're dumb.
Jump to: navigation, search
Line 2: Line 2:
 
  Navbar
 
  Navbar
 
--><tr><td><ul style="text-align: center; margin-bottom: 10px;">
 
--><tr><td><ul style="text-align: center; margin-bottom: 10px;">
{{#ifeq:{{{number|}}}|1
+
{{#ifexist:{{#expr:{{{number|}}}-1}}
 
   |
 
   |
 
   |<li style="background-color: #6E7B91; border: 1.5px solid #333333; border-radius: 3px 3px 3px 3px; box-shadow: 0 0 5px 0 gray; display: inline; font-size: 16px; font-variant: small-caps; font-weight: 600; margin: 0 4px; padding: 1.5px 12px;">[[{{#expr:{{{number|}}}-1}}|<span style="color: #FFFFFF;">&lt; Prev</span>]]</li>|<li style="border: 1.5px ; border-radius: 3px 3px 3px 3px; box-shadow: 0; display: inline; font-size: 16px; font-variant: small-caps; font-weight: 600; margin: 0 4px; padding: 1.5px 12px;"><span style="color: #FFFFFF;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></li>}}
 
   |<li style="background-color: #6E7B91; border: 1.5px solid #333333; border-radius: 3px 3px 3px 3px; box-shadow: 0 0 5px 0 gray; display: inline; font-size: 16px; font-variant: small-caps; font-weight: 600; margin: 0 4px; padding: 1.5px 12px;">[[{{#expr:{{{number|}}}-1}}|<span style="color: #FFFFFF;">&lt; Prev</span>]]</li>|<li style="border: 1.5px ; border-radius: 3px 3px 3px 3px; box-shadow: 0; display: inline; font-size: 16px; font-variant: small-caps; font-weight: 600; margin: 0 4px; padding: 1.5px 12px;"><span style="color: #FFFFFF;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></li>}}
Line 11: Line 11:
 
<tr><td>{{#if:{{{title|}}}|<span style="font-size:20px">'''{{{title|}}}'''</span>}}</td></tr>
 
<tr><td>{{#if:{{{title|}}}|<span style="font-size:20px">'''{{{title|}}}'''</span>}}</td></tr>
 
<tr><td>{{#if:{{{date|}}}|[[Category:Comics{{!}}{{{number|(missing parameter 1)}}}]][[Category:Comics from {{#time:Y|{{{date|(missing parameter 2)}}}}}]][[Category:Comics from {{#time:F|{{{date|}}}}}]][[Category:Comics|{{Num4|{{{number|}}}}}]][[Category:{{#time:l|{{{date|}}}}} Comics]]}}
 
<tr><td>{{#if:{{{date|}}}|[[Category:Comics{{!}}{{{number|(missing parameter 1)}}}]][[Category:Comics from {{#time:Y|{{{date|(missing parameter 2)}}}}}]][[Category:Comics from {{#time:F|{{{date|}}}}}]][[Category:Comics|{{Num4|{{{number|}}}}}]][[Category:{{#time:l|{{{date|}}}}} Comics]]}}
{{#if:{{{image|}}}|[[File:{{{image|}}}{{!}}{{{alttext|}}}]]{{#if:{{{alttext|}}}|<br /><span style="{{{captionstyle|}}}">Alt text: ''{{{alttext|}}}''</span>}}}}
+
{{#if:{{{image|}}}|[[File:{{{image|}}}{{!}}{{{alttext|}}}{{#if:imagesize|}}}|{{!}}{{{imagesize|}}}}}]]{{#if:{{{alttext|}}}|<br /><span style="{{{captionstyle|}}}">Alt text: ''{{{alttext|}}}''</span>}}}}
 
</td></tr></table><noinclude>
 
</td></tr></table><noinclude>
 
==Usage==
 
==Usage==
 
<pre>{{comic
 
<pre>{{comic
| number =  
+
| number   =  
| date   =  
+
| date     =  
| title   = {{PAGENAME}}
+
| title     = {{PAGENAME}}
| image   =  
+
| image     =
| alttext =  
+
| imagesize =  
 +
| alttext   =  
 
}}</pre>
 
}}</pre>
  
 
Note: If the page title is not the comic title, change the "title" field.
 
Note: If the page title is not the comic title, change the "title" field.
 +
 +
The imagesize field is optional for larger comics. The larger dimension (height or width) will be limited to the size. Warning: If the size is larger than the image, the image will be stretched. Format must be in pixels (eg: "200px")
 
</noinclude>
 
</noinclude>

Revision as of 18:33, 3 August 2012

Usage

{{comic
| number    = 
| date      = 
| title     = {{PAGENAME}}
| image     = 
| imagesize = 
| alttext   = 
}}

Note: If the page title is not the comic title, change the "title" field.

The imagesize field is optional for larger comics. The larger dimension (height or width) will be limited to the size. Warning: If the size is larger than the image, the image will be stretched. Format must be in pixels (eg: "200px")