Template:Comic: Difference between revisions
Created page with " <noinclude> <templatedata> { "params": { "url": { "label": "URL", "description": "URL of the post.", "example": "https://www.tumblr.com/crawfishcomic/698282921150316545/equation", "type": "url", "required": true }, "image": { "label": "Image", "description": "URL of the image for the comic. To get this, open the image in the post, click \"copy link\" and replace .pnj with .png.", "example": "https://64.media.tumblr.com/65d9bac35c8f28a5e629..." |
m 24 revisions imported |
||
(23 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
<templatedata> | <templatedata> | ||
Line 51: | Line 50: | ||
"description": "Date of the comic being posted, in YYYY-MM-DD format. Only fill this if the post date is different from the date in the tags. Note that crawfishcomic seems to be in the Australlian timezone; dates should match said timezone.", | "description": "Date of the comic being posted, in YYYY-MM-DD format. Only fill this if the post date is different from the date in the tags. Note that crawfishcomic seems to be in the Australlian timezone; dates should match said timezone.", | ||
"example": "2022-10-16" | "example": "2022-10-16" | ||
}, | |||
"is video": { | |||
"label": "Is video", | |||
"description": "\"true\" if the comic is a video.", | |||
"type": "boolean", | |||
"default": "false", | |||
"autovalue": "false" | |||
}, | |||
"prev is video": {}, | |||
"next is video": {}, | |||
"prev is comic": {}, | |||
"next is comic": {}, | |||
"no category": { | |||
"label": "No category", | |||
"description": "If true, excludes categories", | |||
"type": "boolean", | |||
"default": "false", | |||
"autovalue": "false" | |||
}, | |||
"image2": { | |||
"label": "Image 2", | |||
"description": "URL to the second image of the comic, for comics with 2 pages.", | |||
"type": "url" | |||
} | } | ||
}, | }, | ||
Line 57: | Line 79: | ||
"url", | "url", | ||
"image", | "image", | ||
"image2", | |||
"title", | "title", | ||
"number", | "number", | ||
Line 62: | Line 85: | ||
"caption", | "caption", | ||
"tags", | "tags", | ||
"post date" | "post date", | ||
] | "is video", | ||
"no category", | |||
"prev is video", | |||
"next is video", | |||
"prev is comic", | |||
"next is comic" | |||
], | |||
"format": "block" | |||
} | } | ||
</templatedata> | </templatedata> | ||
</noinclude> | == Examples == | ||
{{Comic | |||
| url = https://www.tumblr.com/crawfishcomic/698282921150316545/equation | |||
| image = https://64.media.tumblr.com/65d9bac35c8f28a5e6299ade31194d51/e99e4de49bd847f7-3f/s1280x1920/604cd805f1b53d146c89f95058c7eb92790a2946.png | |||
| title = Equation | |||
| number = 69 | |||
| date = 2022-10-16 | |||
| tags = tag1,tag2 | |||
| no category = true | |||
}} | |||
{{#cargo_declare: | |||
_table = comics | |||
|url = URL | |||
|image = URL | |||
|tags = List (,) of String | |||
|caption = String | |||
|number = Integer | |||
|date = Date | |||
|post_date = Date | |||
}} | |||
</noinclude><includeonly> | |||
<div class="comic"> | |||
<div class="prev-title-next"><!-- | |||
--><span class="previous">{{#ifeq: {{#ifeq: {{{is video|false}}}|true|Video |}}{{{number}}}|1||{{#ifeq: {{{is video|false}}}|true|<!-- | |||
is video: -->{{#if: {{{prev is comic|}}}|[[{{{prev is comic}}}]]|[[Video {{#expr: {{{number}}} - 1}}]]}}|<!-- | |||
is not video: -->{{#if: {{{prev is video|}}}|[[Video {{{prev is video}}}]]|[[{{#expr: {{{number}}} - 1}}]]}}<!-- | |||
-->}} <span class="dim-label">''Previous''</span>}}</span><!-- | |||
--><span class="title">{{#ifeq: {{{is video|false}}}|true|Video |}}{{{number}}}: {{{title}}}</span><!-- | |||
--><span class="next">{{#ifeq: {{#ifeq: {{{is video|false}}}|true|Video |}}{{{number}}}|{{Latest post}}||<span class="dim-label">''Next''</span> {{#ifeq: {{{is video|false}}}|true|<!-- | |||
is video: -->{{#if: {{{next is comic|}}}|[[{{{next is comic}}}]]|[[Video {{#expr: {{{number}}} + 1}}]]}}|<!-- | |||
is not video: -->{{#if: {{{next is video|}}}|[[Video {{{next is video}}}]]|[[{{#expr: {{{number}}} + 1}}]]}}<!-- | |||
-->}}}}</span><!-- | |||
--></div> | |||
<div class="image-container">[{{{url}}} {{{image}}}]{{#if: {{{image2|}}}|[{{{url}}} {{{image2}}}]|}}</div> | |||
<span class="caption"><span class="dim-label">''Caption:''</span> {{{caption|{{{title}}}}}}</span> | |||
<span class="caption tags"><span class="dim-label tag">#CrawfishComic</span> <span class="dim-label tab">#{{dateformat|{{{date}}}}}</span> {{#if: {{{tags|}}}|<span class="dim-label tab">#{{#replace:{{{tags}}}|,|</span><span class="dim-label tab">#}}</span>|}}</span> | |||
</div>{{#ifeq: {{{PAGETITLE}}}|Main Page||{{#ifeq: {{{no category|false}}}|false|{{#ifeq: {{{is video|false}}}|true|[[Category:Videos|{{{title}}}]]|[[Category:Comics|{{{title}}}]]}}}}}} | |||
</includeonly> |
Latest revision as of 21:09, 25 October 2024
Template representing a comic.
Parameter | Description | Type | Status | |
---|---|---|---|---|
URL | url | URL of the post.
| URL | required |
Image | image | URL of the image for the comic. To get this, open the image in the post, click "copy link" and replace .pnj with .png.
| URL | required |
Image 2 | image2 | URL to the second image of the comic, for comics with 2 pages. | URL | optional |
Title | title | Title of the comic. This will usually be the caption.
| String | required |
Number | number | Number of the comic. | Number | required |
Date | date | Date of the comic's creation, from the post tags, in YYYY-MM-DD format.
| Date | required |
Caption | caption | Full caption of the image. Only fill this is the caption is more than just the title. | Content | optional |
Tags | tags | Tags of the post, separated by commas. Don't include the "crawfishcomic" and date tags. | Unknown | optional |
Post date | post date | Date of the comic being posted, in YYYY-MM-DD format. Only fill this if the post date is different from the date in the tags. Note that crawfishcomic seems to be in the Australlian timezone; dates should match said timezone.
| Unknown | optional |
Is video | is video | "true" if the comic is a video.
| Boolean | optional |
No category | no category | If true, excludes categories
| Boolean | optional |
prev is video | prev is video | no description | Unknown | optional |
next is video | next is video | no description | Unknown | optional |
prev is comic | prev is comic | no description | Unknown | optional |
next is comic | next is comic | no description | Unknown | optional |
Examples
This template defines the table "comics". This table has not been created yet.