On November 6th, 2024, the 9,000th article was added to the SuccuWiki!

Template:Gallery/doc: Difference between revisions

From SuccuWiki - The Wiki of the Succubi
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 17: Line 17:
* '''<code>''AltN''</code>''' should be "'''<code>alt1=</code>'''" for the first image, "'''<code>alt2=</code>'''" for the second image, and so forth.
* '''<code>''AltN''</code>''' should be "'''<code>alt1=</code>'''" for the first image, "'''<code>alt2=</code>'''" for the second image, and so forth.
* '''<code>''Alt text''</code>''' is the alt text for the image, used by visually impaired or other readers who cannot see the image clearly. See ''[[Wikipedia:Alternative text for images]]''. If omitted, the image's alt text will be blank.
* '''<code>''Alt text''</code>''' is the alt text for the image, used by visually impaired or other readers who cannot see the image clearly. See ''[[Wikipedia:Alternative text for images]]''. If omitted, the image's alt text will be blank.
* '''<code>''Caption''</code>''' is the caption under the image; see ''[[Wikipedia:Captions]]''.
* '''<code>''Caption''</code>''' is the caption under the image; see ''Wikipedia:Captions''.


If no such lines are present, a gallery with a single blank image is produced. There is currently a limit of 110 image lines.
If no such lines are present, a gallery with a single blank image is produced. There is currently a limit of 110 image lines.
Line 51: Line 51:
| File:Federal Hall NYC 27.JPG |
| File:Federal Hall NYC 27.JPG |
     alt1=Statue facing a city building with Greek columns and huge U.S. flag
     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]].
   | Statue of Washington outside Federal Hall in New York City, looking on Wall Street.
| File:Mount Rushmore2.jpg |
| File:Mount Rushmore2.jpg |
     alt2=Profile of stone face on mountainside, with 3 workers.
     alt2=Profile of stone face on mountainside, with 3 workers.
   | Construction of Washington portrait at [[Mount Rushmore]], c. 1932.
   | Construction of Washington portrait at Mount Rushmore, c. 1932.
| File:2006 Quarter Proof.png |
| File:2006 Quarter Proof.png |
     alt3=Shiny silver coin with profile of Washington bust.  
     alt3=Shiny silver coin with profile of Washington bust.  
   | Washington is commemorated on a [[Quarter (United States coin)|quarter]].
   | Washington is commemorated on a quarter.
| File:George Washington Presidential $1 Coin obverse.png |
| File:George Washington Presidential $1 Coin obverse.png |
     alt4=Gold coin with bust of Washington facing slightly left
     alt4=Gold coin with bust of Washington facing slightly left
   | Washington on a [[dollar coin (United States)|dollar coin]].
   | Washington on a dollar coin.
}}</nowiki>}}
}}</nowiki>}}
{{Gallery
{{Gallery
Line 68: Line 68:
| File:Federal Hall NYC 27.JPG |
| File:Federal Hall NYC 27.JPG |
     alt1=Statue facing a city building with Greek columns and huge U.S. flag
     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]].
   | Statue of Washington outside Federal Hall in New York City, looking on Wall Street.
| File:Mount Rushmore2.jpg |
| File:Mount Rushmore2.jpg |
     alt2=Profile of stone face on mountainside, with 3 workers.
     alt2=Profile of stone face on mountainside, with 3 workers.
   | Construction of Washington portrait at [[Mount Rushmore]], c. 1932.
   | Construction of Washington portrait at Mount Rushmore, c. 1932.
| File:2006 Quarter Proof.png |
| File:2006 Quarter Proof.png |
     alt3=Shiny silver coin with profile of Washington bust.  
     alt3=Shiny silver coin with profile of Washington bust.  
   | Washington is commemorated on a [[Quarter (United States coin)|quarter]].
   | Washington is commemorated on a quarter.
| File:George Washington Presidential $1 Coin obverse.png |
| File:George Washington Presidential $1 Coin obverse.png |
     alt4=Gold coin with bust of Washington facing slightly left
     alt4=Gold coin with bust of Washington facing slightly left
   | Washington on a [[dollar coin (United States)|dollar coin]].
   | Washington on a dollar coin.
}}
}}


