Şablon:CSS kırp

Vikipedi, özgür ansiklopedi
Şablon belgelemesi[gör] [değiştir] [geçmiş] [temizle]

{{CSS kırp}} creates a crop of an image inline for previewing the look and feel of a page, or for linking to full images when a slight crop is preferred in an article, but the full image is more encyclopaedic in general. Where only a small section of the image is used after the crop, it's best to upload the crop as a new file, to avoid sending the extra image data to users.

Note: There was a previous glitch for which some people had to use "tleft" "tright" etc. as a workaround because "left" and "right" did not work. As a result, to avoid having to fix all those pages that used the workaround, the template has been designed to function properly regardless of whether tright or right is used. See template talk for details.

Usage[kaynağı değiştir]

{{CSS kırp
|Image         = The Name of the image file, or may accept {{Annotated image}}.
|bSize         = The Base Image width in pixels (the image we are cropping on)
|cWidth        = Crop Image Width in pixels
|cHeight       = Crop image Height in pixels
|oTop          = Offset Top in pixels, optional and defaults to 0 when omitted
|oLeft         = Offset Left in pixels, optional and defaults to 0 when omitted
|Location      = 'right', 'left', 'center' or 'none'. Determines placement of the image on the page
                 Defaults to 'right' when description is provided (as is default for thumb images)
                 When description is blank, location on left (as is default for non-thumbs)
|Description   = Description (will render out using thumbnail class)
|Link          = Name of an article to be linked by clicking on the image (omit unless there is a
                 good reason to link to an article instead of the image).
|Alt           = The alt text for the image.
|Page          = The page of the file, if there are multiple pages (such as pdf files).
|magnify-link  = The image to be linked by the magnify icon (Use if the Image parameter is set to
                 {{Annotated image}} or the Link parameter leads to something other than the image).
}}

If you used above parameters incorrectly, then the article will be placed into Kategori:Hatalı CSS kırp parametresi kullanan resimler.

Examples[kaynağı değiştir]

Create a cropped image of a single water drop:

Thumbnail of the original file
Dew on grass Luc Viatour.jpg
  • Offset: oTop and oLeft define the upper left corner of the cropped image
  • Crop: cWidth and cHeight define the size of the cropped image
  • Base Size: Offset and Crop are calculated as if the original file had the width bSize
{{CSS kırp
|Image = Dew on grass Luc Viatour.jpg
|bSize = 400
|cWidth = 100
|cHeight = 100
|oTop = 180
|oLeft = 60
}}

In addition, the cropped image can have a caption-text and be positioned on the page:

  • Location= to position (center, right, left, none)
  • Description= to add a text to the caption
A drop of dew on grass (focus on the drop)
A drop of dew on grass (focus on the drop)
{{CSS kırp
|Image = Dew on grass Luc Viatour.jpg
|bSize = 400
|cWidth = 100
|cHeight = 100
|oTop = 180
|oLeft = 60
|Location = center
|Description = A drop of dew on grass (focus on the drop)
}}
https://tr.wikipedia.org/wiki/%C5%9Eablon:CSS_k%C4%B1rp
tr.wikipedia.org
crawl=CC-MAIN-2021-39
61227
application/http; msgtype=response
sha1:OOSXF5STMQ2PXOGFSH5TLSKRBEQKTRUN
<urn:uuid:aff8dade-c3de-4fb2-a3ec-5505c726ed15>
2021-09-25T17:10:30Z
208.80.154.224
text/html
sha1:ZDOVFQCGSOASOKJSVVGYK5UBVBOVBRSJ
<urn:uuid:d8d05f22-ef04-403f-b3fb-ebeb343cc518>
https://tr.wikipedia.org/wiki/%C5%9Eablon:CSS_k%C4%B1rp
response
<urn:uuid:faafd2f5-f04f-4e4a-aa55-753db3b0835e>
isPartOf: CC-MAIN-2021-39
publisher: Common Crawl
description: Wide crawl of the web for September 2021
operator: Common Crawl Admin (info@commoncrawl.org)
hostname: ip-10-67-67-93
software: Apache Nutch 1.18 (modified, https://github.com/commoncrawl/nutch/)
robots: checked via crawler-commons 1.2-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)
format: WARC File Format 1.1
conformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/