Difference between revisions of "Template:series"

Explain xkcd: It's 'cause you're dumb.
Jump to: navigation, search
(Undo revision 377557 by FaviFake (talk))
(Undo revision 377558 by FaviFake (talk))
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="">&#124;&lt;</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
           -->{{#if:{{{prev_title|}}}|[[{{{prev_title|}}}|<&nbsp;Previous&nbsp;April&nbsp;Fools'&nbsp;Day&nbsp;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>&nbsp;&nbsp;&nbsp;</span>}}}|<span style="color: #6E7B91; padding: 0 12px;" title="">&lt;&nbsp;Prev&nbsp;&#35;{{{ogprev}}}</span>]]</li><!--
 +
 
 +
              {{{ognumber}}} is 1, so let's put non-breaking spaces here
 +
              -->|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--
 +
 
 +
          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"><!--
  
--> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <!--
+
          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)
  
--> }}</li> <!--
+
          Ok now generate the number, with ognote if it exists, or else it defaults to "(Original Order)"
                            --> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <!--
+
          -->[[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
 +
          -->&#35;{{{ognumber|}}}&nbsp;{{#if:{{{ognote|}}}|({{#replace:{{{ognote}}}| |&nbsp;}})|(Original&nbsp;Order)}}<!-- Comic&nbsp;&#35;{{{ognumber|}}}&nbsp;<u>(Original&nbsp;order)</u>
 +
          --></span>]]}}</li><!--
  
                            -->[[:Category:April Fools' Day comics|View&nbsp;all]]<!--
+
        Now make the next and >| buttons, provided the {{{ognumber}}} exists
 +
      -->{{#ifexist:{{#expr:{{{ognumber|-2}}}+1}}<!--
  
                            --> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {{#if:{{{next_title|}}}|<!--
+
        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>&nbsp;&nbsp;&nbsp;</span>}}}|<span style="color: #6E7B91; padding: 0 12px;" title="">&#35;{{{ognext}}}&nbsp;Next&nbsp;&gt;</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="">&gt;&#124;</span>]]</li><!--
  
                            -->[[{{{next_title|}}}|Next&nbsp;April&nbsp;Fools'&nbsp;Day&nbsp;comic&nbsp;>]] &nbsp; &nbsp; &nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}}</span></center>
+
        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
 +
-->|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;              }}|}}</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 >      
This is the 2nd xkcd April Fools' Day comic, released by Randall on April 1, 2007. It was published 55 days late on a Sunday, deviating from the standard release schedule to honor April Fools' Day. Hello! You can view all April Fools' Day comics or learn more about them!

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 April is 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, 4 if 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 Monday or Friday (without the word "comics") used to link to a category like Category:Friday comics. If given in addition to days_late, it will say the comic was released X 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_title is 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_title is 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.