Шаблон:Release table row — различия между версиями
Материал из Guild Wars 2 wiki
Blood (обсуждение | вклад) |
Blood (обсуждение | вклад) |
||
Строка 1: | Строка 1: | ||
− | <includeonly>|- class="line-bottom" style="vertical-align: top;" {{#vardefine:default_file|{{#replace:{{#show:{{{name|}}}|?Has canonical name|default={{{name}}}}}|:|-}} backdrop.jpg}} | + | <includeonly>|- class="line-bottom" style="vertical-align: top;" {{#vardefine:default_file|{{#replace:{{#show:{{{name|}}}|?Has canonical name|default={{{name}}}}}|:|-}} backdrop.jpg}}{{#vardefine:smw_name|{{#show:{{{name|}}}|?Has canonical name}}}} |
− | | {{#if: {{{description|}}} | title="{{#replace:{{{description}}}|"|"}}"}} | | + | | {{#ifeq: {{{file|}}} | none | style="vertical-align: middle; padding-left: 20px; line-height: 145%;" {{!}} '''{{#ifexpr: {{#time: U | now }} > {{#time: U | {{{date|2014-10-10}}} }} | [[Game updates/{{{date|}}}|{{#time: F j, Y | {{{date|}}} }}]] | {{#time: F j, Y | {{{date|}}} }} }}''' {{#if: {{{name|}}} | <br><span style="font-size: 85%">[[{{{name}}}|{{{label|{{#var:smw_name|{{{name}}}}}}}}]]</span> }} {{#if: {{{description|}}} | title="{{#replace:{{{description}}}|"|"}}"}} | |
<div class="release-image" style="position:relative; width:206px; height:{{{height|60px}}}; overflow:hidden;"> | <div class="release-image" style="position:relative; width:206px; height:{{{height|60px}}}; overflow:hidden;"> | ||
<div style="position:absolute; left:{{{left|0px}}}; top:{{{top|0px}}}; {{#ifeq: {{{flip|}}} | y | transform: scaleX(-1); }}">[[File:{{{file|{{#ifexist: File:{{#var:default_file}} | {{#var:default_file}} | Default backdrop.jpg}}}}}|{{{scale|}}}|link=]]</div> | <div style="position:absolute; left:{{{left|0px}}}; top:{{{top|0px}}}; {{#ifeq: {{{flip|}}} | y | transform: scaleX(-1); }}">[[File:{{{file|{{#ifexist: File:{{#var:default_file}} | {{#var:default_file}} | Default backdrop.jpg}}}}}|{{{scale|}}}|link=]]</div> | ||
<div style="position:absolute; top:5px; left:13px; font-family:Georgia, serif; font-size: 15px;">{{#ifexpr: {{#time: U | now }} > {{#time: U | {{{date|2014-10-10}}} }} | [[Game updates/{{{date|}}}|<span style="color:{{{date-color|white}}}; text-shadow:0px 0px 3px black,1px 1px 3px black,1px 1px 4px black,2px 2px 4px black;">{{#time: j xg Y | {{{date|}}} }}</span>]] | <span style="color:{{{date-color|white}}}; text-shadow:0px 0px 3px black,1px 1px 3px black,1px 1px 4px black,2px 2px 4px black;">{{#time: j xg Y | {{{date|}}} }}</span> }}</div> | <div style="position:absolute; top:5px; left:13px; font-family:Georgia, serif; font-size: 15px;">{{#ifexpr: {{#time: U | now }} > {{#time: U | {{{date|2014-10-10}}} }} | [[Game updates/{{{date|}}}|<span style="color:{{{date-color|white}}}; text-shadow:0px 0px 3px black,1px 1px 3px black,1px 1px 4px black,2px 2px 4px black;">{{#time: j xg Y | {{{date|}}} }}</span>]] | <span style="color:{{{date-color|white}}}; text-shadow:0px 0px 3px black,1px 1px 3px black,1px 1px 4px black,2px 2px 4px black;">{{#time: j xg Y | {{{date|}}} }}</span> }}</div> | ||
− | <div style="position:absolute; top:28px; left:13px; color:{{{release-color|white}}}; font-family:'Times New Roman', Times, serif; font-size: 13px; margin-right:{{{label-margin|60px}}}; line-height: 1;"> | + | <div style="position:absolute; top:28px; left:13px; color:{{{release-color|white}}}; font-family:'Times New Roman', Times, serif; font-size: 13px; margin-right:{{{label-margin|60px}}}; line-height: 1;">[[{{{name}}}|<span style="color:{{{release-color|white}}}; text-shadow:0px 0px 3px black,1px 1px 3px black,1px 1px 4px black,2px 2px 4px black;">{{{label|{{#var:smw_name|{{{name}}}}}}}}</span>]]</div> |
− | </div> | + | </div> }} |
| {{#if: {{{description|}}} | title="{{#replace:{{{description}}}|"|"}}"}} | <div style="float:right; width:50px; text-align:right">{{#arraymap:{{{icons|}}}|\n|@@@|[[File:{{#explode:@@@|;|1}}{{!}}24px{{!}}link={{#explode:@@@|;|0}}]]|}}</div> | | {{#if: {{{description|}}} | title="{{#replace:{{{description}}}|"|"}}"}} | <div style="float:right; width:50px; text-align:right">{{#arraymap:{{{icons|}}}|\n|@@@|[[File:{{#explode:@@@|;|1}}{{!}}24px{{!}}link={{#explode:@@@|;|0}}]]|}}</div> | ||
{{{features}}} | {{{features}}} | ||
Строка 21: | Строка 21: | ||
| file = | | file = | ||
}} | }} | ||
+ | </pre> | ||
+ | |||
+ | Use with {{tl|Release table header}} and the following frame: | ||
+ | |||
+ | <pre> | ||
+ | {{Release table header|Header title}} | ||
+ | {{Release table row| … }} | ||
+ | {{Release table row| … }} | ||
+ | |} | ||
</pre> | </pre> | ||
Строка 40: | Строка 49: | ||
:The font colors of the date and release links respectively. (Typically only the "date-color" value will be changed, and the "release-color" will be left as "white") | :The font colors of the date and release links respectively. (Typically only the "date-color" value will be changed, and the "release-color" will be left as "white") | ||
;file | ;file | ||
− | :The name of the background image if it doesn't match the typical naming convention of <tt>File:<release name> backdrop.jpg</tt> | + | :The name of the background image if it doesn't match the typical naming convention of <tt>File:<release name> backdrop.jpg</tt>. If the value is <tt>none</tt>, no image will be displayed. |
;scale | ;scale | ||
:Optional. The scale of the background image - typically left empty, but could scale larger image to fit using this parameter. | :Optional. The scale of the background image - typically left empty, but could scale larger image to fit using this parameter. | ||
Строка 56: | Строка 65: | ||
{{main|Release}} | {{main|Release}} | ||
<pre> | <pre> | ||
− | { | + | {{Release table header|Season 1}} |
− | |||
− | |||
− | |||
− | |||
{{Release table row | {{Release table row | ||
| name = Release | | name = Release |
Версия 05:55, 3 мая 2017
Description
{{Release table row | name = | date = | description = | features = | icons = | date-color = | release-color = | file = }}
Use with {{Release table header}} and the following frame:
{{Release table header|Header title}} {{Release table row| … }} {{Release table row| … }} |}
Parameters
- name
- Name of the release page.
- label
- Optional. The text to appear on the link to the release page. (Defaults to value of "name" parameter)
- date
- Date of launch in the yyyy-mm-dd format.
- description
- Short description of the release. (Appears when hovering over bits of the image that doesn't contain text)
- features
- The feature section in regular wikicode.
- icons
- The icon links to achievements and story page. Each icon is on a separate line and has the format: page name;icon name (without the File: prefix).
- date-color
- release-color
- The font colors of the date and release links respectively. (Typically only the "date-color" value will be changed, and the "release-color" will be left as "white")
- file
- The name of the background image if it doesn't match the typical naming convention of File:<release name> backdrop.jpg. If the value is none, no image will be displayed.
- scale
- Optional. The scale of the background image - typically left empty, but could scale larger image to fit using this parameter.
- flip
- Optional. If set to y, the background image will be flipped horizontally.
- left
- top
- Optional. Parameters to position the background image within the 206 by 60px background frame.
- height
- Optional. Can be used to make a taller link tile. Defaults to 60px, should not be made smaller.
- label-margin
- Optional. Changes the right margin of the release name in the background frame. Defaults to 60px.
Example
- Основная статья: Release
{{Release table header|Season 1}} {{Release table row | name = Release | date = 2012-10-22 | icons = Tyria (achievements);Tyria (achievements).png Living World;Special event (map icon).png | description = This is the description section. Usually it's the same description as the one on the official site. | features = * This is the feature section. * Usually it's a bullet point list of the most important features in the release. }} |}