قالب:قرابة
ق.
استعمال
عدلهذا القالب ينشئ اختصارًا لـ قرابة ("ق."). افتراضيًا، يحديد الاختصار بـ <abbr>
.
مثال
عدلالصيغة | ستظهر | ملاحظات |
---|---|---|
{{قرابة}} 1325
|
ق. 1325 | Default style. Line break allowed between "ق." and "1325"; normal-width space |
{{قرابة|1325}}
|
ق. 1325 | Default style. No line break allowed; thin space |
{{قرابة|1325|i=yes}}
|
ق. 1325 | With italic "c.", though italics are discouraged at ويكيبيديا:YEAR |
{{قرابة|1325|lk=abbr}}
|
ق. 1325 | With abbreviation marking only (default) |
{{قرابة|1325|lk=yes}}
|
قرابة 1325 | With link only |
{{قرابة|1325|lk=no}}
|
قرابة 1325 | With neither link nor abbreviation marking |
{{قرابة|1000|1050}}
|
ق. 1000– ق. 1050 | For ranges |
{{قرابة|1325}}
|
ق. 1325 | Shorthand for {{قرابة|1325|lk=no}} |
{{قرابة|1000|1050}}
|
ق. 1000– ق. 1050 | Shorthand for {{قرابة|1000|1050|lk=no}} |
المعلمات
عدلUsing the date itself as parameter (for example, "{{قرابة |1956}}
", giving "ق. 1956"), web browsers do not insert a line break anywhere in the string. By contrast, "{{قرابة }} 1956
" allows a line break between the "ق." and the number. Also, with the date as a parameter a thinner space is used with many browsers:
- "ق. 1956" is generated by "
{{قرابة |1956}}
". - "ق. 1956" is generated by "
{{قرابة }} 1956
".
If the parameter |i=
is set to a nonempty value, the "c." is put in italics: for example, "{{قرابة |i=''}}
" generates "ق." instead of "ق.".
If the parameter |lk=
(for "link") is set as "|lk=no
" or "|lk=off
", the abbreviation is rendered as "قرابة", without a wikilink or abbreviation element. If it is set to "|lk=abbr
", it is rendered with the abbreviation element but without the wikilink. If it is set to "|lk=yes
" or "|lk=on
", it is rendered as "قرابة", with a wikilink to the سرك (Circa) article and not an abbreviation element. Otherwise, the abbreviation is marked with the "<abbr>
" element, as in "ق." and linked to the سرك (Circa) article. The lk
parameter can be used to avoid overuse of "<abbr>
" or overlinking when this template is used repeatedly in the body of an article. A convenient way of doing this is to use {{قرابة}} the first time, and {{قرابة}} thereafter. For example:
[[دنيسيوس الصغير]] was born {{قرابة |470}}, lived in Rome from {{قرابة |500}}, and died {{قرابة |544}}.
- → دنيسيوس الصغير was born ق. 470, lived in Rome from ق. 500, and died ق. 544.
If the parameter "sortable=yes
" is specified, the template generates invisible text that will cause the output to work in sortable tables, at the cost of causing problems for visually-impaired readers. Compare, "Col 1" and "Col 2" in the following table:
Title | Col 1 | Col 2 |
---|---|---|
Foo | 1066 | 1066 |
Bar | ق. 1510 | 1510 | ق.
Baz | 1956 | 1956 |
"Col 1" uses {{قرابة }} 1510
, and does not sort correctly. "Col 2" uses {{قرابة |1510|sortable=yes}}
and does sort correctly. This works because {{قرابة |1510|sortable=yes}}
inserts an invisible span element at the start of the cell: <span style="display:none;">1510</span>
. Although it is not rendered, it is still seen by the sorting code and makes sorting work. The downside of this approach is that the invisible text is still rendered by screen readers that are used by visually impaired readers, and by text browsers such as لنكس, so the table will become garbled for readers who are using تكنولوجيا مساعدة or low-bandwidth browsers.