Шаблон:Ексклюзивно

Матеріал з Minecraft Wiki
Перейти до: навігація, пошук


This template is used to mark features exclusive to a specific version or versions of Minecraft. It generates a centered message box that lists the versions specified by the parameters and cycles through an animated display of the corresponding logos. It also adds the page to a maintenance category.

Parameters

Anonymous parameters

The template accepts any number of anonymous parameters, 1 for each version to be shown. It checks for certain parameter values as follows:

  • Outdated parameter values are translated to their up-to-date equivalents:
    • pc or computerjava
    • pocketbedrock
    • consolelegacy console
  • Known parameter values automatically select an associated edition name to display, page name for linking, logo image file, and maintenance category. If an unknown parameter value is encountered, default values are generated by a formula.
Parameter value Edition name Linked page Logo file Maintenance category
bedrock Bedrock Edition Bedrock Edition Файл:mclogo.svg Категорія:Bedrock Edition
java Java Edition Java Edition Файл:Java Edition.png Категорія:Java Edition
legacy console Legacy Console Edition Legacy Console Edition Файл:Legacy Console Edition.png Категорія:Legacy Console Edition
education Education Edition Education Edition Файл:Education Edition.svg Категорія:Education Edition
(unknown) <param> Edition [[<param> Edition]] File:<param> Edition.png Category:<param> Edition

Named parameters

In addition to the anonymous parameters, the template accepts the following named parameters:

logoheight=<n>

Logo images are scaled to a width of 250 pixels, but their height is allowed to auto-scale to avoid distorting the image. The template leaves room for a logo height of 50 pixels, which is adequate in most cases, but if the scaled height is larger than that, the browser may automatically expand the message box height to accommodate it. This causes the remainder of the page to shift down. When multiple logos with different scaled heights are displayed, the page may repeatedly shift up and down as the animation cycles, making reading difficult. To avoid this, this parameter can override the default height of 50 pixels. For <n>, specify the number of pixels to be reserved for displaying the logo's height. (You may have to experiment to find the best value.)

As an alternative to using the logoheight parameter, the edition can be added to the built-in set of known editions, because logo heights for these are handled internally.

nocat=1

If this parameter is specified, the page will not be added to any maintenance categories. This is usually used where the template is only being demonstrated, as in the examples below. It should be omitted if the page actually applies only to the specified editions.

Examples

The following examples illustrate the generated output using various parameters. You can copy an example into your page and modify it if you like.

Example 1
{{Exclusive|java}}

generates:

Java Edition.png

Тільки для Java Edition


Example 2
{{Exclusive|education|console}}

generates:

Education Edition.svgLegacy Console Edition.png


Example 3
{{Exclusive|java|console|bedrock}}

generates:

Java Edition.pngLegacy Console Edition.pngMclogo.svg


Example 4

This example demonstrates the effect of the logoheight parameter

{{Exclusive|bedrock|education|logoheight=75}}

generates:

Mclogo.svgEducation Edition.svg

Тільки для Bedrock Edition і Education Edition
[перегляд | редагувати | історія | оновити]Розташована вище документація включена з Шаблон:Ексклюзивно/док.