Dokumentacja szablonu |
[ odśwież ] |
---|---|
Uwaga: powyższy szablon może być całkowicie lub częściowo niewidoczny. | więcej o dokumentacjach |
Przejdź na stronę Szablon:Navboks/dokumentacja (edytuj), aby wprowadzić zmiany w dokumentacji tego szablonu. |
Szablon pozwalający na szybkie i łatwe tworzenie jednolitych szablonów nawigacyjnych.
Szablon korzysta z modułu NavboxBuilder do generowania szablonu. Jeśli szablon nie działa, może być to spowodowane brakiem rozszerzenia Scribunto. Jeśli tak jest, wyślij prośbę o włączenie przez Specjalna:Kontakt.
Użycie
Szablon posiada wiele parametrów o różnych zastosowaniach. Poniżej znajduje się przykładowa składnia użycia.
{{Navboks | Szablon = | Tytuł = | Stan = | Góra = | Dół = | Grupa 1 = | Lista 1 = | Grupa 2 = | Lista 2 = }}
Parametry
Below is the list of all available parameters. At least one list is required for the navbox to show up. Apart from that, all other parameters are optional.
Main
Tytuł
– main title of the navbox.Linki
– links that appear on left side of the title bar.- You can put any wikisyntax here.
Tytuł
is required for it to work.
Stan
– should the navbox be collapsed or expanded by default- Values:
zwinięty
orrozwinięty
(case insensitive) - Empty or unrecognized values will disable collapsing.
Tytuł
is required for it to work
- Values:
Góra
andDół
– fields above and below sections and images.Lewy obraz
andPrawy obraz
– fields beside sections, most commonly used to add images.- You can put any content here, not only images.
Sections
Sections include all lists with the same or higher number up to the next section.
Nagłówek n
– heading of a section- n – any positive integer
- Requires at least one list to be included to show up
Stan n
– should the section be collapsed or expanded by default- n – number of an existing header
- Values:
zwinięty
orrozwinięty
(case insensitive) - Empty or unrecognized values will disable collapsing.
Stan nagłówków
– same as above, but affects all headers- Values:
zwinięty
orrozwinięty
(case insensitive) - Empty or unrecognized values will disable collapsing.
- Can be overridden by
Stan n
- Values:
Układ n
– selects layout for that section- n – any positive integer
- Can be used without
Nagłówek n
to create a separate section without a header - Values:
tabela
orpoziomy
(case insensitive) - Empty or unrecognized values will use default (
tabela
).
Table layout (tabela
)
Standard layout with lists and sublists.
Lewy obraz n
andPrawy obraz n
– fields beside sections lists in that section, most commonly used to add images.- n – number of an existing header
- You can put any content here, not only images.
Horizontal layout (poziomy
)
Horizontal layout with lists forming columns. Sublists are not supported and will be treated as regular lists.
Na wiersz n
– maximum number of lists per row.- n – number of an existing section.
- Value: any number above 1.
- Number of columns is still limited by space needed. You can't go higher than flexbox allows.
Rozpiętość n
– how many columns should the list span.- n – number of an existing list.
- Value: any number between 0 and corresponding
Na wiersz n
Lists
Lista n
– single row with a list of links- n – any positive integer
Grupa n
– heading of a list- n – number of an existing list or sublist
Sublists will appear as sub entries of the group with same n.
Lista n.m
– single row with a list of links- n and m – any positive integers
Grupa n.m
– heading of a sublist- n and m – numbers of an existing sublist
Styling
Navbox class
andNavbox style
– applied to the main navbox elementTytuł class
andTytuł style
– applied to the title barBaza class
andBaza style
– applied to all groups, subgroups, headers, above and below fieldsGóra class
andGóra style
– applied to the above fieldDół class
andDół style
– applied to the below fieldObraz class
andObraz style
– applied to all image fieldsLewy obraz class
andLewy obraz style
– applied to the main left image fieldPrawy obraz class
andPrawy obraz style
– applied to the main right image fieldNagłówek class
andNagłówek style
– applied to all headersNagłówek n class
andNagłówek n style
– applied to the header specified with nLewy obraz n class
andLewy obraz n style
– applied to the left image field in the section specified with nPrawy obraz n class
andPrawy obraz n style
– applied to the right image field in the section specified with nGrupa class
andGrupa style
– applied to all groupsPodgrupa class
andPodgrupa style
– applied to all subgroupsGrupa n class
andGrupa n style
– applied to the group specified with nGrupa n.m class
andGrupa n.m style
– applied to the subgroup specified with n and mLista class
andLista style
– applied to all listsLista n class
andLista n style
– applied to the list specified with nLista n.m class
andLista n.m style
– applied to the list specified with n and m
Domyślne wartości parametrów
Wszystkie powyższe parametry mogą zostać użyte przy wywoływaniu modułu Moduł:Navbox (tj. {{#invoke:navbox|create}}
). Parametry podane w ten sposób mogą zostać nadpisane przez podanie parametrów do szablonu, który wywołał moduł.
Oznacza to, że można podać domyślne parametry poprzez edycję szablonu {{Navboks}}, które w razie potrzeby zostaną nadpisane, gdy dany parametr zostanie podany ponownie przy użyciu szablonu.
Kategoryzacja
Rozważ dodanie powstałego szablonu nawigacyjnego do kategorii Szablony nawigacyjne dodając poniższy kod na końcu kodu szablonu:
<noinclude>[[Kategoria:Szablony nawigacyjne]]</noinclude>
Przykłady
Poniżej znajdziesz kilka przykładów pokazujących co oraz jak można osiągnąć.
Tytuł i kilka wierszy
{{Navboks | Tytuł = Lorem ipsum | Grupa 1 = Dolor | Lista 1 = Consectetur · adipiscing · elit | Grupa 2 = Sit | Lista 2 = Sed · commodo · quam · sed · orci · varius · bibendum }}
{{Navboks
| Tytuł = Lorem ipsum
| Stan = zwinięty
...
}}
Linki do szablonu
{{Navboks
| Szablon = Navboks
| Tytuł = Lorem ipsum
...
}}
Tytuł i grupy nie są wymagane
{{Navboks | Grupa 1 = Dolor | Lista 1 = Consectetur · adipiscing · elit | Lista 2 = Sed · commodo · quam · sed · orci · varius · bibendum }}
Pola góra i dół
{{Navboks ... | Góra = In pellentesque sapien justo | Dół = Vel accumsan justo pulvinar non ... }}
Sekcje
{{Navboks ... | Grupa 1 = Dolor | Lista 1 = Consectetur · adipiscing · elit
| Nagłówek 2 = Mauris scelerisque | Grupa 2 = Sit | Lista 2 = Sed · commodo · quam · sed · orci · varius · bibendum
| Nagłówek 10 = Duis ornare aliquet | Grupa 11 = Curabitur sem ex | Lista 11 = faucibus · eu maximus · sit · amet
| Grupa 12 = Vestibulum | Lista 12 = Cras · laoreet · ex · at · efficitur · auctor }}
Zwijane sekcje
{{Navboks ... | Nagłówek 1 = Mauris scelerisque | Stan 1 = rozwinięty | Grupa 1 = Sit | Lista 1 = Sed · commodo · quam · sed · orci · varius · bibendum
| Nagłówek 2 = Duis ornare aliquet | Stan 2 = zwinięty | Grupa 2 = Curabitur sem ex | Lista 2 = faucibus · eu maximus · sit · amet
| Grupa 3 = Vestibulum | Lista 3 = Cras · laoreet · ex · at · efficitur · auctor }}
Obrazy
{{Navboks ... | Lewy obraz = [[File:Example.jpg|x166px]] ... | Nagłówek 2 = Mauris scelerisque | Prawy obraz 2 = [[File:Example.jpg|x25px]] ... | Nagłówek 10 = Duis ornare aliquet | Prawy obraz 10 = [[File:Example.jpg|x53px]] ... }}
Podgrupy
{{Navboks | Tytuł = Lorem ipsum | Grupa 1 = Dolor | Grupa 1.1 = Sit | Lista 1.1 = Consectetur · adipiscing · elit | Grupa 1.2 = Amet | Lista 1.2 = Sed · commodo · quam · sed · orci · varius · bibendum | Grupa 2 = Quisque | Lista 2.1 = Mauris · facilisis · condimentum · pretium | Lista 2.2 = Proin · dictum · dui · felis }}
Stylowanie
{{Navbox ... | Tytuł class = color2 | Grupa style = color: red; | Lista style = color: blue; | Lista 12 style = color: green; }}
Trochę wszystkiego
{{Navboks | Szablon = Navboks | Tytuł = Lorem ipsum | Stan = zwinięty | Góra = Cras laoreet, ex at efficitur auctor | Dół = Nunc vel condimentum tellus | Grupa 1 = Dolor | Lista 1 = Consectetur · adipiscing · elit | Grupa 2 = Sit | Lista 2 = Sed · commodo · quam · sed · orci · varius · bibendum | Nagłówek 10 = Bibendum | Stan 10 = rozwinięty | Prawy obraz 10 = [[File:Example.jpg|x43px]] | Grupa 10 = Curabitur | Grupa 10.1 = Dolor | Lista 10.1 = Consectetur · adipiscing · elit | Grupa 10.2 = Sit | Lista 10.2 = Sed · commodo · quam · sed · orci · varius · bibendum | Nagłówek 20 = Aenean est lectus | Stan 20 = zwinięty | Lista 20 = Vestibulum · ante · ipsum · primis in faucibus · orci · luctus · et ultrices · posuere · cubilia · Curae | Grupa style = width: 75px | Baza style = color: navy }}