Vorlage:Buchbox: Unterschied zwischen den Versionen

Aus WikiToYes
Wechseln zu:Navigation, Suche
Keine Bearbeitungszusammenfassung
Markierung: Zurückgesetzt
Keine Bearbeitungszusammenfassung
Markierung: Manuelle Zurücksetzung
Zeile 9: Zeile 9:
     <div class="col-md-4">
     <div class="col-md-4">
       <div class="p-0 m-0">
       <div class="p-0 m-0">
         [[Datei:Home-fachbuch.png|frameless|500px|link=Fachbuch]]
         [[Datei:Home-fachbuch.png|frameless|500px|link=Buch:{{#show:{{FULLPAGENAME}}|?Gehört_zu_Buch|link=none}}]]
       </div>
       </div>
     </div>
     </div>
      
      
     <!-- Rechte Spalte: Navigation -->
     <!-- Rechte Spalte: Navigation + TOC -->
     <div class="col-md-8">
     <div class="col-md-8">
       <div class="ps-3">
       <div class="ps-3">
          
          
         <!-- Aktuelle Position -->
         <!-- Buchnavigation -->
         <div style="background:#f8f9fa; padding:12px; border-radius:8px; margin-bottom:15px">
         <div style="background:#f8f9fa; border-radius:8px; padding:12px; margin-bottom:15px">
           <h4 style="margin-top:0">Buchnavigation</h4>
           <div style="display:flex; gap:15px; flex-wrap:wrap">
         
           
          <!-- Hierarchie-Pfad -->
            <!-- Buchhierarchie -->
          <div style="margin-bottom:10px">
            <div style="flex:1; min-width:200px">
            {{#show:{{FULLPAGENAME}}|?Gehört_zu_Buch}} ›
              <h4 style="margin-top:0">Buchposition</h4>
            {{#show:{{FULLPAGENAME}}|?Übergeordnete_Seite}} ›
              <div style="font-size:0.95em">
            <strong>{{PAGENAME}}</strong>
                <div>Buch: [[{{#show:{{FULLPAGENAME}}|?Gehört_zu_Buch}}]]</div>
          </div>
                {{#if:{{#show:{{FULLPAGENAME}}|?Übergeordnete_Seite|link=none}}|
         
                 <div>Kapitel: [[{{#show:{{FULLPAGENAME}}|?Übergeordnete_Seite}}]]</div>
          <!-- Vorheriges/Nächstes Kapitel -->
                }}
          <div style="display:flex; gap:15px; font-size:0.9em">
                <div style="margin-top:5px"><strong>{{PAGENAME}}</strong></div>
            <div style="flex:1">
              </div>
              {{#set_previous:prev|book={{#show:{{FULLPAGENAME}}|?Gehört_zu_Buch}}}}
              {{#if:{{#var:prev}}|
                 [[{{#var:prev}}|Vorheriges]]
              }}
             </div>
             </div>
             <div style="flex:1; text-align:right">
           
               {{#set_next:next|book={{#show:{{FULLPAGENAME}}|?Gehört_zu_Buch}}}}
            <!-- Unterkapitel -->
               {{#if:{{#var:next}}|
             <div style="flex:1; min-width:200px">
                [[{{#var:next}}|Nächstes]]
               <h4 style="margin-top:0">Unterkapitel</h4>
               {{#ask:[[Übergeordnete_Seite::{{FULLPAGENAME}}]]
              |sort=Title
              |order=asc
              |format=ul
              |link=all
              |default=<small style="color:#666">Keine Unterkapitel</small>
               }}
               }}
             </div>
             </div>
           
           </div>
           </div>
         </div>
         </div>
          
          
         <!-- Unterkapitel -->
         <!-- Inhaltsverzeichnis -->
         <div style="margin-bottom:15px">
         <div id="fade-toc" class="toc-fade" style="max-height: 400px; overflow-y: auto;">
           <h5>Unterkapitel:</h5>
           __TOC__
          {{#ask:[[Übergeordnete_Seite::{{FULLPAGENAME}}]]
          |sort=Title
          |order=asc
          |format=ul
          |link=all
          |default=<small>Keine Unterkapitel</small>
          }}
         </div>
         </div>
          
          
        <!-- TOC -->
        <div id="fade-toc" style="max-height:300px; overflow-y:auto">
          __TOC__
        </div>
       </div>
       </div>
     </div>
     </div>
   
   </div>
   </div>
</div>
</div>
Zeile 68: Zeile 61:
<hr style="margin: 0;">
<hr style="margin: 0;">


<!-- Notwendige Vorlagen -->
<!-- CSS für responsive Anpassungen -->
{{#set_previous:
<style>
|var=prev
@media (max-width: 768px) {
|book={{#show:{{FULLPAGENAME}}|?Gehört_zu_Buch}}
  .col-md-4, .col-md-8 {
|within category=Buchseiten
    width: 100%;
}}
    padding-right: 0;
{{#set_next:
  }
|var=next
  .toc-fade {
|book={{#show:{{FULLPAGENAME}}|?Gehört_zu_Buch}}
    max-height: 200px !important;
|within category=Buchseiten
  }
}}
}
</style>
</includeonly>
</includeonly>

Version vom 17. Juli 2025, 16:24 Uhr