Difference between revisions of "Template:Responsive table header/doc"
(→Different mobile and desktop text) |
m (→Usage) |
||
Line 22: | Line 22: | ||
| [[LIGHT]] | | [[LIGHT]] | ||
| [[Dragon]] | | [[Dragon]] | ||
+ | | 8 | ||
| 3000 | | 3000 | ||
| 2500 | | 2500 | ||
Line 28: | Line 29: | ||
| [[DARK]] | | [[DARK]] | ||
| [[Spellcaster]] | | [[Spellcaster]] | ||
+ | | 7 | ||
| 2500 | | 2500 | ||
| 2100 | | 2100 | ||
Line 76: | Line 78: | ||
| [[LIGHT]] | | [[LIGHT]] | ||
| [[Dragon]] | | [[Dragon]] | ||
+ | | 8 | ||
| 3000 | | 3000 | ||
| 2500 | | 2500 | ||
Line 82: | Line 85: | ||
| [[DARK]] | | [[DARK]] | ||
| [[Spellcaster]] | | [[Spellcaster]] | ||
+ | | 7 | ||
| 2500 | | 2500 | ||
| 2100 | | 2100 |
Revision as of 17:55, 1 January 2020
This is a documentation subpage for Template:Responsive table header. It contains usage information, categories and other content that is not part of the original template page. |
{{Responsive table header}} is used to create the heading of a table in such a way that the table will restyle itself to fit better on the smaller screens of mobile devices.
Usage
Basic
The table has a columns
parameter. This is used to define the text in the heading of each column. Put the text for each column on a new line.
Links, bold and italics will automatically be stripped from the column text when forming labels on mobile. These are not supported in the mobile set up.
{{Responsive table header | columns = Card [[Attribute]] [[Type]] [[Level]] [[ATK]] [[DEF]] }} |- | [[Blue-Eyes White Dragon]] | [[LIGHT]] | [[Dragon]] | 8 | 3000 | 2500 |- | [[Dark Magician]] | [[DARK]] | [[Spellcaster]] | 7 | 2500 | 2100 {{Responsive table footer}}
Card | Attribute | Type | Level | ATK | DEF |
---|---|---|---|---|---|
Blue-Eyes White Dragon | LIGHT | Dragon | 8 | 3000 | 2500 |
Dark Magician | DARK | Spellcaster | 7 | 2500 | 2100 |
Different mobile and desktop text
If a label is to have different text on mobile and desktop, enter the mobile text, followed by a semicolon (;
), followed by the desktop text.
{{Responsive table header | columns = Number; {{explain|#|Number}} Card [[Attribute]] [[Type]] [[Level]] [[ATK]] [[DEF]] }} |- | [[Blue-Eyes White Dragon]] | [[LIGHT]] | [[Dragon]] | 8 | 3000 | 2500 |- | [[Dark Magician]] | [[DARK]] | [[Spellcaster]] | 7 | 2500 | 2100 {{Responsive table footer}}
# | Card | Attribute | Type | Level | ATK | DEF |
---|---|---|---|---|---|---|
4007 | Blue-Eyes White Dragon | LIGHT | Dragon | 8 | 3000 | 2500 |
4041 | Dark Magician | DARK | Spellcaster | 7 | 2500 | 2100 |
Semantic query
Often, the table rows will be the result of an SMW query. In that scenario, the query should use |format=plain|template=Table row
{{Responsive table header | columns = Number; {{explain|#|Number}} Internal number; {{explain|I#|Internal number}} Card [[Card type]] Monster type [[Attribute]] Type [[Level]] [[ATK]] [[DEF]] [[Password]] }}<!-- -->{{ #ask: [[Release::Yu-Gi-Oh! 7 Trials to Glory: World Championship Tournament 2005]] |?Card number |?Internal number |?English name (linked) |?Card type (short) |?Monster type (short) |?Attribute |?Type |?Level |?ATK string |?DEF string |?Password | limit = 3 | mainlabel = - | searchlabel = | sort = Card number | format = plain | template = table row }} {{Responsive table footer}}
# | I# | Card | Card type | Monster type | Attribute | Type | Level | ATK | DEF | Password |
---|---|---|---|---|---|---|---|---|---|---|