Vorlage:Collapse: Unterschied zwischen den Versionen
Aus Afterbuy-Wiki
Admin (Diskussion | Beiträge) |
Admin (Diskussion | Beiträge) |
||
(8 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
Zeile 3: | Zeile 3: | ||
array_shift($argv); | array_shift($argv); | ||
$text='Lorem ÖÄÜöäü?!"§$%&/()=`´´+*#-_.:,;<> dolor sit amet, consetetur \'sadipscing\' elitr, sed diam "nonumy" eirmod tempor invidunt ut labore et dolore magna aliquyam'; | $text='Lorem ÖÄÜöäü?!"§$%&/()=`´´+*#-_.:,;<> dolor sit amet, consetetur \'sadipscing\' elitr, sed diam "nonumy" eirmod tempor invidunt ut labore et dolore magna aliquyam'; | ||
− | if(isset($argv['text']) && trim($argv['text']!="" | + | if(isset($argv['text']) && trim($argv['text'])!=""){ |
− | $text= | + | $text=trim($argv['text']); |
} | } | ||
− | $id=md5($text); | + | $id=md5($text.mt_rand()); |
$class='light'; | $class='light'; | ||
− | if(isset($argv['class']) && trim($argv['class']!="" | + | if(isset($argv['class']) && trim($argv['class'])!=""){ |
$class=trim($argv['class']); | $class=trim($argv['class']); | ||
} | } | ||
$label='Anzeigen'; | $label='Anzeigen'; | ||
− | if(isset($argv['label']) && trim($argv['label']!="" | + | if(isset($argv['label']) && trim($argv['label'])!=""){ |
− | $ | + | $label=trim($argv['label']); |
} | } | ||
− | echo trim('< | + | echo trim('<html><button type="button" class="text-left bg-light p-2 text-decoration-none small w-100 border border-secondary" |
− | |||
− | |||
data-toggle="collapse" | data-toggle="collapse" | ||
− | data-target="#collapse'.$id.'" aria-expanded="false" aria-controls="collapse'.$id.'">'.$label.'</ | + | data-target="#collapse'.$id.'" aria-expanded="false" aria-controls="collapse'.$id.'"><i class="fas fa-bars"></i> '.$label.'</button></html> |
<div class="collapse" id="collapse'.$id.'">'.$text.'</div>'); | <div class="collapse" id="collapse'.$id.'">'.$text.'</div>'); | ||
} | } | ||
</phptag> | </phptag> |
Aktuelle Version vom 21. April 2021, 11:33 Uhr
Lorem ÖÄÜöäü?!"§$%&/()=`´´+*#-_.:,;<> dolor sit amet, consetetur 'sadipscing' elitr, sed diam "nonumy" eirmod tempor invidunt ut labore et dolore magna aliquyam