Vorlage:Buchbox: Unterschied zwischen den Versionen

Aus WikiToYes
Wechseln zu:Navigation, Suche
Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
 
(83 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
<!-- Horizontale Linie oben -->
<noinclude>{{Dokumentation}}</noinclude>
<hr style="margin:3px 0; height:1px; background:#ddd; border:none;">
<includeonly>
 
<div class="container-fluid px-0">
<!-- Flex-Container: Bild links, Text + TOC rechts -->
      <div class="row align-items-center g-0"
<div style="display: flex; align-items: flex-start; gap: 1rem;">
    style="background:#f8f9fa; border:1px solid #0000FF; border-radius:8px; padding:1px; margin:0 0 15px 0;">
 
     <!-- Linke Spalte: Buchcover -->
  <!-- Buchcover (400px) -->
     <div class="col-md-4">
  <div style="flex: 0 0 auto;">
       <div class="p-0 m-0">
    [[Datei:Home-fachbuch.png|400px|class=img-responsive]]
         [[Datei:Home-Fachbuch.jpg|frameless|500px|link= Mediatorenkoffer]]
  </div>
       </div>
 
  <!-- Rechte Seite: Standort + TOC -->
  <div style="flex: 1 1 auto;">
 
    '''Standort:''' [[Kategorie:Technik]] • [[Buch::Handbuch]] • '''Version:''' 2.3
 
     <!-- Button zum Umschalten -->
     <div style="margin-top: 0.5em;">
       <button onclick="document.getElementById('fade-toc').classList.toggle('shown');" class="btn btn-sm btn-outline-secondary">
         Inhaltsverzeichnis anzeigen / ausblenden
       </button>
     </div>
     </div>
   
    <!-- Rechte Spalte: Navigation  -->
    <div class="col-md-8">
      <div class="ps-3">
        <!-- Buchnavigation -->
        <div style="background:#f8f9fa; border-radius:8px; padding:12px; margin-bottom:15px">
          <div style="display:flex; gap:15px; flex-wrap:wrap">
            <!-- Buchhierarchie -->
            <div style="flex:1; min-width:200px">
              <h4 style="margin-top:0">Position im Fachbuch</h4>
              <div style="font-size:0.95em">
                <div>Buch: {{#show:{{FULLPAGENAME}}|?Gehört_zu_Buch}}</div>
                {{#if:{{#show:{{FULLPAGENAME}}|?Übergeordnete_Seite|link=none}}|
                <div>Kapitel: {{#show:{{FULLPAGENAME}}|?Übergeordnete_Seite}}</div>
                }}
                <div>Dieser Beitrag: <strong>{{FULLPAGENAME}}</strong></div>
                {{#if:{{#show:{{FULLPAGENAME}}|?Weiterlesen|link=none}}|
                <div>Weiter: {{#show:{{FULLPAGENAME}}|?Weiterlesen}}</div>
                }}
            </div>
            </div>


    <!-- TOC-Container mit Fade -->
            <!-- Unterkapitel -->
    <div id="fade-toc" class="toc-fade" style="max-height: 400px; overflow-y: auto;">
            <div style="flex:1; min-width:200px">
       __TOC__
              <h4 style="margin-top:0">Unterkapitel</h4>
              {{#ask:[[Übergeordnete_Seite::{{FULLPAGENAME}}]]
              |format=ul
              |sort= Sortierwert
              |default=<small style="color:#666">Keine Unterkapitel</small>
              }}
            </div>
           
          </div>
        </div>
       </div>
     </div>
     </div>
 
   
   </div>
   </div>
</div>
</div>
 
</includeonly>
<!-- Horizontale Linie unten -->
<hr style="margin:3px 0; height:1px; background:#ddd; border:none;">
 
<!-- CSS: Fade-Effekt -->
<style>
.toc-fade {
  opacity: 0;
  max-height: 0;
  transition: opacity 0.6s ease, max-height 0.6s ease;
  overflow: hidden;
  margin-top: 0.5em;
}
.toc-fade.shown {
  opacity: 1;
  max-height: 400px;
}
</style>

Aktuelle Version vom 23. Juli 2025, 16:28 Uhr