Line 86: Line 86:
| File:Federal Hall NYC 27.JPG |
| File:Federal Hall NYC 27.JPG |
     alt1=Statue facing a city building with Greek columns
     alt1=Statue facing a city building with Greek columns
   | Statue of Washington outside [[Federal Hall]] in [[New York City]], looking on [[Wall Street]].
   | Statue of Washington outside Federal Hall in New York City, looking on Wall Street.
| File:Mount Rushmore2.jpg |
| File:Mount Rushmore2.jpg |
     alt2=Profile of stone face on mountainside, with 3 workers.
     alt2=Profile of stone face on mountainside, with 3 workers.
   | Work on Washington portrait at [[Mount Rushmore]], c. 1932.
   | Work on Washington portrait at Mount Rushmore, c. 1932.
| File:2006 Quarter Proof.png |
| File:2006 Quarter Proof.png |
     alt3=Shiny silver coin with profile of Washington bust.  
     alt3=Shiny silver coin with profile of Washington bust.  
   | Washington on a [[Quarter (United States coin)|quarter]].
   | Washington on a quarter.
| File:United_States_one_dollar_bill,_obverse.jpg | width4=170 |
| File:United_States_one_dollar_bill,_obverse.jpg | width4=170 |
     alt4=Front side of U.S. dollar bill, with Washington portrait in center.
     alt4=Front side of U.S. dollar bill, with Washington portrait in center.
   | [[United States one-dollar bill|U.S. one-dollar bill]].
   | U.S. one-dollar bill.
| File:George Washington Presidential $1 Coin obverse.png |
| File:George Washington Presidential $1 Coin obverse.png |
     alt5=Gold coin with bust of Washington facing left
     alt5=Gold coin with bust of Washington facing left
   | Washington on a [[dollar coin (United States)|dollar coin]].
   | Washington on a dollar coin.
}}</nowiki>}}
}}</nowiki>}}
{{Gallery
{{Gallery
Line 106: Line 106:
| File:Federal Hall NYC 27.JPG |
| File:Federal Hall NYC 27.JPG |
     alt1=Statue facing a city building with Greek columns
     alt1=Statue facing a city building with Greek columns
   | Statue of Washington outside [[Federal Hall]] in [[New York City]], looking on [[Wall Street]].
   | Statue of Washington outside Federal Hall in New York City, looking on Wall Street.
| File:Mount Rushmore2.jpg |
| File:Mount Rushmore2.jpg |
     alt2=Profile of stone face on mountainside, with 3 workers.
     alt2=Profile of stone face on mountainside, with 3 workers.
   | Work on Washington portrait at [[Mount Rushmore]], c. 1932.
   | Work on Washington portrait at Mount Rushmore, c. 1932.
| File:2006 Quarter Proof.png |
| File:2006 Quarter Proof.png |
     alt3=Shiny silver coin with profile of Washington bust.  
     alt3=Shiny silver coin with profile of Washington bust.  
   | Washington on a [[Quarter (United States coin)|quarter]].
   | Washington on a quarter.
| File:United_States_one_dollar_bill,_obverse.jpg | width4=170 |
| File:United_States_one_dollar_bill,_obverse.jpg | width4=170 |
     alt4=Front side of U.S. dollar bill, with Washington portrait in center.
     alt4=Front side of U.S. dollar bill, with Washington portrait in center.
   | [[United States one-dollar bill|U.S. one-dollar bill]].
   | U.S. one-dollar bill.
| File:George Washington Presidential $1 Coin obverse.png |
| File:George Washington Presidential $1 Coin obverse.png |
     alt5=Gold coin with bust of Washington facing left
     alt5=Gold coin with bust of Washington facing left
   | Washington on a [[dollar coin (United States)|dollar coin]].
   | Washington on a dollar coin.
}}
}}
Note how in the above example, the parameter "width4=170" resets the width of image 4, to allow the dollar-bill to be shorter than the other images of George Washington. However, each specific image width could be set larger, to allow some images to be taller than all the others.
Note how in the above example, the parameter "width4=170" resets the width of image 4, to allow the dollar-bill to be shorter than the other images of George Washington. However, each specific image width could be set larger, to allow some images to be taller than all the others.

Revision as of 17:16, 9 October 2012

