Predloga:Galerija

Iz Wikipedije, proste enciklopedije
Skoči na: navigacija, iskanje
Documentation icon Dokumentacija predloge[predogled] [uredi] [zgodovina] [osveži]

Ta predloga je namenjena naprednejši uporabi galerije (kot je uporaba drsnika pri besedilu pod sliko (scrolling captions) in podrobnejše prilagajanje formata galerije). Za kreiranje osnovnih galerij, uporabi označevalec za galerijo.

Ta predloga prikaže galerijo slik v polju, v vrsticah od leve proti desni. Splošna parametra |width= in |height= nadzorujeta velikost vseh slik v galeriji, razen če ju ne razveljavi parameter |widthn= za posamezno sliko. Število slik v vrstici temelji na parametrih width in glede na širino ekrana. Število slik v vrstici se lahko spremeni ko uporabnik spremeni velikost okna.

Parametri[uredi | uredi kodo]

Za vsako sliko[uredi | uredi kodo]

Vpišite sledeč zapis za vsako sliko.

|Slika:Imeslike |altn=Alt text |Opis pod sliko (caption)

Where:

|Slika:Imeslike – ime datoteke slike. Uporabite lahko tudi File: ali Image: prefiks
|Altn=atribut alt: |alt1= za prvo sliko, |alt2= za drugo sliko, itd
Alt text – alt besedilo za sliko, ki ga uporabljajo slabovidne osebe ali drugi bralci, ki ne morejo jkasno videti slike. Če je pramater izpuščen, bo alt besedilo prazno.
|Opis pod sliko

Neobvezni parametri[uredi | uredi kodo]

Ti parametri se nanašajo na galerijo:

|title= – Naslov galerije
|align= – Poravnava galerije na strani, left (prednastavljeno), center ali right
|footer= – Pomanjšano, desno-poravnano besedilo pod sliko
|style=CSS direktive za stil za celotno galerijo

Ti parametri se nanašajo na vse slike v galeriji:

|height= – Največja višina vsake slike. Če ta parameter ni vključen, je prednastavljena vrednost |height= 180 pikslov.
|width= – Največja širina vsake slike, prednastavljena vrednost 180 pikslov.
|cellwidth= – Širina vsake celice ali polja slike, prednastavljena vrednost |width=). Če je opredeljen, parameter |cellwidth= razveljavi katerokoli vrednost definirano v |width=.
|lines= – Število vrstic besedila, ki ga potrebuje najobsežnejše besedilo pod sliko (prednastavljeno: 2 vrstici).

The image's original ratio of width to height cannot be modified by |width= or |height= – a rectangular image will not be made square if |width= and |height= are set to the same value.

These parameters apply to each image, separately:

|widthn= (kjer je n število) – opredeli širino slike n kadar želite, da je širina te slike drugačna od vrednosti opredeljene v |width=

Primeri[uredi | uredi kodo]

{{Galerija
|title=Cultural depictions of George Washington
|width=160 | height=170 | lines=4
|align=center
|footer=Example 1
|Slika:Federal Hall NYC 27.JPG |
 alt1=Statue facing a city building with Greek columns and huge U.S. flag
 |Statue of Washington outside [[Federal Hall]] in [[New York City]], looking on [[Wall Street]].
|Slika:Mount Rushmore2.jpg |
 alt2=Profile of stone face on mountainside, with 3 workers.
 |Construction of Washington portrait at [[Mount Rushmore]], c. 1932.
|Slika:2006 Quarter Proof.png |
 alt3=Shiny silver coin with profile of Washington bust. 
 |Washington is commemorated on a [[Quarter (United States coin)|quarter]].
|Slika:George Washington Presidential $1 Coin obverse.png |
 alt4=Gold coin with bust of Washington facing slightly left
 |Washington on a [[dollar coin (United States)|dollar coin]].
}}
Cultural depictions of George Washington
Statue facing a city building with Greek columns and huge U.S. flag
Statue of Washington outside Federal Hall in New York City, looking on Wall Street
Profile of stone face on mountainside, with 3 workers.
Construction of Washington portrait at Mount Rushmore, c. 1932. 
Shiny silver coin with profile of Washington bust.
Washington is commemorated on a quarter
Gold coin with bust of Washington facing slightly left
Washington on a dollar coin
Example 1
{{Galerija
|title=Cultural depictions of George Washington
|width=120 |height=100 |lines=4
|align=center
|footer=Example 2
|File:Federal Hall NYC 27.JPG |
 alt1=Statue facing a city building with Greek columns
 |Statue of Washington outside [[Federal Hall]] in [[New York City]], looking on [[Wall Street]].
|Slika:Mount Rushmore2.jpg |
 alt2=Profile of stone face on mountainside, with 3 workers.
 |Work on Washington portrait at [[Mount Rushmore]], c. 1932.
|Slika:2006 Quarter Proof.png |
 alt3=Shiny silver coin with profile of Washington bust. 
 |Washington on a [[Quarter (United States coin)|quarter]].
|Slika:United_States_one_dollar_bill,_obverse.jpg | width4=200 |
 alt4=Front side of U.S. dollar bill, with Washington portrait in center.
 |[[United States one-dollar bill|U.S. one-dollar bill]].
|Slika:George Washington Presidential $1 Coin obverse.png |
 alt5=Gold coin with bust of Washington facing left
 |Washington on a [[dollar coin (United States)|dollar coin]].
}}
Cultural depictions of George Washington
Statue facing a city building with Greek columns
Statue of Washington outside Federal Hall in New York City, looking on Wall Street
Profile of stone face on mountainside, with 3 workers.
Work on Washington portrait at Mount Rushmore, c. 1932. 
Shiny silver coin with profile of Washington bust.
Washington on a quarter
Front side of U.S. dollar bill, with Washington portrait in center.
Gold coin with bust of Washington facing left
Washington on a dollar coin
Example 2

Note how in the above example, the parameter |width4=200 sets the width of image 4, to allow the dollar-bill image to be wider than the other images in the gallery.

Glej tudi[uredi | uredi kodo]