قالب:طي أعلى الصفحة

From mediawiki.org
This page is a translated version of the page Template:Collapse top and the translation is 100% complete.
محتوى موسع
المحتوى التالي حل محله صندوق مطوي لتحسين مستوى الاستخدام.
توثيق القالب

يستخدم القالب {{Collapse top}} ومعه القالب المربوط به {{Collapse bottom}}، في وضع صندوق طي حول نقاش داخل صفحة نقاش.

الاستخدام

ضع {{Collapse top}} و{{Collapse bottom}} حول النص المطلوب طيه. كمثال:

{{Collapse top|title=This is the title text}}
Sample contents text
{{Collapse bottom}}

ينتج عنه:

This is the title text

Sample contents text

{{Collapse bottom}} يجب أن يوضع دائمًا في سطر خاص به.

المتغيرات

يستعين هذا القالب بالمتغيرات التالية، وهي جميعًا متغيرات اختيارية. يجب أن تستخدم حالة الأحرف الصحيحة. تتطلب تلك المتغيرات التي تستعين بقياسات سي إس إس أن تكون المتغيرات بصيغة سي إس إس (مثل 1em لا 1 em).

|1= (أو أول متغير غير مسمى), |title=, |reason=, |header=, |heading=
النتيجة هي إضافة عنوان للصندوق المطوي الذي سيظهر على ذات سطر وصلة «عرض» وسيكون دائمًا واضحًا ومعروضًا. القيمة الافتراضية هي «محتوى موسع – Extended content».
على سبيل المثال {{Collapse top|title=This is the title text}} أو {{Collapse top|This is the title text}}. ملاحظة: لن يعمل الترميز القصير غير المسمى لو كانت قيمة العنوان تحتوي على محرف يساوي (=).
|warning=yes
سوف يعرض سطر تحذير افتراضي تحت العنوان الرئيسي والذي سيكون نصه «التالي هو نقاش مغلق. يرجى الامتناع عن تعديله.»
سوف ينتج عن أي قيمة غير فارغة مضافة إلى هذا المتغير (أي أن |warning= لن يعمل حسب ما هو متوقع).
|2= (أو ثاني متغير غير مسمى)
هذا نص سطر تحذير اختياري. سوف يتخطى سطر التحذير الافتراضي المذكور سالفًا؛ ليس من الضروري أيضا استخدام |warning=yes في هذه الحالة، إلا أن هذا الأمر لن يضير في شيء.
|left=yes
سوف ينتج عنه محاذاة العنوان في الهامش على اليسار (بالنسبة للغات التي تكتب من اليمين، في الهامش على اليمين).
يكون النص بصفة افتراضية موسطًا، بين الحد الأيسر للصندوق الأخضر والحد الأيسر لوصلة «عرض» على وجه التحديد.
سوف ينتج عن أي قيمة غير فارغة مضافة إلى هذا المتغير (أي أن |left= لن يعمل حسب ما هو متوقع).
|expand=yes
سوف يترك المحتوى غير مطوي مع الحدود والألوان. الحالة الافتراضية هي طي المحتوى.
سوف ينتج عن أي قيمة غير فارغة مضافة إلى هذا المتغير (أي أن |expand= لن يعمل حسب ما هو متوقع).
|bg=
يحدد لون الخلفية خلف عنوان الشريط المطوي. القيمة الافتراضية هي «#F8FCFF»، وهي لون قريب من الأبيض. الألوان المذكورة مسردة في قائمة الألوان.
على سبيل المثال، {{Collapse top|This is the title text|bg=#008000}} أو {{Collapse top|This is the title text|bg=green}} (أكواد ألوان إتش تي إم إل الرقمية تتطلب إضافية البادئة #).
|fc=
يحدد لون خط العنوان في الشريط المطوي. القيمة الافتراضية هي «black».
طالع |bg=، سالفًا، لترى تفاصيل خيارات الألوان.
|border=
يحدد عرض خط الحد للمحتوى المطوي. القيمة الافتراضية هي 1px.
على سبيل المثال، {{Collapse top|border=2px}}؛ تحديد سمك أكبر من هذا لن يكون مفيدًا.
|b-color=
يحدد لون الحد. القيمة الافتراضية هي silver (#C0C0C0).
طالع |bg=، سالفًا، لترى تفاصيل خيارات الألوان.
|padding=
يحدد النطاق (مسافة من الحد) المفروض على المحتوى المطوي داخل المساحة الملونة. القيمة الافتراضية هي 8px.
|width=
يحدد عرض القالب إجمالا نسبة للصفحة (أو عنصر كامل يحتوي على الصندوق المطوي). يجب أن تضاف هذه القيمة دائمًا في صيغة نسبة مئوية، مثل |width=50% أو في حدات em نسبية، مثل |width=30em. يجب تلافي القيم المضافة بصيغة بكسل، منذ أنها في الواقع لا معنى لها – سوف تكون النتيجة مختلفة استنادا إلى متصفح كل مستخدم وإعدادات سي إس إس المحلية (ما هو المتصفح ونظام التشغيل ومستوى التكبير وأحجام الخطوط وخلافه).
|border2=
يحدد خصائص حد الصندوق الذي يظهر حينما يوسع القالب. القيمة الافتراضية هي 1px silver (لا يوجد خيار للتغيير من خط مصمت).
على سبيل المثال، {{Collapse top|border2=2px}} (سوف يتغير العرض أو اللون لو كانت قيمة واحدة فقط موجودة).
طالع |bg=، سالفًا، لترى تفاصيل خيارات الألوان.
|bg2=
يحدد لون خلفية الصندوق الذي يظهر حينما يوسع القالب؛ القيمة الافتراضية هي white (#FFF).
طالع |bg=، سالفًا، لترى تفاصيل خيارات الألوان.
|indent=
يضع الصندوق على يسار الصفحة. القيمة الافتراضية عدم وجود مسافة بادئة. كل : في لغة ترميز صفحة النقاش تساوي تقريبا 1.6em من المسافة (مثال، كي تماثل مستوى مسافة ::::، استخدم |indent=6.4em). يمكنك أيضا استخدام قيمة بنسبة مئوية.
يجب تجنب استخدام قيم بصيغة بكسل (طالع |width=، سالفًا، لتعلم السبب).

أمثلة

  • إضافة عنوان للصندوق (لو لم يضاف، سيكون العنوان الافتراضي هو «محتوى موسع») – {{Collapse top|This is the title text}}
This is the title text
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
  • إضافة سطر تحذير قياسي – {{Collapse top|This is the title text|warning=true}}
This is the title text
التالي ليس إلا سجال انتهى نقاشه. يرجى عدم تعديله.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
  • إضافة سطر تحذير مخصص – {{Collapse top|This is the title text|This is a custom warning line}}
This is the title text
This is a custom warning line
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
  • محاذاة عنوان الصندوق ناحية الهامش الأيسر – {{Collapse top|left=true}}
محتوى موسع
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
  • تغيير لون الخلفية – {{Collapse top|bg=#F0F2F5}}
محتوى موسع
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
  • إضافة مسافة إضافية – {{Collapse top|padding=5em}}
محتوى موسع
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
  • حفظ فقرة في الأرشيف – الترميز التالي:
{{Collapse top}}
== Section header ==
Sample contents text
{{Collapse bottom}}

يتعين أن يكتب كما يلي:

{{Collapse top|Section header}}
Sample contents text
{{Collapse bottom}}

النتيجة النهائية:

Section header

Sample contents text

بيانات القالب (TemplateData)

This is the TemplateData documentation for this template used by VisualEditor and other tools.

Collapse top

Use in conjunction with {{Collapse bottom}}. Will collapse text in between the two templates.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Title1 title heading header reason result

Main title of collapsed box

Example
This is the title text
Unknownrequired
Custom warning line2

Will override the standard warning line, and make the 'warning' parameter unnecessary

Example
This is a custom warning line
Stringoptional
indentindent

Indents the box from the left of the page

Auto value
0px
Unknownoptional
expandexpand collapse

Using expand=yes or collapse=no will leave the material uncollapsed with the border and coloring

Example
true
Auto value
Stringoptional
Border width (px)border

Sets the width of the border line on the collapsed material

Default
1px
Example
2px
Auto value
Unknownoptional
Border colorb-color

Sets the border color

Default
Silver
Example
#F0F2F5
Unknownoptional
Template width (px or %)width

Sets the width of the overall template

Example
50%
Unknownoptional
Collapsed material background colorbg

Sets the background color of the collapsed material

Default
#CFC
Example
#F0F2F5
Unknownoptional
Alight along the left margin (true or blank)left

Will align the 'parameter 1 title' along the left margin

Default
Example
true
Stringoptional
Title font colorfc

Sets the font color of the title of the collapsible bar

Default
Black
Example
#F0F2F5
Unknownoptional
Warning (true or blank)warning

Will display a default warning line under the main title which reads "The following is a closed debate. Please do not modify it."

Example
true
Unknownoptional
Expanded box border size & colorborder2

Sets the border of the box that appears when template is expanded

Default
1px silver
Example
2px
Unknownoptional
Padding (px)padding

Sets the padding on the collapsed material in the colored area

Default
8px
Example
16px
Unknownoptional
Expanded box colorbg2

Sets background of the box that appears when template is expanded

Default
white
Example
#F0F2F5
Unknownoptional

انظر أيضا