Difference between revisions of "Template:Cross/Documentation"

From War Thunder Wiki
Jump to: navigation, search
(Created page with "{{docpage}} This template can be used to easily display a red cross. Example: {{Cross}} {{sp-begin|TemplateData}} <templatedata> { "params": {}, "description": "This templ...")
 
(Updated description for the new parameters in the template)
 
Line 2: Line 2:
  
 
This template can be used to easily display a red cross. Example: {{Cross}}
 
This template can be used to easily display a red cross. Example: {{Cross}}
 +
 +
== Parameters ==
 +
* '''size''' - default: <kbd>20px</kbd> - standard image size parameter. You have to include unit (e.g. "20" isn't a valid value).
 +
* '''link''' - default: <kbd>&nbsp;</kbd> (empty) - leave it empty not to link any article. Otherwise put a name of the article on the wiki to link it.
 +
* '''alt''' - default: undefined, causing name of the image to be used as the alt tag. If you would like to use a custom alt tag, define it here. This is important for the screen readers.
 +
* '''valign''' - vertical align. It will use a default behaviour, otherwise you can define one of: baseline, sub, super, top, text-top, middle, bottom, text-bottom.
  
 
{{sp-begin|TemplateData}}
 
{{sp-begin|TemplateData}}
 
<templatedata>
 
<templatedata>
 
{
 
{
"params": {},
+
    "description": "This template can be used to easily display a green tick.",
"description": "This template can be used to easily display a red cross."
+
    "params": {
 +
        "size": {
 +
            "label": "Size",
 +
            "type": "string",
 +
            "required": false,
 +
            "description": "Size of the image",
 +
            "default": "20px",
 +
            "example": "x30px"
 +
        },
 +
        "link": {
 +
            "label": "Link",
 +
            "type": "wiki-page-name",
 +
            "required": false,
 +
            "description": "Name of the linked article",
 +
            "default": "",
 +
            "example": "USS Arizona"
 +
        },
 +
        "alt": {
 +
            "label": "Alternative text",
 +
            "type": "string",
 +
            "required": false,
 +
            "description": "HTML alt attribute on the image",
 +
            "example": "Done"
 +
        },
 +
        "valign": {
 +
            "label": "Vertical Align",
 +
            "type": "string",
 +
            "required": false,
 +
            "description": "One of: baseline, sub, super, top, text-top, middle, bottom, text-bottom."
 +
        }
 +
    }
 
}
 
}
 
</templatedata>
 
</templatedata>
 
{{sp-end}}
 
{{sp-end}}

Latest revision as of 19:48, 26 February 2024

This template can be used to easily display a red cross. Example: Icon RedXCross.png

Parameters

  • size - default: 20px - standard image size parameter. You have to include unit (e.g. "20" isn't a valid value).
  • link - default:   (empty) - leave it empty not to link any article. Otherwise put a name of the article on the wiki to link it.
  • alt - default: undefined, causing name of the image to be used as the alt tag. If you would like to use a custom alt tag, define it here. This is important for the screen readers.
  • valign - vertical align. It will use a default behaviour, otherwise you can define one of: baseline, sub, super, top, text-top, middle, bottom, text-bottom.