Vorlage:Artikel:Start:Full: Unterschied zwischen den Versionen

Aus Afterbuy-Wiki
Wechseln zu:Navigation, Suche
Zeile 6: Zeile 6:
 
<div class="flex-fill justify-content-start text-left">{{{text|titeltext}}}</div>
 
<div class="flex-fill justify-content-start text-left">{{{text|titeltext}}}</div>
 
</div>
 
</div>
<html><script>document.getElementById('tableinhalt').innerHTML='<div class="toc" id="toc"><ul>'+document.getElementById('toc').querySelector('\\ul').innerHTML+'</ul></div>';</script></html>}}
+
<html><script>
 +
let toc=document.getElementById('toc').querySelector('\\ul').innerHTML.trim();
 +
if(toc!=""){
 +
  document.getElementById('tableinhalt').innerHTML='<div class="toc" id="toc"><ul>'+toc+'</ul></div>';
 +
} else {
 +
  document.getElementById('tableinhalt').style.display = "none";
 +
}</script></html>}}

Version vom 2. August 2021, 07:17 Uhr

Titel