Vorlage:Section1: Unterschied zwischen den Versionen

Aus Afterbuy-Wiki
Wechseln zu:Navigation, Suche
(Die Seite wurde neu angelegt: „{{Section|title={{{title|}}}|level=1|include={{{include|}}}|intent={{{intent|0}}}|subintent={{{subintent|0}}}|subtitle={{{subtitle|}}}}} <!-- div class="p-0 m-…“)
 
 
(4 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
{{Section|title={{{title|}}}|level=1|include={{{include|}}}|intent={{{intent|0}}}|subintent={{{subintent|0}}}|subtitle={{{subtitle|}}}}}
+
__NOTITLE__
<!-- div class="p-0 m-0 ml-{{{intent|0}}}">
+
<phptag>
{{#if: {{{title|}}} | <h1>{{{title|Titel}}} {{#if:{{{subtitle|}}} | <sub class="badge badge-pil badge-secondary p-1" style="font-size:9px;">{{{subtitle|}}}</sub> }}</h1> |}}
+
$headline=1;
<div class="p-0 m-0 ml-{{{subintent|0}}}">
+
$headlineString=str_repeat('=',$headline);
{{:{{{include|}}}}}
+
$title='Titel';
</div>
+
$intent=$subintent=0;
</div -->
+
$out=$subtitle=$include='';
 +
if(isset($argv) && is_array($argv) && !empty($argv)){
 +
if(isset($argv['intent']) && intval($argv['intent'])>0){
 +
$intent=intval($argv['intent']);
 +
}
 +
$out.='<div class="p-0 m-0 ml-'.$intent.'">';
 +
if(isset($argv['title']) && trim($argv['title'])!=""){
 +
$title=trim($argv['title']);
 +
}
 +
$out.=chr(10).$headlineString.' '.$title;
 +
if(isset($argv['subtitle']) && trim($argv['subtitle'])!=""){
 +
$subtitle=trim($argv['subtitle']);
 +
$out.='<sub class="badge badge-pil badge-secondary p-1" style="font-size:9px;">'.$subtitle.'</sub>';
 +
}
 +
$out.=' '.$headlineString.chr(10);
 +
if(isset($argv['include']) && trim($argv['include'])!=""){
 +
$include=trim($argv['include']);
 +
if(isset($argv['subintent']) && intval($argv['subintent'])>0){
 +
$subintent=intval($argv['subintent']);
 +
}
 +
                $GLOBALS['include']=true;
 +
$out.='<div class="p-0 m-0 ml-'.$subintent.'">'.transclude(':'.$include).'</div>';
 +
$GLOBALS['include']=false;
 +
}
 +
$out.='</div>';
 +
}
 +
echo $out;
 +
</phptag>

Aktuelle Version vom 31. August 2021, 12:06 Uhr

Titel[Bearbeiten]