Vorlage:BasePanel: Unterschied zwischen den Versionen
Aus Afterbuy-Wiki
Admin (Diskussion | Beiträge) |
Admin (Diskussion | Beiträge) |
||
(9 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
Zeile 13: | Zeile 13: | ||
$class=''; | $class=''; | ||
$style=''; | $style=''; | ||
+ | $contentclass=''; | ||
if ($type=='info'){ | if ($type=='info'){ | ||
Zeile 32: | Zeile 33: | ||
$icon='fas fa-question-circle text-info'; | $icon='fas fa-question-circle text-info'; | ||
//$style='font-weight:bold;font-size:25px;'; | //$style='font-weight:bold;font-size:25px;'; | ||
+ | } else if ($type=='wip'){ | ||
+ | $class='bg-warning p-1 px-2 rounded-pill'; | ||
+ | $icon='fas fa-tools text-dark'; | ||
+ | } else if ($type=='code' || $type=='codeexample' ){ | ||
+ | $class='flex-column bg-light p-1'; | ||
+ | $contentclass='text-monospace text-dark'; | ||
+ | $text='<pre class="code font-weight-bold">'.$text.'</pre>'; | ||
} | } | ||
$out='<div class="d-flex '.$class.' mx-0 my-3" style="'.$style.'">'; | $out='<div class="d-flex '.$class.' mx-0 my-3" style="'.$style.'">'; | ||
− | if($type=='example'){ | + | if($type=='example' || $type=='codeexample' ){ |
− | $out.='<p><span class="badge badge-secondary border-0"> | + | $head='Beispiel'; |
+ | if(isset($argv['head']) && trim($argv['head'])!=""){ | ||
+ | $head=trim($argv['head']); | ||
+ | } | ||
+ | $out.='<p><span class="badge badge-secondary border-0">'.$head.'</span></p>'; | ||
} else { | } else { | ||
if($icon!=""){ | if($icon!=""){ | ||
Zeile 42: | Zeile 54: | ||
} | } | ||
} | } | ||
− | $out.='<div class="mx-1 px-1 border-0 flex-grow-1">'.$text.'</div></div>'; | + | $out.='<div class="mx-1 px-1 border-0 flex-grow-1 '.$contentclass.'">'.$text.'</div></div>'; |
echo $out; | echo $out; | ||
} | } | ||
</phptag> | </phptag> |
Aktuelle Version vom 27. Oktober 2021, 08:57 Uhr
informations