Glanz (Diskussion | Beiträge)
Keine Bearbeitungszusammenfassung
Glanz (Diskussion | Beiträge)
Keine Bearbeitungszusammenfassung
Zeile 1: Zeile 1:
<!-- Vorlage:KLAPP
<!-- Nutzung:
Nutzung:
   {{KLAPP|start=zu|label=Details >>}}
   {{KLAPP}}
   … DEIN INHALT
   … TEXT, BILDER, Wikitext
   {{KLAPP-ENDE}}
   </div>


Optionale Parameter:
Parameter:
   |start=auf/zu  -> initial offen (Standard: zu)
   |start=auf/zu  -> initial offen (Standard: zu)
   |label=…        -> Button-Text (Standard: Details >>)
   |label=…        -> Button-Text (Standard: Details >>)
-->
-->


<style>
<details {{#ifeq:{{{start|zu}}}|auf|open}}>
/* --- Nur innerhalb dieses Templates wirksam --- */
  <summary style="text-align:center; margin:.25rem 0; list-style:none; cursor:pointer;">
.klpp-wrap > :not(.klpp-toggle):not(input[type="checkbox"]) { display: none; }
    <span style="
.klpp-wrap > input[type="checkbox"]:checked ~ * { display: revert; }
      display:inline-block; padding:.55rem 1rem;
 
      border:2px solid #000; border-radius:12px;
.klpp-toggle { text-align:center; margin:.25rem 0; }
      background:#fff; color:#000; font-weight:700; text-decoration:none;">
.klpp-btn {
      {{{label|Details >>}}}
  display:inline-block; padding:.55rem 1rem;
    </span>
  border:2px solid #000; border-radius:12px;
   </summary>
  background:#fff; color:#000; font-weight:700;
  <div>
  text-decoration:none; box-shadow:0 1px 2px rgba(0,0,0,.08);
  cursor:pointer;
}
/* Checkbox unsichtbar, aber vorhanden (für Toggle-Logik) */
.klpp-check {
  position:absolute; opacity:0; width:0; height:0; pointer-events:none;
}
/* Optional: Button-Style bei geöffnetem Zustand leicht betonen */
.klpp-wrap > input[type="checkbox"]:checked + label .klpp-btn {
  box-shadow:0 2px 6px rgba(0,0,0,.12);
}
</style>
 
<div class="klpp-wrap">
  <input class="klpp-check" type="checkbox" {{#ifeq:{{{start|zu}}}|auf|checked}}>
  <label class="klpp-toggle">
    <span class="klpp-btn">{{{label|Details >>}}}</span>
   </label>

Version vom 28. September 2025, 13:36 Uhr


<details >

 <summary style="text-align:center; margin:.25rem 0; list-style:none; cursor:pointer;">
   
     Details >>
   
 </summary>