साँचा:Plain image
This template uses TemplateStyles: |
Since MediaWiki does not provide a way to add visible captions to images integrated seamlessly in a page (i.e., without borders), this template aims to provide that functionality.
Usage
[संपादित करें]This template can be either with named parameters, as in
- {{Plain image with caption|image=Example.svg|caption=Example text|width=220px|align=right|caption position=bottom}}
...or in its shorthand form:
- {{Plain image with caption|Example.svg|Example text|220px|right|bottom}}
- The only compulsory parameters are image and caption.
- When using the shorthand version, keep in mind that the order of parameters is important
Parameter | Default | Acceptable values |
image | mandatory | any image filename ("File:" or "Image:" is optional) |
caption | mandatory | any valid wiki markup |
width | 220px | any pixel width ("px" suffix optional) |
height | none | any pixel height ("px" suffix optional) |
align | right | left, center, right, none |
caption position | bottom | top, bottom |
triangle | none | triangle, none |
triangle color | #ff0080 | any CSS color |
image override | Anything (lets you replace the image block with anything—useful for stacking image overlays) | |
caption override | Anything (lets you replace the caption block with anything) |
Examples
[संपादित करें]The triangle parameters give the option to add a colored triangle label— साँचा:Plain image with caption {{plain image with caption|James Webb Space Telescope Mirror37.jpg|This is a picture of the [[James Webb Space Telescope]].|350|left|top|triangle|rgba(0,110,255,1)}}
Using "image-override" to stack images
This template uses TemplateStyles: |
Since MediaWiki does not provide a way to add visible captions to images integrated seamlessly in a page (i.e., without borders), this template aims to provide that functionality.
Usage
[संपादित करें]This template can be either with named parameters, as in
- {{Plain image with caption|image=Example.svg|caption=Example text|width=220px|align=right|caption position=bottom}}
...or in its shorthand form:
- {{Plain image with caption|Example.svg|Example text|220px|right|bottom}}
- The only compulsory parameters are image and caption.
- When using the shorthand version, keep in mind that the order of parameters is important
Parameter | Default | Acceptable values |
image | mandatory | any image filename ("File:" or "Image:" is optional) |
caption | mandatory | any valid wiki markup |
width | 220px | any pixel width ("px" suffix optional) |
height | none | any pixel height ("px" suffix optional) |
align | right | left, center, right, none |
caption position | bottom | top, bottom |
triangle | none | triangle, none |
triangle color | #ff0080 | any CSS color |
image override | Anything (lets you replace the image block with anything—useful for stacking image overlays) | |
caption override | Anything (lets you replace the caption block with anything) |
Examples
[संपादित करें]The triangle parameters give the option to add a colored triangle label— साँचा:Plain image with caption {{plain image with caption|James Webb Space Telescope Mirror37.jpg|This is a picture of the [[James Webb Space Telescope]].|350|left|top|triangle|rgba(0,110,255,1)}}
Using "image-override" to stack images
साँचा चक्र मिला: साँचा:Plain image
{{Plain image|File:Helical granum.png|'''Grana structure''' The prevailing model for [[granum|granal]] structure is a stack of granal [[thylakoids]] linked by helical [[stroma (fluid)|stromal]] thylakoids that wrap around the grana stacks and form large sheets that connect different grana.|432px|left|top|triangle|#3cb14d|image override=<div style="float: right; position: relative; width: 432px; height: 432px;"> <div style="float: right; position: absolute; width: 432px;">[[File:Helical granum.png|432px]]</div> <div style="float: right; position: absolute; width: 432px;">[[File:Granum labels.svg|432px|The prevailing model for [[granum|granal]] structure.]]</div></div>}}
TemplateData
[संपादित करें]TemplateData for Plain image
A template for adding a caption to a frameless image.
पैरामीटर | विवरण | प्रकार | स्थिति | |
---|---|---|---|---|
Image | image 1 | The image to use. The ''File:'' prefix is optional.
| स्ट्रिंग | आवश्यक |
Image caption and alt text | caption 2 | The caption to display under or above the image. Also sets the alt text.
| स्ट्रिंग | आवश्यक |
Image width | width 3 | Sets the pixel width of the image and the template. the ''px'' suffix is optional.
| संख्या | वैकल्पिक |
Image height | height | Sets the pixel height of the image and the template. the ''px'' suffix is optional. | संख्या | वैकल्पिक |
Float and center | align 4 | Floats the template to the left, right, or centers it. Accepts ''left'', ''center'', ''right'', or ''none''.
| स्ट्रिंग | वैकल्पिक |
Caption position | caption position 5 | Determines whether the caption goes above or below the image. Accepts ''top'' or ''bottom''.
| स्ट्रिंग | वैकल्पिक |
Triangle pointer | triangle 6 | Allows you to add a triangular pointer next to the caption text. Accepts ''triangle'' or ''none''.
| स्ट्रिंग | वैकल्पिक |
Triangle pointer color | triangle color 7 | Lets you set a CSS color for the triangular pointer.
| स्ट्रिंग | वैकल्पिक |
Replacement content for the image | image override 8 | Lets you substitute any allowed HTML where the image would normally be.
| स्ट्रिंग | वैकल्पिक |
Replacement content for the caption | caption override 9 | Lets you substitute any allowed HTML where the caption would normally be.
| स्ट्रिंग | वैकल्पिक |
See also
[संपादित करें]- {{Multiple image}}
{{Plain image|File:Helical granum.png|'''Grana structure''' The prevailing model for [[granum|granal]] structure is a stack of granal [[thylakoids]] linked by helical [[stroma (fluid)|stromal]] thylakoids that wrap around the grana stacks and form large sheets that connect different grana.|432px|left|top|triangle|#3cb14d|image override=<div style="float: right; position: relative; width: 432px; height: 432px;"> <div style="float: right; position: absolute; width: 432px;">[[File:Helical granum.png|432px]]</div> <div style="float: right; position: absolute; width: 432px;">[[File:Granum labels.svg|432px|The prevailing model for [[granum|granal]] structure.]]</div></div>}}
TemplateData
[संपादित करें]TemplateData for Plain image
A template for adding a caption to a frameless image.
पैरामीटर | विवरण | प्रकार | स्थिति | |
---|---|---|---|---|
Image | image 1 | The image to use. The ''File:'' prefix is optional.
| स्ट्रिंग | आवश्यक |
Image caption and alt text | caption 2 | The caption to display under or above the image. Also sets the alt text.
| स्ट्रिंग | आवश्यक |
Image width | width 3 | Sets the pixel width of the image and the template. the ''px'' suffix is optional.
| संख्या | वैकल्पिक |
Image height | height | Sets the pixel height of the image and the template. the ''px'' suffix is optional. | संख्या | वैकल्पिक |
Float and center | align 4 | Floats the template to the left, right, or centers it. Accepts ''left'', ''center'', ''right'', or ''none''.
| स्ट्रिंग | वैकल्पिक |
Caption position | caption position 5 | Determines whether the caption goes above or below the image. Accepts ''top'' or ''bottom''.
| स्ट्रिंग | वैकल्पिक |
Triangle pointer | triangle 6 | Allows you to add a triangular pointer next to the caption text. Accepts ''triangle'' or ''none''.
| स्ट्रिंग | वैकल्पिक |
Triangle pointer color | triangle color 7 | Lets you set a CSS color for the triangular pointer.
| स्ट्रिंग | वैकल्पिक |
Replacement content for the image | image override 8 | Lets you substitute any allowed HTML where the image would normally be.
| स्ट्रिंग | वैकल्पिक |
Replacement content for the caption | caption override 9 | Lets you substitute any allowed HTML where the caption would normally be.
| स्ट्रिंग | वैकल्पिक |
See also
[संपादित करें]- {{Multiple image}}