Vorlage:Collapse: Unterschied zwischen den Versionen

Aus Afterbuy-Wiki
Wechseln zu:Navigation, Suche
 
(9 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 2: Zeile 2:
 
if(is_array($argv) && !empty($argv)){
 
if(is_array($argv) && !empty($argv)){
 
   array_shift($argv);
 
   array_shift($argv);
   print_r($argv);
+
   $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'])!=""){
 +
    $text=trim($argv['text']);
 +
  }
 +
  $id=md5($text.mt_rand());
 +
  $class='light';
 +
  if(isset($argv['class']) && trim($argv['class'])!=""){
 +
    $class=trim($argv['class']);
 +
  }
 +
  $label='Anzeigen';
 +
  if(isset($argv['label']) && trim($argv['label'])!=""){
 +
    $label=trim($argv['label']);
 +
  }
 +
  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-target="#collapse'.$id.'" aria-expanded="false" aria-controls="collapse'.$id.'"><i class="fas fa-bars"></i>&nbsp;&nbsp;'.$label.'</button></html>
 +
  <div class="collapse" id="collapse'.$id.'">'.$text.'</div>');
 
}
 
}
$text= <<<TEXT
 
{{{text|Lorem ÖÄÜöäü?!"§$%&/()=`´´+*#-_.:,;<> dolor sit amet, consetetur 'sadipscing' elitr, sed diam "nonumy" eirmod tempor invidunt ut labore et dolore magna aliquyam}}}
 
TEXT;
 
$id=md5($text);
 
echo trim('<htmltag
 
  tagname="button" type="button" class="btn btn-{{{class|light}}}
 
  text-decoration-none small"
 
  data-toggle="collapse"
 
  data-target="#collapse'.$id.'" aria-expanded="false" aria-controls="collapse'.$id.'">{{{label|Anzeigen}}}</htmltag>
 
<div class="collapse" id="collapse'.$id.'">'.trim($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