Vorlage:Buchbox: Unterschied zwischen den Versionen

Aus WikiToYes
Wechseln zu:Navigation, Suche
Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
Zeile 1: Zeile 1:
<div class="row" style="margin:0 0 1em 0; padding:0; display:flex; align-items:flex-start;">
<div style="display:flex; margin:0; padding:0; border:0; line-height:1; font-size:14px;">
   <!-- Bild-Spalte (links) -->
   <!-- Bild (400px, direkt am Rand) -->
   <div class="col-sm-6" style="flex:0 0 400px; padding:0 15px 0 0;">
   <div style="flex:0 0 400px; margin:0; padding:0; background:none;">
    [[Datei:Home-fachbuch.png|400px|class=img-responsive]]
        [[Datei:Home-fachbuch.png|400px|class=img-responsive]]
   </div>
   </div>
    
    
   <!-- Text-Spalte (rechts) -->
   <!-- Metadaten + TOC-Button -->
   <div class="col-sm-6" style="flex:1; padding:0; display:flex; flex-direction:column; height:400px;">
   <div style="flex:1; margin:0 0 0 10px; padding:0; display:flex; flex-direction:column;">
     <div style="flex:0; font-size:0.9em; line-height:1.4; margin-bottom:10px;">
    <!-- Standortangaben (1-zeilig) -->
       '''Standort:''' [[Kategorie:Hauptkapitel]] • [[Gehört zu Buch::Handbuch]]<br>
     <div style="margin:0; padding:2px 0; font-size:0.9em;">
       '''Version:''' 2.1 • '''Status:''' {{#ifexist:Review:{{PAGENAME}}|freigegeben|in Bearbeitung}}
       '''Standort:''' [[Kategorie:Technik]] • [[Buch::Handbuch]]
       '''Version:''' 2.3
     </div>
     </div>
      
      
     <div style="flex:1; overflow:hidden; position:relative;">
    <!-- TOC als Popup-Button -->
       <div style="position:absolute; top:0; bottom:0; right:0; left:0; overflow-y:auto; padding-right:5px;">
     <div style="margin:0; padding:0;">
      <button
        onclick="document.getElementById('toc-popup').style.display='block'"
        style="background:#f8f9fa; border:1px solid #a2a9b1; padding:3px 8px; cursor:pointer;"
      >
        Inhaltsverzeichnis anzeigen
      </button>
     
      <!-- Popup-Container (hidden by default) -->
       <div id="toc-popup" style="display:none; position:fixed; top:50%; left:50%; transform:translate(-50%,-50%); background:white; padding:20px; border:1px solid #aaa; z-index:1000; max-height:80vh; overflow:auto; box-shadow:0 0 10px rgba(0,0,0,0.3);">
        <div style="text-align:right;">
          <button
            onclick="document.getElementById('toc-popup').style.display='none'"
            style="background:none; border:none; cursor:pointer; font-size:1.2em;"
          >✕</button>
        </div>
         __TOC__
         __TOC__
       </div>
       </div>
Zeile 20: Zeile 36:
</div>
</div>


<!-- Horizontale Trennlinie -->
<!-- Horizontale Linie (1px) -->
<div style="border-top:1px solid #ddd; margin:5px 0;"></div>
<hr style="margin:3px 0; border-top:1px solid #ddd; border-bottom:none;">
 
 
 
 
xxxx
 
<hr />
    [[Datei:Home-fachbuch.png|frameless|left|400px]]
    <!-- ASK-Abfrage oben -->
    <strong>Standort im Buch:</strong>
    <div class="small mb-2">
      {{#ask:
        [[Gehört zu Buch::Buch:Fachbuch]]
        [[Kategorie:Buch-Kapitel]]
        |?Kapitelüberschrift
        |format=ul
        |limit=100
      }}
    </div>
 
    <!-- TOC darunter, begrenzt in Höhe -->
    <strong>Inhaltsverzeichnis</strong>
    <div class="small" style="max-height: 400px; overflow-y: auto;">
      __TOC__
    </div>
 
<hr />

Version vom 16. Juli 2025, 09:35 Uhr

       
     Standort:HandbuchVersion: 2.3
     <button 
       onclick="document.getElementById('toc-popup').style.display='block'" 
       style="background:#f8f9fa; border:1px solid #a2a9b1; padding:3px 8px; cursor:pointer;"
     >
       Inhaltsverzeichnis anzeigen
     </button>