Template:Comic: Difference between revisions
Jump to navigation
Jump to search
TinyPonies (talk | contribs) (Fixed last, prev btns, changed bg color to transparent) |
TinyPonies (talk | contribs) (Centered text within middle btn, increased size of arrow btns) |
||
Line 14: | Line 14: | ||
-->|<li style="background-color: transparent; | -->|<li style="background-color: transparent; | ||
border-radius: 1px; | border-radius: 1px; | ||
display: inline-block; font-size: | display: inline-block; font-size: 32px; font-variant: small-caps; font-weight: 900; | ||
-webkit-text-stroke: | -webkit-text-stroke: 2.5px #ff5402; margin: 0 4px; padding: 0; height: 100%;"><!-- | ||
link to #1 | link to #1 | ||
-->[[1|<span style="color: #fff; padding: 0 12px;"><<</span>]]</li><!-- | -->[[1|<span style="color: #fff; padding: 0 12px;"><<</span>]]</li><!-- | ||
Line 22: | Line 22: | ||
--><li style="background-color: transparent; | --><li style="background-color: transparent; | ||
border-radius: 1px; | border-radius: 1px; | ||
display: inline-block; font-size: | display: inline-block; font-size: 32px; font-variant: small-caps; font-weight: 900; | ||
-webkit-text-stroke: | -webkit-text-stroke: 2.5px #ff5402; margin: 0 0.5em; padding: 0; height: 100%;"><!-- | ||
link to previous comic | link to previous comic | ||
Line 34: | Line 34: | ||
--><li style="background-color: #fa9b63; | --><li style="background-color: #fa9b63; | ||
border-radius: 1px; | border-radius: 1px; | ||
display: | display: flex; font-size: 16px; font-variant: small-caps; font-weight: 600; | ||
margin: 0 | margin: 0 0.5em; padding: 0.5em 0.75em;" | ||
class="plainlinks"><!-- | class="plainlinks"> | ||
<div style="display: block; margin: auto 1em;"><!-- | |||
[ and ] makes an external link, vs. [[ and ]] which are internal only. | [ and ] makes an external link, vs. [[ and ]] which are internal only. | ||
Line 50: | Line 51: | ||
Generate the title, with date if it exists | Generate the title, with date if it exists | ||
--><span style="color: #592305; padding: 0 | --><span style="color: #592305; padding: 0;">Comic <!-- | ||
-->{{#ifexpr:{{{number|-1}}}>= 1|#|}}{{{number|}}} {{#if:{{{date|}}}|({{{date}}})}}</span>]</li><!-- | -->{{#ifexpr:{{{number|-1}}}>= 1|#|}}{{{number|}}} {{#if:{{{date|}}}|({{{date}}})}}</span>] | ||
</div></li><!-- | |||
Now make the next and >| buttons provided comic number exists | Now make the next and >| buttons provided comic number exists | ||
Line 62: | Line 64: | ||
-->|<li style="background-color: transparent; | -->|<li style="background-color: transparent; | ||
border-radius: 1px; | border-radius: 1px; | ||
display: inline-block; font-size: | display: inline-block; font-size: 32px; font-variant: small-caps; font-weight: 900; | ||
-webkit-text-stroke: | -webkit-text-stroke: 2.5px #ff5402; margin: 0 4px; padding: 0; height: 100%;"><!-- | ||
-->[[{{#expr:{{{number}}}+1}}{{!}}<span style="color: #fff; padding: 0 12px;">></span>]]</li><!-- | -->[[{{#expr:{{{number}}}+1}}{{!}}<span style="color: #fff; padding: 0 12px;">></span>]]</li><!-- | ||
Line 69: | Line 71: | ||
--><li style="background-color: transparent; | --><li style="background-color: transparent; | ||
border-radius: 1px; | border-radius: 1px; | ||
display: inline-block; font-size: | display: inline-block; font-size: 32px; font-variant: small-caps; font-weight: 900; | ||
-webkit-text-stroke: | -webkit-text-stroke: 2.5px #ff5402; margin: 0 4px; padding: 0; height: 100%;"><!-- | ||
-->[[{{LATESTCOMIC}}{{!}}<span style="color: #fff; padding: 0 12px;">>></span>]]</li><!-- | -->[[{{LATESTCOMIC}}{{!}}<span style="color: #fff; padding: 0 12px;">>></span>]]</li><!-- | ||
Revision as of 13:56, 19 November 2024
This is the basic infobox-style header template used to display xkcd comics on their own pages, including the comic number (with external link to xkcd), publication date, title, comic image, and title text.
Sample
The following is a sample usage of this template:
2008-03-25 |
Title text: 2008-03-25 |
Votey
Usage
{{comic | number = | date = | title = | name = | before = | image = | custom = | customvotey= | imagesize = | noexpand = | titletext = | ldomain = | lappend = }}
Notes
The above sample is produced by the following code:
{{comic | number = 1127 | date = March 25, 2008 | title = 2008-03-25 | name = 2008-03-25 | image = 20080325.gif | votey = 20080325after.gif | titletext = 2008-03-25 }}