টেমপ্লেট:FreedImg
| এই টেমপ্লেটটি টেমপ্লেট শৈলী ব্যবহার করে: |
| ব্যবহৃত লুয়া: |
- Use this image container template to display CENTERED images.
- Resizes the container dynamically and provides additional image related features.
- When used to display an offset image, the surrounding text is broken into a new paragraph.
Usage
[সম্পাদনা]- Always please use the shortcut to FreedImg, {{FI}}, rather than the long template name.
{{FI
| type =
| file =
| width =
| imgwidth =
| cclass =
| cstyle =
| float =
| margin-left =
| margin-right =
| clear =
| caption =
| top-caption =
| tmleft =
| indent =
| tstyle =
| talign =
| alt =
| link =
| page =
}}
For true inline usage, please see FreedImg/span, {{FIS}}, instead.
Parameters
[সম্পাদনা]- For the Image itself
- mandatory file: File name (without the "File:" prefix).
- optional alt: Image alt-text, ie. for mouse-over text box or for use with a screenreader for the visually impaired.
- optional link: Override the default image link with an internal/external URL of your choosing (optional)
- optional page: Select individual image page within a multi-page file (PDF/DJVU etc.; optional)
- when the (type=user ) is present & set
- Images generated by certain wikicode extensions (e.g. the default <math> User preference, <score>, etc.) may be entered in the named file parameter instead.
- Primary DIV container
- width: The width of the primary container, by percentage (present, variable, default 100%)
- cclass: The class for the primary container, (present, variable, default floatnone [a null undefined classname just for placeholder purposes])
- cstyle: Any special overall styles to apply to primary container (default: no extra CSS).
- float: The alignment of the primary container (not present; must be added, options are "left" or "right"; otherwise remains centered).
- clear: The margin(s) of the primary container to be cleared (not present; must be added, options are "left", "right" or "both").
- margin-left,margin-right : Any special margins to be applied to the primary container (defaults appropriate for centered result).
- Image element
- imgclass: extra CSS classes to add
- imgwidth: request this size of image from the server, rather than computing a guess. This can help to reduce file size, for example, when you know the image will be used in a narrow container. If width is given and uses
px, you don't need to repeat it here. This value must be a pixel based value (em or percent based values are not supported for this parameter).
- Image Caption
- caption: The bottom image caption (if present)
- top-caption: The top image caption (if present)
- tstyle,talign: Any special text style or alignment to apply to caption block (if present).
- tmleft,indent: Any special text-flow (e.g. hanging indent etc.) control to apply to caption (if present).
Styling via CSS
[সম্পাদনা]The following classes are applied, which can be targeted with work-specific CSS:
- The whole container:
wst-freedimg(টেমপ্লেট:Search/css) - The caption(s):
wst-freedimg-caption(টেমপ্লেট:Search/css)- The top caption:
wst-freedimg-caption-top(টেমপ্লেট:Search/css) - The top caption:
wst-freedimg-caption-bottom(টেমপ্লেট:Search/css)
- The top caption:
Examples
[সম্পাদনা]Basic example: centred image
[সম্পাদনা]উদাহরণ
Musical score
[সম্পাদনা]উদাহরণ
{{FI
| type = score
| width = 50%
| file = <score>{ \clef bass \time 3/4 g,4 (b,4 [d4 f4 a4]) r4 \bar "|." }</score>
}}
Mathematical Equation
[সম্পাদনা]N.B. This only works if the user's Preferences are set to the default (i.e. Preference/Appearance/Math is "Always render PNG". Experimental choice "MathJax" causes any formulæ to be rendered entirely in text, completely bypassing any effect {{FreedImg}} may have.)
উদাহরণ
{{FI
| type = math
| width = 25%
| file = <math>sin x = {e^{ix} - e^{-ix} \over 2i} </math>
}}
Page of a multipage document
[সম্পাদনা]উদাহরণ
Adding classes to the image (e.g. rotation)
[সম্পাদনা]{{FI
| file = Iceberg.jpg
| width = 20%
| link = w:Iceberg{{!}}Iceberg article at Wikipedia
| alt = WS Iceberg
| imgclass = rot270
| caption = Gravity right
}}
|
{{FI
| file = Iceberg.jpg
| width = 40%
| link = w:Iceberg{{!}}Iceberg article at Wikipedia
| alt = WS Iceberg
| imgclass = rot90
| caption = Gravity left
}}
| |||
{{FI
| file = Iceberg.jpg
| width = 40%
| link = w:Iceberg{{!}}Iceberg article at Wikipedia
| alt = WS Iceberg
| imgclass = rot180
| caption = Gravity up
}}
| ||||
Extra CSS styles
[সম্পাদনা]উদাহরণ
Missing images
[সম্পাদনা]If an image doesn't exist yet, you can use missing in the file parameter:
উদাহরণ
{{FI
| file = missing
| width = 200px
| caption = The caption can be entered as usual
}}
See also
[সম্পাদনা]- Template for offset images Template:FreedImg/span aka {{FIS}}
Floats an image/caption block.
| প্যারামিটার | বিবরণ | ধরন | অবস্থা | |
|---|---|---|---|---|
| type | type | Type of content
| স্ট্রিং | পরামর্শকৃত |
| file | file | filename of image to float. | স্ট্রিং | ঐচ্ছিক |
| alt | alt | বিবরণ নেই | অজানা | ঐচ্ছিক |
| link | link | বিবরণ নেই | অজানা | ঐচ্ছিক |
| page | page | Page number to use when the filename is a multi page document (such as PDF/DJVU). | সংখ্যা | ঐচ্ছিক |
| width | width | বিবরণ নেই | অজানা | ঐচ্ছিক |
| cclass | cclass | বিবরণ নেই | অজানা | ঐচ্ছিক |
| cstyle | cstyle | বিবরণ নেই | অজানা | ঐচ্ছিক |
| float | float | বিবরণ নেই | অজানা | ঐচ্ছিক |
| clear | clear | বিবরণ নেই | অজানা | ঐচ্ছিক |
| margin-left | margin-left | বিবরণ নেই | অজানা | ঐচ্ছিক |
| margin-right | margin-right | বিবরণ নেই | অজানা | ঐচ্ছিক |
| imgclass | imgclass | বিবরণ নেই | অজানা | ঐচ্ছিক |
| imgwidth | imgwidth | বিবরণ নেই | অজানা | ঐচ্ছিক |
| caption | caption | বিবরণ নেই | অজানা | ঐচ্ছিক |
| top-caption | top-caption | বিবরণ নেই | অজানা | ঐচ্ছিক |
| tstyle | tstyle | বিবরণ নেই | অজানা | ঐচ্ছিক |
| talign | talign | বিবরণ নেই | অজানা | ঐচ্ছিক |
| tmleft | tmleft | বিবরণ নেই | অজানা | ঐচ্ছিক |
| indent | indent | বিবরণ নেই | অজানা | ঐচ্ছিক |