Difference between revisions of "Template:comic"

Explain xkcd: It's 'cause you're dumb.
Jump to: navigation, search
(I don't think we should display the alt-text in italic: it's not the case on xkcd.com / m.xkcd.com, so there could be some visual effect lost.)
(fix parameter name, as pointed out here)
Line 10: Line 10:
 
<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:{{{imagesize|}}}|{{!}}{{{imagesize|}}}}}]]{{#if:{{{alttext|}}}|{{#if:{{{imagesize|}}}|<br />[Click comic to enlarge]}}<br /><span style="{{{captionstyle|}}}"><span style="color:grey">Alt-text:</span> {{{alttext|}}}</span>}}}}
+
{{#if:{{{image|}}}|[[File:{{{image|}}}{{!}}{{{titletext|}}}{{#if:{{{imagesize|}}}|{{!}}{{{imagesize|}}}}}]]{{#if:{{{titletext|}}}|{{#if:{{{imagesize|}}}|<br />[Click comic to enlarge]}}<br /><span style="{{{captionstyle|}}}"><span style="color:grey">Title-text:</span> {{{titletext|}}}</span>}}}}
</td></tr></table><noinclude>
+
</td></tr></table><!--
 +
 
 +
-->{{#if:{{{alttext|}}}|<span class="error">'''Error:''' Please use the titletext= parameter instead of alttext=.</span>}}<noinclude>
 
==Usage==
 
==Usage==
 
<pre>{{comic
 
<pre>{{comic
Line 19: Line 21:
 
| image    =  
 
| image    =  
 
| imagesize =  
 
| imagesize =  
| alttext  =  
+
| titletext =  
 
}}</pre>
 
}}</pre>
  

Revision as of 16:24, 6 August 2012

Usage

{{comic
| number    = 
| date      = 
| title     = {{subst:PAGENAME}}
| image     = 
| imagesize = 
| titletext = 
}}

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: "350px")