Шаблон:Img table el/doc

Материал из Dota 2 Вики
Перейти к: навигация, поиск
Image Tables:

Image Tables use an image, header, and optional subtext in order to list examples. Image Table Elements are made up of an image, a link, a header, and two optional subtext lines. They are contained between Image Table Start and Image Table End tags.

Usage[править]

This is a barebones example of an image table.

{{img table start}} <!-- Starts the Image Table formatting. -->
|-   <!-- Separate rows of images with new lines. At the moment, 2 images per column is the maximum. -->
{{img table el 
| image =  <!-- Requires a full image name, e.g. "Battle_Fury.png"    Defaults to "Unknown_icon.png" -->
| link =   <!-- Adds a link to the image. If left blank, the image has no link. -->
| header = <!-- Displays a header next to the image.   Defaults to "Unknown" -->
| text1 =  <!-- Optional subtext. Supports up to two lines. Hides if left blank -->
| text2 =
}}
{{img table el
| image = 
| link = 
| header = 
| text1 = 
| text2 = 
}}
{{img table end}} <!-- Ends the Image Table formatting. -->

Table formatting can be used to insert text into an image table. For example,

{{img table start}}
|- 
| style = "font-weight:bold;border-bottom:1px solid black" align = "center" | Header for the First Column
| style = "font-weight:bold;border-bottom:1px solid black" align = "center" | Header for the Second Column
|-
{{img table el
| image = Unknown icon.png
| header = Unknown
}}
{{img table el
| image = Unknown icon.png
| header = Unknown
}}
{{img table end}}

This example would insert a header into the table.

Image Table Start[править]

This section covers the specific parameters of the Image Table Start template.

  • width
Defines the width of the table.
Defaults to "100%"

Image Table Element[править]

  • image
Defines the image that is used for the element. Requires a full image name.
Defaults to "Unknown icon.png"
  • link
Provides an image link for this element.
Defaults to ""
  • header
Provides a header for this element. The header can be a link.
Defaults to "Unknown"
  • text1
First line of subtext for this element. Hides if not provided.
  • text2
Second line of subtext for this element. Hides if not provided.

Examples[править]