Pojdi na vsebino

Predloga:Galerija/dok

Iz Wikipedije, proste enciklopedije

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.

Prazna sintaksa

[uredi kodo]
{{Galerija
| title        = 
| align        =
| footer       =
| style        =
| state        =
| height       =
| width        =
| captionstyle =
| File:
 | Write a caption here
 | alt1=
| File:
 | Write a caption here
 | alt2=
| File:
 | Write a caption here
 | alt3=
| File:
 | Write a caption here
 | alt4=
| File:
 | Write a caption here
 | alt5=
}}

Parametri

[uredi kodo]

Za vsako sliko

[uredi kodo]

Vpišite sledeč zapis za vsako sliko.

|File:Imeslike |Opis pod sliko |altn=alt besedilo

Kjer je:

|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 kodo]

Ti parametri se nanašajo na celotno 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
|state= – Sets the default state of collapsible galleries; use |state=expanded or |state=collapsed; collapsible galleries occupy the full page width
|mode= – Sets the mode used by the inner gallery tag. Common values include |mode=packed and |mode=nolines (see Help:Gallery tag for more options)

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

|noborder= – Cancel the border surrounding the images, use |noborder=yes to set.
|whitebg= – Cancel the white background after the images, use |whitebg=no to set.
|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. Use a number here, e.g., 150, without units, e.g., 150px.
|captionstyle=CSS style directives for the captions (see Help:Cascading Style Sheets)

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.

Primeri

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

TemplateData

[uredi kodo]

Place this template on an article or user page to create a gallery of images on that page along with captions. Anyone may place this template.

Parametri predloge[Urejanje podatkov predloge]

ParameterOpisVrstaStanje
titletitle

Title for the overall gallery

Zgled
Pictures of chickens
Nizpredlagano
alignalign

Alignment of the gallery on the page; possible values include left, right, and center

Predlagane vrednosti
left center right
Privzeto
left
Zgled
center
Nizneobvezno
footerfooter

Creates a footer which will appear in the lower right corner of the overall gallery, in small font, of whatever text the editor placing it wishes to put there

Zgled
Early works
Nizneobvezno
stylestyle

This parameter allows an editor to utilize Cascading Style Sheet code

Neznanoneobvezno
captionstylecaptionstyle

This parameter allows an editor to utilize Cascading Style Sheet code for caption

Neznanoneobvezno
statestate

This parameter allows the editor to determine whether or not the gallery will initially appear as either expanded or collapsed for readers

Predlagane vrednosti
expanded collapsed
Privzeto
expanded
Zgled
collapsed
Nizneobvezno
heightheight

determines the maximum height for any image within the gallery

Privzeto
180
Zgled
100
Nizneobvezno
widthwidth

Analogous to height parameter; sets maximum width for any image in the gallery

Privzeto
180
Zgled
120
Nizneobvezno
modemode

Sets the mode used by the inner gallery tag, see Help:Gallery tag for more options

Predlagane vrednosti
traditional nolines packed packed-overlay packed-hover slideshow
Privzeto
traditional
Nizneobvezno
nobordernoborder

Cancel the border surrounding the images

Privzeto
no
Zgled
yes
Nizneobvezno
whitebgwhitebg

Used to disable the white background in the inner gallery tag

Privzeto
yes
Zgled
no
Nizneobvezno

Sledilne kategorije

[uredi kodo]

Glej tudi

[uredi kodo]