Template:POTD row and Template:POTD row/sandbox: Difference between pages
modify white space (TPER) |
m fixup |
||
Line 1: | Line 1: | ||
<div class="potd-container" style="{{display-flex}} {{{{{|safesubst:}}}#ifexpr: {{{rowsize|{{{size|350}}}}}} >= 400 |
|||
{| role="presentation" style="margin:0 3px 3px; width:100%; box-sizing:border-box; text-align:{{{{{|safesubst:}}}#if:{{{size|{{{rowsize|350}}}}}}|{{{{{|safesubst:}}}#ifexpr:{{{size|{{{rowsize|350}}}}}}>400|center|left}}|{{{{{|safesubst:}}}#ifexpr:{{{size|350}}}>400|center|left}}}}; background-color:transparent; border-collapse:collapse; {{{{{|safesubst:}}}#if:{{{size|{{{rowsize|350}}}}}}|{{{{{|safesubst:}}}#ifexpr:{{{size|{{{rowsize|350}}}}}}>400|padding:0.9em|}}|{{{{{|safesubst:}}}#ifexpr:{{{size|350}}}>400|padding:0.9em|}}}}" |
|||
|{{flex-direction|column}} |
|||
| {{{{{|safesubst:}}}#if:{{{size|{{{rowsize|350}}}}}}|{{{{{|safesubst:}}}#ifexpr:{{{size|{{{rowsize|350}}}}}}<=400|style="padding:0 0.9em 0 0; width:{{{size|{{{rowsize|350}}}}}}px;" {{{{{|safesubst:}}}!}}|}}|{{{{{|safesubst:}}}#ifexpr:{{{size|350}}}<=400|style="padding:0 0.9em 0 0; width:{{{size|{{{rowsize|350}}}}}}px;" {{{{{|safesubst:}}}!}}|}}}} {{{{{|safesubst:}}}#if:{{{wide|}}} |
|||
|{{flex-direction|row}} |
|||
⚫ | |||
}} align-items: center;"> |
|||
⚫ | |||
<div class="potd-image" style="{{box-flex|1 1 10%}} {{{{{|safesubst:}}}#ifexpr: {{{rowsize|{{{size|350}}}}}} >= 400 |
|||
|{{tall image|{{{image|No-image.svg}}}|300|alt={{{alttext|{{{texttitle}}}}}}}} |
|||
|margin: 0 0 0.5em 0; float: none; |
|||
|{{{{{|safesubst:}}}#if:{{{image2|}}}|<div>}}[[File:{{{image1|{{{thumb|{{{image|No-image.svg}}}}}}}}}|{{{{{|safesubst:}}}#if:{{{size|{{{rowsize|350x250}}}}}}|{{{size|{{{rowsize|350x250}}}}}}|{{{size|350x250}}}}}px{{{{{|safesubst:}}}#if:{{{thumbtime1|{{{thumbtime|}}}}}}|{{{{{|safesubst:}}}!}}thumbtime={{{thumbtime1|{{{thumbtime}}}}}}}}|{{{alt1|{{{alttext|{{{texttitle}}}}}}}}}{{{{{|safesubst:}}}#if:{{{imagelink1|{{{imagelink|}}}}}}|{{{{{|safesubst:}}}!}}link=File:{{{imagelink1|{{{imagelink|}}}}}}|}}]]{{{{{|safesubst:}}}#if:{{{image2|}}}|</div><div style="margin-top:0.5em;">[[File:{{{image2|No-image.svg}}}|{{{{{|safesubst:}}}#if:{{{size|{{{rowsize|350x250}}}}}}|{{{size|{{{rowsize|350x250}}}}}}|{{{size|350x250}}}}}px{{{{{|safesubst:}}}#if:{{{thumbtime2|}}}|{{{{{|safesubst:}}}!}}thumbtime={{{thumbtime2}}}}}|{{{alt2}}}{{{{{|safesubst:}}}#if:{{{imagelink2|}}}|{{{{{|safesubst:}}}!}}link=File:{{{imagelink2}}}|}}]]</div>}} |
|||
|margin: 0 1em 0 0; float: left; |
|||
⚫ | |||
}} text-align: center;"> |
|||
}} |
|||
{{{{{|safesubst:}}}#if:{{{ |
{{{{{|safesubst:}}}#if: {{{wide|}}} |
||
⚫ | |||
{{{{{|safesubst:}}}!}}- |
|||
⚫ | |||
{{{{{|safesubst:}}}!}} style="padding:0 0.9em; text-align:left;" {{{{{|safesubst:}}}!}}|{{{{{|safesubst:}}}!}} style="padding:0 6px 0 0" {{{{{|safesubst:}}}!}} |
|||
|{{tall image|{{{image|No-image.svg}}}|300|alt={{{alttext|{{{texttitle}}}}}} }} |
|||
|[[File:{{{thumb|{{{image|No-image.svg}}}}}}|{{{rowsize|{{{size|350x250}}}}}}px {{{{{|safesubst:}}}#if: {{{thumbtime|}}}| {{{{{|safesubst:}}}!}} thumbtime={{{thumbtime}}} }}|{{{alttext|{{{texttitle}}}}}} {{{{{|safesubst:}}}#if: {{{imagelink|}}}|{{{{{|safesubst:}}}!}}link=File:{{{imagelink}}}|}}]] |
|||
{{{{{|safesubst:}}}!}}- |
|||
⚫ | |||
{{{{{|safesubst:}}}!}} style="padding:0 0.9em; text-align:left;" {{{{{|safesubst:}}}!}}|{{{{{|safesubst:}}}!}} style="padding:0 6px 0 0" {{{{{|safesubst:}}}!}} |
|||
}} |
}}</div> |
||
<div class="potd-caption" style="{{box-flex|1 1 90%}}"> |
|||
{{{{{|safesubst:}}}#if:{{{thumb|}}}|<p style="font-size:150%; text-align:center; |
{{{{{|safesubst:}}}#if:{{{thumb|}}}|<p class="plainlinks" style="font-size: 150%; text-align: center;">[{{filepath:{{{image}}}}} View the animation]</p>}} |
||
{{{caption}}} |
{{{caption}}} |
||
{{{{{|safesubst:}}}#if:{{{credit|}}}|<p |
{{{{{|safesubst:}}}#if:{{{credit|}}}|<p><small>{{{credit}}}</small></p>}} |
||
<div class="potd-recent" style="text-align:right;"> |
<div class="potd-recent" style="text-align:right;"> |
||
Recently featured: <div class="hlist hlist-separated inline"> |
Recently featured: <div class="hlist hlist-separated inline"> |
||
Line 27: | Line 28: | ||
* '''[[Wikipedia:Featured pictures|More featured pictures]]''' |
* '''[[Wikipedia:Featured pictures|More featured pictures]]''' |
||
</div> |
</div> |
||
</div> |
|||
</div>{{{{{|safesubst:}}}ifsubst|<<noinclude/>noinclude><includeonly>[[Category:Wikipedia Picture of the day </includeonly>{{#time:F Y|<includeonly>{{{date|{{SUBPAGENAME}}}}}</includeonly>}}<includeonly>]]</includeonly> |
|||
== See also == |
== See also == |
Revision as of 16:11, 27 May 2020
{{{caption}}}
![]() | This is the template sandbox page for Template:POTD row (diff). See also the companion subpage for test cases. |
![]() | This template should always be substituted (i.e., use {{subst:POTD row}} ). |
A row style for WP:POTD templates.
Usage
This template can be used to generate protected versions of the Picture of the day in the standard format needed for the Main page.
The easiest way to create the protected version of the POTD is to click the "create protected version" link on this month's archive page. This will create a new page preloaded with a template call to the non-protected version. Then replace the first line with {{subst:POTD row
(note no closing braces) and save it. Please note that the non-protected version needs to be created before the protected version.
An alternate method is to cut and paste the code of the non-protected version and replace the first line with {{subst:POTD row
(also note no closing braces) before saving it.
This template should always be substituted. As stated on Wikipedia:Picture of the day/Guidelines#Protected version, there are two versions: a protected version that appears on the Main Page, and a non-protected version for non-admins to make updates to the POTD caption. If this template is NOT substituted, various meta-templates used to generate POTDs will automatically be cascade-protected, and non-admins would not be able to create/edit recent and upcoming non-protected versions.
Parameters
|image=
- Filename in single image mode
|image1=
and|image2=
- Filenames in dual images mode
|thumb=
- Override displayed thumbnail. Actual image will be linked in caption.
|caption=
- Text describing the image or images.
|credit=
- Attribution text shown beside the image or images.
|size=
and|rowsize=
- Control the size of the image, which determines the relative layout of the image and the blurb
|wide=
and|tall=
- Mutually exclusive optional boolean flags to use Template:Wide image or Template:Tall image.
|dir=
- Scroll direction for wide images, see Template:Wide image.
|alttext=
,|alttext1=
and|alttext2=
for dual mode (aliases|texttitle=
,|texttitle1=
, and|texttitle2=
))- Alt text for the image
|imagelink=
(|imagelink1=
and|imagelink2=
for dual mode)- Overrides linking to file pages.
|thumbtime=
(|thumbtime1=
and|thumbtime2=
for dual mode)- See Wikipedia:Extended image syntax § Thumbtime in a gallery
|date=
- Override default POTD date detection, which uses page name.
Example
Markup | {{POTD/{{#time:Y-m-d}}|row}}
| ||
---|---|---|---|
Renders as |
|
See also
- Wikipedia:Picture of the day/Guidelines on how to create and edit Picture of the day captions.