Difference between revisions of "Template:series"
| Line 44: | Line 44: | ||
- Explain the previous/next --> The {{#if:{{{prev_title|}}}|previous one ([[{{{prev_title}}}]]) was released on {{{prev_date}}}{{#if:{{{next_title|}}}|, while the|.}}|}} {{#if:{{{next_title|}}}| next one ([[{{{next_title}}}]]) was released on {{{next_date}}}.}}|}} {{#if:{{{extra_text|}}}|{{{extra_text}}} }} You can [[April Fools' Day comics|view all April Fools' Day comics]] or [[:Category:April Fools' Day comics|learn more about them]]. | - Explain the previous/next --> The {{#if:{{{prev_title|}}}|previous one ([[{{{prev_title}}}]]) was released on {{{prev_date}}}{{#if:{{{next_title|}}}|, while the|.}}|}} {{#if:{{{next_title|}}}| next one ([[{{{next_title}}}]]) was released on {{{next_date}}}.}}|}} {{#if:{{{extra_text|}}}|{{{extra_text}}} }} You can [[April Fools' Day comics|view all April Fools' Day comics]] or [[:Category:April Fools' Day comics|learn more about them]]. | ||
{{!}}- | {{!}}- | ||
| − | ! <li style="background-color: #FFFFF; | + | ! <ul style="text-align: center; margin-top:2px; margin-bottom:{{#if:{{{ognumber|}}}|20px|10px}};" class="no-link-underline"><!-- |
| + | |||
| + | {{{ognumber}}} is given and not 1, so make a list item and put a button in it that links to #7 | ||
| + | -->|<li style="background-color: #FFFFF; | ||
| + | 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 0;"><!-- | ||
| + | |||
| + | Now link to #7. Why #7 and not #1? → see [[LiveJournal]] | ||
| + | -->[[7: Girl sleeping (Sketch -- 11th grade Spanish class)|<span style="color: #6E7B91; padding: 0 12px; white-space: nowrap;" title="">|<</span>]]</li><!-- | ||
| + | |||
| + | Let's make the back button! | ||
| + | PIPE REMOVED--><li style="background-color: #FFFFF; | ||
border: 1.5px solid #333333; border-radius: 3px 3px 3px 3px; box-shadow: 0 0 5px 0 gray; | 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; | display: inline; font-size: 16px; font-variant: small-caps; font-weight: 600; | ||
| Line 50: | Line 62: | ||
Link to the previous comic | Link to the previous comic | ||
| − | -->{{# | + | -->[[{{{ogprev|<span style="color:red">ERROR: PREVIOUS NUMBER MISSING.<br><br>PLEASE ADD <code><nowiki>|OGPREV=NUMBER</nowiki></code> TO THE PAGE!<br><br> </span>}}}|<span style="color: #6E7B91; padding: 0 12px;" title="">< Prev #{{{ogprev}}}</span>]]</li><!-- |
| + | |||
| + | {{{ognumber}}} is 1, so let's put non-breaking spaces here | ||
| + | -->| <!-- | ||
| + | |||
| + | Close up shop-->}}}}<!-- | ||
| + | |||
| + | Since we have {{{ognumber}}}, we need to say the original comic number at the center. | ||
| + | -->{{#if:{{{ognumber|}}}|<!--{{#ifexpr:{{{ognumber|1}}}!=1|--><!-- | ||
| + | |||
| + | Ok {{ognumber}} is not 1, go wild! | ||
| + | --><li style="background-color: #FFFFFF; | ||
| + | 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 0;" class="plainlinks"><!-- | ||
| − | --> | + | Depending on whether {{{ognumber}}} is 1 or not, toggle between using wide link mode or number link mode. |
| + | Wide link mode requires {{{lappend}}} to be set, while {{{ldomain}}} can default to www | ||
| + | --><!-- | ||
| + | NOT USING THESE - [{{#ifexpr:{{{number|-1}}}>=1 | ||
| + | NOT USING THESE - Comic number is probably valid, use number link mode | ||
| + | |https://xkcd.com/{{{number}}} | ||
| + | NOT USING THESE - Comic number is invalid or doesn't exist, use wide link mode | ||
| + | |https://{{{ldomain|www}}}.xkcd.com/{{{lappend}}}}} (This would need another two curly because added another IF statement) | ||
| − | --> | + | Ok now generate the number, with ognote if it exists, or else it defaults to "(Original Order)" |
| − | + | -->[[LiveJournal#G|<span style="color: #6E7B91; padding: 0 12px;" title="Click to learn why the original xkcd comics were in a different order!"><!-- | |
| + | |||
| + | Add ognote in parenthesis | ||
| + | -->#{{{ognumber|}}} {{#if:{{{ognote|}}}|({{#replace:{{{ognote}}}| | }})|(Original Order)}}<!-- Comic #{{{ognumber|}}} <u>(Original order)</u> | ||
| + | --></span>]]}}</li><!-- | ||
| − | + | Now make the next and >| buttons, provided the {{{ognumber}}} exists | |
| + | -->{{#ifexist:{{#expr:{{{ognumber|-2}}}+1}}<!-- | ||
| − | + | Check if this is 55 (which is the latest LiveJournal comic). If it is 55, then don't display the "Next" and >| buttons. | |
| + | Why #52 and not #LATESTCOMIC? → see [[LiveJournal]] | ||
| + | -->|{{#ifexpr:52-{{{ognumber|1}}}>0<!-- | ||
| + | |||
| + | {{ognumber}} IS NOT 52, generate the Next and >| buttons | ||
| + | -->|<li style="background-color: #FFFFF; | ||
| + | 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 0;"><!-- | ||
| + | -->[[{{{ognext|<span style="color:red"><br><br>ERROR: NEXT NUMBER MISSING.<br><br>PLEASE ADD <code><nowiki>|OGNEXT=NUMBER</nowiki></code> TO THE PAGE!<br><br> </span>}}}|<span style="color: #6E7B91; padding: 0 12px;" title="">#{{{ognext}}} Next ></span>]]</li><!-- | ||
| + | |||
| + | Make a button that points to 55 (which is the latest LiveJournal comic) | ||
| + | --><li style="background-color: #FFFFF; | ||
| + | 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 0;"><!-- | ||
| + | -->[[55: Useless{{!}}<span style="color: #6E7B91; padding: 0 12px; white-space: nowrap;" title="">>|</span>]]</li><!-- | ||
| − | + | Comic number (plus one) is the latest, so don't show the buttons | |
| + | The spaces below are needed to make the other buttons look like they're centered even if a portion of the buttons are missing | ||
| + | -->| }}|}}</ul>}}</span></center> | ||
{{!}}}</includeonly><noinclude><!-- | {{!}}}</includeonly><noinclude><!-- | ||
Revision as of 13:48, 12 May 2025
This template is used in the April Fools' Day comics such as 3074: Push Notifications. Example:
| < Previous April Fools' Day comics Next > |
|---|
| |
The example above was generated by:
{{series
| series = April
| date = April 1, 2007
| number = 2
| days_late = 55
| day_category = Sunday
| prev_title = Syndication
| prev_date = April 1, 2007
| next_title = 404: Not Found
| next_date = April 1, 2009
| extra_text = Hello!
}}
Documentation
{{series
| series = April
| date = April 1, 2007
| number = 2
| days_late = 55
| day_category = Sunday
| prev_title = Syndication
| prev_date = April 1, 2007
| next_title = 404: Not Found
| next_date = April 1, 2009
| extra_text = Hello!
}}
- series
- Specifies which series this comic belongs to. Currently, only
Aprilis supported, which refers to the April Fools' Day comics by Randall.
- date
- The release date of this comic, e.g.,
April 1, 2008. This is shown after Randall Munroe's name. Optional.
- number
- The ordinal number of this comic in the series. For example,
4if it's the fourth April Fools' Day comic. Must be a number.
- days_late
- The number of days this comic was released after its intended date. If provided alone, the text will say it was released that many days late. Optional.
- day_category
- A category label such as
MondayorFriday(without the word "comics") used to link to a category like Category:Friday comics. If given in addition todays_late, it will say the comic was releasedX days late on a Y.
- prev_title
- The title of the previous comic in the series, e.g.,
2915: Lab Report. This will be linked as the prior entry in the sequence. Optional.
- prev_date
- The release date of the previous comic. Required if
prev_titleis provided, to show when it came out.
- next_title
- The title of the next comic in the series, e.g.,
2917: AI Future. Optional. Adds a forward navigation link.
- next_date
- The release date of the next comic. Required if
next_titleis provided, to show when it came out.
- extra_text
- Any additional sentences to be display at the end of the main description, such as the text
Hello!in the example above. Optional.
