Шаблон:Release table row — различия между версиями
Материал из Guild Wars 2 wiki
Blood (обсуждение | вклад) |
Blood (обсуждение | вклад) |
||
Строка 3: | Строка 3: | ||
{{#vardefine:outline|text-shadow:0px 0px 3px black,1px 1px 3px black,-1px -1px 0 black,-1px 1px 0 black,1px -1px 0 black,1px 1px 0 black;}} | {{#vardefine:outline|text-shadow:0px 0px 3px black,1px 1px 3px black,-1px -1px 0 black,-1px 1px 0 black,1px -1px 0 black,1px 1px 0 black;}} | ||
{{#vardefine:span-date|<span style="color:{{{date-color|white}}}; {{#var:outline}}">}} | {{#vardefine:span-date|<span style="color:{{{date-color|white}}}; {{#var:outline}}">}} | ||
+ | {{#vardefine:category-color|{{#switch: {{lc:{{{category|}}}}} | ||
+ | | special event = gold | ||
+ | | story = <nowiki>#87f74a</nowiki> | ||
+ | | expansion = <nowiki>#29a3a3</nowiki> | ||
+ | | #default = <nowiki>#bbb</nowiki> | ||
+ | }}}} | ||
}}|- class="line-bottom" style="vertical-align: top;" {{#if: {{{description|}}} | title="{{#replace:{{{description}}}|"|"}}"}} {{#vardefine:default_file|{{#replace:{{#show:{{{name|}}}|?Has canonical name|default={{{name}}}}}|:|-}} backdrop.jpg}} | }}|- class="line-bottom" style="vertical-align: top;" {{#if: {{{description|}}} | title="{{#replace:{{{description}}}|"|"}}"}} {{#vardefine:default_file|{{#replace:{{#show:{{{name|}}}|?Has canonical name|default={{{name}}}}}|:|-}} backdrop.jpg}} | ||
| {{#ifeq: {{{file|}}} | none |<!-- | | {{#ifeq: {{{file|}}} | none |<!-- | ||
RELEASE (NO IMAGE BACKDROP DISPLAYED) | RELEASE (NO IMAGE BACKDROP DISPLAYED) | ||
− | --> style="vertical-align: middle; padding-left: | + | --> style="vertical-align: middle; padding-left: 16px; line-height: 145%; box-shadow:inset 4px 0 0 0 {{#var:category-color}}" {{!}} {{#ifeq: {{{recent|}}} | y | {{anchor|recent}}}}'''{{#iferror: {{#ifeq: {{{link-to-update|}}} | n | {{#time: j xg Y | {{{date|}}} }} | {{#ifexpr: {{#time: U | now }} > {{#time: U | {{{date|2014-10-10}}} }} | [[Game updates/{{{link-to-update|{{{date|}}}}}}|{{#time: j xg Y | {{{date|}}} }}]] | {{#time: j xg Y | {{{date|}}} }} }} }} | {{{date|}}} }}''' {{#if: {{{name|}}} | <br><span style="font-size: |
− | + | 90%">[[{{{name}}}|{{{label|{{#var:smw_name|{{{name}}}}}}}}]]</span> }} |<!-- | |
RELEASE (REGULAR VERSION) | RELEASE (REGULAR VERSION) | ||
− | --> style="padding:0 0 0 4px; box-shadow:inset 4px 0 0 0 {{# | + | --> style="padding:0 0 0 4px; box-shadow:inset 4px 0 0 0 {{#var:category-color}}" {{!}} |
− | |||
− | |||
− | |||
− | |||
− | }}" {{!}} | ||
{{#ifeq: {{{recent|}}} | y | {{anchor|recent}}}}<div class="release-image" style="position:relative; width:206px; height:{{{height|60px}}}; overflow:hidden;"> | {{#ifeq: {{{recent|}}} | y | {{anchor|recent}}}}<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> | ||
Строка 25: | Строка 26: | ||
{{#if: {{{category|}}} | {{#switch: {{{category}}} | | {{#if: {{{category|}}} | {{#switch: {{{category}}} | | ||
| special event = <span style="display:table-cell">{{icon|special|size=15px}}</span><span style="padding-left:2px; display:table-cell;">'''Особое событие'''</span>{{#if:{{{story|}}} | <span style="padding-left:10px; display:table-cell;">{{icon|story|size=15px}}</span><small style="padding-left:2px; display:table-cell;"> {{#arraymap:{{{story|}}}|\n|@@@|<span style="display:inline-block;">[[@@@]]</span>| → }}</small> }} | | special event = <span style="display:table-cell">{{icon|special|size=15px}}</span><span style="padding-left:2px; display:table-cell;">'''Особое событие'''</span>{{#if:{{{story|}}} | <span style="padding-left:10px; display:table-cell;">{{icon|story|size=15px}}</span><small style="padding-left:2px; display:table-cell;"> {{#arraymap:{{{story|}}}|\n|@@@|<span style="display:inline-block;">[[@@@]]</span>| → }}</small> }} | ||
− | | story = {{#if:{{{story|}}} | <span style="display:table-cell">{{icon|story|size=15px}}</span><small style="padding-left:2px; display:table-cell;">{{#arraymap:{{{story|}}}|\n|@@@|<span style="display:inline-block;">[[@@@]]</span>| → }}</small> }} | + | | story = {{#if:{{{story|}}} | <span style="display:table-cell">{{icon|story|size=15px}}</span><small style="padding-left:2px; display:table-cell;">{{#ifeq: {{{story}}} | TBD | TBD | {{#arraymap:{{{story|}}}|\n|@@@|<span style="display:inline-block;">[[@@@]]</span>| → }}}}</small> }} |
| expansion = <span style="display:table-cell;">{{icon|misc|Zone icon.png|Expansion|size=15px}}</span><span style="padding-left:2px; display:table-cell;">'''Крупное дополнение'''</span>{{#if:{{{story|}}} | <span style="padding-left:10px; display:table-cell;">{{icon|story|size=15px}}</span><small style="padding-left:2px; display:table-cell;"> {{#arraymap:{{{story|}}}|\n|@@@|<span style="display:inline-block;">[[@@@]]</span>| → }}</small> }} | | expansion = <span style="display:table-cell;">{{icon|misc|Zone icon.png|Expansion|size=15px}}</span><span style="padding-left:2px; display:table-cell;">'''Крупное дополнение'''</span>{{#if:{{{story|}}} | <span style="padding-left:10px; display:table-cell;">{{icon|story|size=15px}}</span><small style="padding-left:2px; display:table-cell;"> {{#arraymap:{{{story|}}}|\n|@@@|<span style="display:inline-block;">[[@@@]]</span>| → }}</small> }} | ||
| #default = <div style="inline-block; padding-left:18px;">'''{{#switch: {{lc:{{{category|}}}}} | | #default = <div style="inline-block; padding-left:18px;">'''{{#switch: {{lc:{{{category|}}}}} | ||
Строка 71: | Строка 72: | ||
:The type of the release, displayed at the top of the features section. The values <tt>story</tt>, <tt>special event</tt> and <tt>expansion</tt> also change the left border color to help distinguish between the main release types. | :The type of the release, displayed at the top of the features section. The values <tt>story</tt>, <tt>special event</tt> and <tt>expansion</tt> also change the left border color to help distinguish between the main release types. | ||
;story | ;story | ||
− | :Story steps for this release. Each step is on a separate line. If you need to display different text than the page name use the format: <tt>''page name''<nowiki>{{!}}</nowiki>''link text''</tt> | + | :Story steps for this release. Each step is on a separate line. If you need to display different text than the page name use the format: <tt>''page name''<nowiki>{{!}}</nowiki>''link text''</tt>. Value <tt>TBD</tt> doesn't create a link. |
;features | ;features | ||
:The feature section in regular wikicode. | :The feature section in regular wikicode. |
Версия 20:06, 15 мая 2019
Description
{{Release table row | name = | date = | description = | category = | story = | 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 the canonical name of the release.)
- date
- Date of launch. If written in the "yyyy-mm-dd" format, it displays the date in the "Month day, year" format and links to the corresponding update by default (if it's not in the future).
- category
- The type of the release, displayed at the top of the features section. The values story, special event and expansion also change the left border color to help distinguish between the main release types.
- story
- Story steps for this release. Each step is on a separate line. If you need to display different text than the page name use the format: page name{{!}}link text. Value TBD doesn't create a link.
- features
- The feature section in regular wikicode.
- icons
- The icon links to achievement pages. Each icon is on a separate line and has the format: page name;icon name (without the File: prefix).
- recent
- If set to y, the #recent anchor will point to this release.
- 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.
- link-to-update
- Optional. If set to n, stops the date linking to the corresponding Game updates page. If set to a date in the "yyyy-mm-dd" format, the link will lead to that update page instead.
- description
- Optional. Short description of the release. (Appears when hovering over parts of the row that don't contain links.)
- 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.
- icons-margin
- Optional. Changes the left margin of the icons, occasionally useful to match story chapter row count across browsers. Defaults to 0px.
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. }} |}