Template:Comic: Difference between revisions
Jump to navigation
Jump to search
TinyPonies (talk | contribs) (Styled navbar CSS to look like SMBC instead of XKCD) |
TinyPonies (talk | contribs) (Fixed last, prev btns, changed bg color to transparent) |
||
Line 12: | Line 12: | ||
{{{number}}} is greater than 1; make a list item and put a button in it that links to #1 | {{{number}}} is greater than 1; make a list item and put a button in it that links to #1 | ||
-->|<li style="background-color: | -->|<li style="background-color: transparent; | ||
border-radius: 1px; | border-radius: 1px; | ||
display: inline-block; font-size: 30px; font-variant: small-caps; font-weight: 900; | display: inline-block; font-size: 30px; font-variant: small-caps; font-weight: 900; | ||
-webkit-text-stroke: 2px #ff5402; margin: 0 4px; padding: 0; height: 100%;"><!-- | -webkit-text-stroke: 2px #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><!-- | ||
We're not done here yet, make the back button next | We're not done here yet, make the back button next | ||
--><li style="background-color: | --><li style="background-color: transparent; | ||
border-radius: 1px; | border-radius: 1px; | ||
display: inline-block; font-size: 30px; font-variant: small-caps; font-weight: 900; | display: inline-block; font-size: 30px; font-variant: small-caps; font-weight: 900; | ||
Line 26: | Line 26: | ||
link to previous comic | link to previous comic | ||
-->[[{{#expr:{{{number}}}-1}}|<span style="color: #fff; padding: 0 12px;"> | -->[[{{#expr:{{{number}}}-1}}|<span style="color: #fff; padding: 0 12px;"><</span>]]</li><!-- | ||
{{{number}}} doesn't exist or is less than 1; just put non-breaking spaces here | {{{number}}} doesn't exist or is less than 1; just put non-breaking spaces here | ||
Line 60: | Line 60: | ||
Comic number is valid, generate the buttons | Comic number is valid, generate the buttons | ||
-->|<li style="background-color: | -->|<li style="background-color: transparent; | ||
border-radius: 1px; | border-radius: 1px; | ||
display: inline-block; font-size: 30px; font-variant: small-caps; font-weight: 900; | display: inline-block; font-size: 30px; font-variant: small-caps; font-weight: 900; | ||
Line 67: | Line 67: | ||
Make a button that points to LATESTCOMIC (which is of course the latest comic) | Make a button that points to LATESTCOMIC (which is of course the latest comic) | ||
--><li style="background-color: | --><li style="background-color: transparent; | ||
border-radius: 1px; | border-radius: 1px; | ||
display: inline-block; font-size: 30px; font-variant: small-caps; font-weight: 900; | display: inline-block; font-size: 30px; font-variant: small-caps; font-weight: 900; |
Revision as of 13:16, 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 }}