Lompat ke isi

Templat:Verth/doc

Dari Wikipedia bahasa Indonesia, ensiklopedia bebas

! class = "nowrap" style="line-height:99%;vertical-align:bottom;padding:21px .4em .2em;background-position:50% .4em !important;min-width:0.875em;max-width:0.875em;width:0.875em;overflow:hidden" |

Regular column

! class = "nowrap" style="line-height:99%;vertical-align:bottom;padding:21px .4em .2em;background-position:50% .4em !important;min-width:0.875em;max-width:0.875em;width:0.875em;overflow:hidden" |

Vertical value column

! class = "nowrap" style="line-height:99%;vertical-align:bottom;padding:21px .4em .2em;background-position:50% .4em !important;min-width:0.875em;max-width:0.875em;width:0.875em;overflow:hidden" |

Thin gold column

! class = "nowrap unsortable" style="line-height:99%;vertical-align:bottom;padding:.4em .4em .2em;background-position:50% .4em !important;min-width:0.875em;max-width:0.875em;width:0.875em;overflow:hidden" |

Unsortable column

|-

| 0 || class = "nowrap unsortable" style="line-height:99%;vertical-align:middle;padding:.4em .4em .2em;background-position:50% .4em !important;min-width:0.875em;max-width:0.875em;width:0.875em;overflow:hidden" |

1

|| 1 || 2

|-

| 3 || class = "nowrap unsortable" style="line-height:99%;vertical-align:middle;padding:.4em .4em .2em;background-position:50% .4em !important;min-width:0.875em;max-width:0.875em;width:0.875em;overflow:hidden" |

5

|| 8 || 13

|-

! class = "nowrap unsortable" style="line-height:99%;vertical-align:top;padding:.4em .4em .2em;background-position:50% .4em !important;min-width:0.875em;max-width:0.875em;width:0.875em;overflow:hidden" |

Regular column

! class = "nowrap unsortable" style="line-height:99%;vertical-align:top;padding:.4em .4em .2em;background-position:50% .4em !important;min-width:0.875em;max-width:0.875em;width:0.875em;overflow:hidden" |

Vertical value column

! class = "nowrap unsortable" style="line-height:99%;vertical-align:top;padding:.4em .4em .2em;background-position:50% .4em !important;min-width:0.875em;max-width:0.875em;width:0.875em;overflow:hidden" |

Thin gold column

! class = "nowrap unsortable" style="line-height:99%;vertical-align:top;padding:.4em .4em .2em;background-position:50% .4em !important;min-width:0.875em;max-width:0.875em;width:0.875em;overflow:hidden" |

Unsortable column

|} Ini adalah templat yang membantu membuat tajuk kolom berorientasi vertikal dalam tabel. Ia bahkan bekerja untuk kolom dapat diurutkan.

Meskipun templat ini dibuat dengan mempertimbangkan header tabel, template ini juga dapat berfungsi dengan sel biasa.

Jika sel header memiliki atribut lain, contohnya colspan atau rowspan, tidak boleh ada batang vertikal | antara atribut dan panggilan templat.

Daftar parameter[sunting sumber]

  • 1 – The desired text; can contain wikilinks ([[]]). You can escape the equals sign either by using {{=}} or by explicitly mentioning the 1= parameter.
  • nb – Give any non-empty value in order to apply a {{nobold}} template to the text.
  • va – Vertical alignment (bottom, top, middle). Default is bottom.
  • stp – Give any non-empty value in order to apply a top padding to the cell (useful if the header is bottom-aligned; required for sortable columns).
  • mw – Manual width; override the default value, which was automatically generated based on the number of line breaks (you can use <br>, <BR /> or any other combination).
  • style – Additional styles for the <div/> containing the rotated text. May contain double quotes.
  • cellstyle – Additional styles for the entire cell. May contain double quotes. Use this instead of the cell's style attribute. Use background-color instead of background if you need it for the header of a sortable column.

Examples[sunting sumber]

  • ! {{vert header|Your text here}} – basic example
  • ! {{vert header|nb=1|stp=1|Your text here}} – produces an explicitly sortable, no-bold, sortable header
  • ! {{vert header|va=top|Your text here}} – produces an unsortable, top-aligned table header
  • ! colspan="2" {{vert header|cellstyle=background-color:gold|Your text here}} – produces an unsortable header spanning two columns, with a gold background; use no vertical bar after colspan

You can also use the ! {{verth|Your text here}} shorthand.

An example below (from Help:Sorting) with headers that span rows or columns (using rowspan and colspan). Note that there is no vertical bar | between rowspan=2 and {{vert header...}}

name
data columns
another column
data
more data
cats 273 53 1
dogs 65 8,492 2
mice 1,649 548 3
{| class="wikitable sortable"
|-
! rowspan=2 {{vert header|stp=1|name}}
! colspan=2 {{vert header|data columns}}
! rowspan=2 {{vert header|stp=1|another column}}
|-
! {{vert header|stp=1|data}}
! {{vert header|stp=1|more data}}
|-
| cats
| 273
| 53
| 1
|-
| dogs
| 65
| 8,492
| 2
|-
| mice
| 1,649
| 548
| 3
|}

Kesesuaian[sunting sumber]

Browser berikut telah diuji pada kombinasi Debian 6.0, Mac OS X 10.8, Ubuntu 9.10, Ubuntu 15.04, Windows 7, Windows Server 2008 R2, dan Windows 10. Versi paling awal yang diketahui berfungsi disorot dengan warna hijau. Konfigurasi teruji terbaru yang tidak berfungsi disorot dengan warna merah.

Arora Chrome Dillo Edge Epiphany Firefox Iceape Iceweasel IE Konqueror Luakit Midori Opera Rekonq Safari SeaMonkey
0.11
27 Sep 10
9
4 Feb 11
3.0.4
9 Apr 14
38
2 Aug 16
3.4.2
19 May 12
43
15 Dec 15
2.7.12
19 Jan 13
38.6
11 Feb 16
11
17 Oct 13
4.14
20 Aug 14
039e319
13 Sep 12
0.4.3
6 Nov 14
15
2 Jul 13
1.1
27 Aug 12
9.1
21 Mar 16
2.46
22 Dec 16
Deb 6 Win 7 Ubu 15.04 Win 10 Deb 6 OS X 10.8 Deb 6 Deb 6 Win 10 Ubu 15.04 Ubu 15.04 Ubu 15.04 Win 2008 R2 Ubu 9.10 OS X 10.8 Ubu 15.04
Secara teoritis dapat berfungsi pada browser berikut juga (harap konfirmasi):
Android
Browser
Chrome Edge Firefox Safari
3
22 Feb 11
8
2 Dec 10
20
29 Jul 15
41
22 Sep 15
5.1
20 Jul 11
Notes:
  • In Internet Explorer 5–10, the text goes from top to bottom instead of going from bottom to top.
  • Firefox support for vertical text and rotation began in version 25, but it was unstable until version 43, or possibly 41.

Alias ​​[sunting sumber]