Шаблон:Panorama/док
Ово је документациона подстраница за Шаблон:Panorama. Садржи информације о коришћењу, категоријама и другом садржају који није део оригиналне странице. |
Овај шаблон користи Lua модул: |
TemplateData
[уреди извор]TemplateData за Panorama
Insert a wide image with configurable height. For standard height, use template "Wide image" instead.
Параметар | Опис | Врста | Статус | |
---|---|---|---|---|
Image | image | Title for the image file to display. Must start with "File:".
| текст | обавезно |
Image height | height | How tall to display the image, in pixels. Must be set without any unit or suffix.
| број | обавезно |
Viewport width | width | Limit the width of the scrollable viewport in which the image is displayed. Input is used as CSS width, as such it must include a unit (e.g. "px" or "%").
| текст | необавезно |
Alternate text | alt | Alternate text to use instead of the image, for visually impaired readers. See the WP:ALT page for guidance. | текст | необавезно |
Caption | caption | Caption to render below the image. | викитекст | необавезно |
Viewport direction | dir | Set to "rtl" to start the viewport at the right-hand side of the image, with "right-to-left" scrolling.
| текст | необавезно |
Image alignment | align | If supplied, how to position the image on the page.
| текст | необавезно |
Examples
[уреди извор]The main function of {{Panorama}}, as opposed to {{Wide image}}, is that the template allows you to specify a desired height of the panorama.
Blank invocation
[уреди извор]{{Panorama
|image = Example.jpg
|height =
|width =
|alt =
|caption =
|dir =
|align =
}}
Commented invocation
[уреди извор]{{Panorama
|image = File:Example.jpg <!-- Must start with "File:" -->
|height = 300 <!-- Height of image. In pixels, no units. Use Template:Wide_image to set the width instead -->
|width = <!-- Limit the width of Frame enclosing the image. Include units e.g. 9px or 9%. Default is based on width of web browser -->
|alt = <!-- Alternate text for visually impaired readers. -->
|caption = <!-- Caption/text to render below the image -->
|dir = <!-- Can be: ltr (default) or rtl. Should scroll bar start at the very left (ltr = left-to-right) or very right (rtl)? -->
|align = <!-- Frame alignment. Can be: left (default), right, center, or none. -->
}}
Simple example
[уреди извор]{{Panorama
|image = Ushuaia_panorama_from_seaside_big.jpg
|height = 230
|alt = A small city across a gray waterway under lowering gray clouds. A road leads to the city across a causeway. Mountains with snow and a low treeline form the backdrop. A few boats are in the water.
|caption = Panorama of Ushuaia from 2005-02-06
}}
This displays File:Ushuaia panorama from seaside big.jpg, which is 7370×1010 pixels, as 1678×230, in a horizontally scrolling box, using the caption and alt text provided.
Smaller
[уреди извор]Same as the previous example, but with |height=80
.
The caption can be centered by replacing |caption=Text
with |caption={{center|Text}}
. In the example above, replacing |caption=
with
|caption = {{center|Panorama of Ushuaia from 2005-02-06}}
produces:
Right-to-left scrolling
[уреди извор]Same as the example, but with |dir=rtl
.
Tracking category
[уреди извор]See also
[уреди извор]- {{Panorama link}}
- {{PanoViewer}} - for interactive 360 degree photospheres
- {{Scalable image}}
- {{Tall image}} – for images too large in the other dimension
- {{Wide image}} – alternative template for panoramas