This template provides advanced gallery building functionality (such as scrolling captions and fine-tuned formatting control). For creating basic galleries, use the Gallery tag.

This template shows up to 110 images in an array, wrapped as left-to-right rows, where all images can be set to the same "width=" or "height=" but also allow width exceptions such as "width3=140" to reset width of only image 3. The number of images per row is based upon the image-width specified and the width of the screen, and can change live as the users narrow their screens and the images re-wrap to view the window as a different size.


Parameters

For each image

Specify a line of the following form for each image.

|File:Filename|altN=Alt text|Caption
  • Filename is the image's file name. It can use a File: instead of an Image: prefix.
  • AltN should be "alt1=" for the first image, "alt2=" for the second image, and so forth.
  • Alt text is the alt text for the image, used by visually impaired or other readers who cannot see the image clearly. See Wikipedia:Alternative text for images. If omitted, the image's alt text will be blank.
  • Caption is the caption under the image; see Wikipedia:Captions.

If no such lines are present, a gallery with a single blank image is produced. There is currently a limit of 110 image lines.

Optional parameters

The following parameters apply to all images:

  • title   – The gallery's title.
  • height – (default: 180) Maximum height of each image.
  • width   – (default: 180) Maximum width of each image.
  • cellwidth – (default: width) Width of each image cell or box.
  • lines   – (default: 2) The number of text lines needed for the largest caption. Blank lines are appended to smaller captions. A caption that does not fit is cut off.
  • align   – (default: left) The alignment of the gallery table (left, center, or right).
  • footer – Small, right-aligned text below the images.
  • style   – The CSS style directives for the whole table.
  • boxform – <documentation needed>

The following parameters apply to each image, separately:

  • alt1      – the alt-text for image 1.
  • width1   – (default: width or 180) width of image 1 only.
  • alt2      – the alt-text for image 2.
  • width2   – (default: width or 180) width of image 2 only.
  • alt110    – the alt-text for image 110.
  • width110 – (default: width or 180) the width of image 110 only.

Examples

{{Gallery
| title=Cultural depictions of George Washington
| width=160 | height=170 | lines=4
| align=center
| File: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.
| File:Mount Rushmore2.jpg |
    alt2=Profile of stone face on mountainside, with 3 workers.
  | Construction of Washington portrait at Mount Rushmore, c. 1932.
| File:2006 Quarter Proof.png |
    alt3=Shiny silver coin with profile of Washington bust. 
  | Washington is commemorated on a quarter.
| File:George Washington Presidential $1 Coin obverse.png |
    alt4=Gold coin with bust of Washington facing slightly left
  | Washington on a dollar coin.
}}
Cultural depictions of George Washington
Statue of Washington outside Federal Hall in New York City, looking on Wall Street.  
Construction of Washington portrait at Mount Rushmore, c. 1932.  
Washington is commemorated on a quarter.  
Washington on a dollar coin.  
{{Gallery
| title=Cultural depictions of George Washington
| cellwidth=210 | width=399 | height=100 | lines=4
| align=center
| 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.
| File:Mount Rushmore2.jpg |
    alt2=Profile of stone face on mountainside, with 3 workers.
  | Work on Washington portrait at Mount Rushmore, c. 1932.
| File:2006 Quarter Proof.png |
    alt3=Shiny silver coin with profile of Washington bust. 
  | Washington on a quarter.
| File:United_States_one_dollar_bill,_obverse.jpg | width4=170 |
    alt4=Front side of U.S. dollar bill, with Washington portrait in center.
  | U.S. one-dollar bill.
| File:George Washington Presidential $1 Coin obverse.png |
    alt5=Gold coin with bust of Washington facing left
  | Washington on a dollar coin.
}}
Cultural depictions of George Washington
Statue of Washington outside Federal Hall in New York City, looking on Wall Street.  
Work on Washington portrait at Mount Rushmore, c. 1932.  
Washington on a quarter.  
U.S. one-dollar bill.  
Washington on a dollar coin.  

Note how in the above example, the parameter "width4=170" resets the width of image 4, to allow the dollar-bill to be shorter than the other images of George Washington. However, each specific image width could be set larger, to allow some images to be taller than all the others.

See also