«قالب:Tabber»: الفرق بين المراجعتين

[مراجعة منقحة][مراجعة منقحة]
 
(٦ مراجعات متوسطة بواسطة مستخدمين اثنين آخرين غير معروضة)
سطر ١: سطر ١:
{{#if: {{{نوافذ|}}} |
 
<div class="tabber" style="width:{{{width|100%}}}">__NOTOC__
 
{{#loop: varTabber | 1 | {{{نوافذ}}} |
 
    <div class="tabbertab" style="height:{{{Height|50px}}};{{{Style}}}">
 
  <h2>{{{العنوان{{#var:varTabber}}}}}</h2>
 
  {{{النص{{#var:varTabber}}}}}
 
    </div>
 
}}
 
</div>
 
}}
 
 
 
{{#switch: {{{ver|1}}}
 
{{#switch: {{{ver|1}}}
 
|1=
 
|1=
 
{{LoadJavascript|Script=tabber}}
 
{{LoadJavascript|Script=tabber}}
<div class="tabber-container">
+
<div class="tabber-container" data-activation="{{#if:{{{activation|}}}||true}}" data-url="{{#if:{{{url|}}}||false}}">
 
<div style="display: flex; flex-direction: row; gap: 10px; flex-wrap: wrap; {{#if:{{{noBg|}}}||background: rgba(0,0,0,.1);  border: 1px black solid;}} padding: 5px; {{#if:{{{Center|}}}|justify-content: center; width: fit-content;}}{{#if:{{{Cadre|}}}|border-bottom: 1px black;}}{{#if:{{{Center2|}}}|margin: 0 auto;}}">
 
<div style="display: flex; flex-direction: row; gap: 10px; flex-wrap: wrap; {{#if:{{{noBg|}}}||background: rgba(0,0,0,.1);  border: 1px black solid;}} padding: 5px; {{#if:{{{Center|}}}|justify-content: center; width: fit-content;}}{{#if:{{{Cadre|}}}|border-bottom: 1px black;}}{{#if:{{{Center2|}}}|margin: 0 auto;}}">
 
{{#forargs: Bo
 
{{#forargs: Bo
 
  | key
 
  | key
 
  | value
 
  | value
|<div id="{{anchorencode:{{#var:value}}}}" class="button {{#ifeq:{{#var:key}}|{{{numActive|1}}}|tabber-active}}" data-position="{{#expr:{{#var:key}}-1}}">{{#var:value}}</div>
+
|<div id="{{#var:value}}" class="button {{#ifeq:{{#var:key}}|{{{numActive|1}}}|tabber-active}}" data-position="{{#expr:{{#var:key}}-1}}">{{#var:value}}</div>
 
}}
 
}}
 
</div>
 
</div>
<div class="tabber-texte" style="{{#if:{{{Cadre|}}}|border: 1px black solid; padding: 5px;|padding-top: 10px;}} {{#if:{{{noOverflow|}}}||overflow-x: auto;}}">
+
<div style="{{#if:{{{Cadre|}}}|border: 1px black solid; padding: 5px;|padding-top: 10px;}} {{#if:{{{noOverflow|}}}||overflow-x: auto;}}">
 
{{#forargs: Co
 
{{#forargs: Co
 
  | key
 
  | key
 
  | value
 
  | value
|<div class="tabber-noactive {{#ifeq:{{#var:key}}|{{{numActive|1}}}|tabber-active}}">{{#if:{{{Pourcentage{{#var:key}}|}}}|<div style="text-align: center; padding-bottom: 5px; font-weight: bold; border-bottom: 1px black solid; margin-bottom: 10px;">Pourcentage de réussite : {{{Pourcentage{{#var:key}}|}}}</div>}}{{#ifexpr:{{#if:{{{Fabrication|}}}|1|0}} or {{#if:{{{Fabrication{{#var:key}}|}}}|1|0}}|<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(324px, 1fr)); justify-items: center; gap: 5px;">{{#var:value}}</div>|{{#var:value}}}}
+
|<div class="{{#ifeq:{{#var:key}}|{{{numActive|1}}}|tabber-active}}">{{#if:{{{Pourcentage{{#var:key}}|}}}|<div style="text-align: center; padding-bottom: 5px; font-weight: bold; border-bottom: 1px black solid; margin-bottom: 10px;">نسبة النجاح : {{{Pourcentage{{#var:key}}|}}}</div>}}{{#ifexpr:{{#if:{{{Fabrication|}}}|1|0}} or {{#if:{{{Fabrication{{#var:key}}|}}}|1|0}}|<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(324px, 1fr)); justify-items: center; gap: 5px;">{{#var:value}}</div>|{{#var:value}}}}
 
</div>
 
</div>
 
}}
 
}}
سطر ٣٢: سطر ٢١:
 
|2=
 
|2=
 
{{LoadJavascript|Script=tabber}}
 
{{LoadJavascript|Script=tabber}}
<div class="tabber-container">
+
<div class="tabber-container" data-activation="{{#if:{{{activation|}}}||true}}" data-url="{{#if:{{{url|}}}||true}}">
 
<div style="display: flex; flex-direction: row; gap: 10px; flex-wrap: wrap; padding: 5px; justify-content: center; width: fit-content; margin: 0 auto;">
 
<div style="display: flex; flex-direction: row; gap: 10px; flex-wrap: wrap; padding: 5px; justify-content: center; width: fit-content; margin: 0 auto;">
 
{{#forargs: Bo
 
{{#forargs: Bo
 
  | key
 
  | key
 
  | value
 
  | value
|<div id="{{anchorencode:{{#var:value}}}}" class="button {{#ifeq:{{#var:key}}|{{{numActive|1}}}|tabber-active}}" data-position="{{#expr:{{#var:key}}-1}}">{{#var:value}}</div>
+
|{{#if:{{#var:value}}|<div id="{{#var:value}}" class="button {{#ifeq:{{#var:key}}|{{{numActive|1}}}|tabber-active}}" data-position="{{#expr:{{#var:key}}-1}}">{{#var:value}}</div>}}
 
}}
 
}}
 
</div>
 
</div>
<div class="tabber-texte" style="padding-top: 10px;">
+
<div style="padding-top: 10px;">
 
{{#forargs: Co
 
{{#forargs: Co
 
  | key
 
  | key
 
  | value
 
  | value
|<div {{#if:{{{category{{#var:key}}|}}}|data-category="{{{category{{#var:key}}|}}}"}} class="tabber-noactive {{#ifeq:{{#var:key}}|{{{numActive|1}}}|tabber-active}} {{#if:{{{noSizing{{#var:key}}|}}}||image-sizing}}">{{#if:{{{noList{{#var:key}}|}}}|{{#var:value}}|<div {{#if:{{{oneColumn{{#var:key}}|}}}||class="grid2"}} style="display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); justify-content: left; grid-gap: 5px;">{{#var:value}}</div>}}</div>
+
|{{#if:{{#var:value}}|<div class="{{#ifeq:{{#var:key}}|{{{numActive|1}}}|tabber-active}}">{{#if:{{{noList{{#var:key}}|}}}|{{#var:value}}|<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); justify-content: left; grid-gap: 5px;">{{#var:value}}</div>}}</div>}}
 
}}
 
}}
 
</div>
 
</div>
 
</div>
 
</div>
 
}}
 
}}
 +
<noinclude>مستعمل في [[قالب:الأدوات]] و [[قالب:الأدوات/معلومات عامة]]</noinclude>

المراجعة الحالية بتاريخ ٢٢:١٥، ١٦ أبريل ٢٠٢٤