Vorlage:Buchbox: Unterschied zwischen den Versionen

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


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

Version vom 17. Juli 2025, 11:26 Uhr