Anonym

Vorlage:TopNews: Unterschied zwischen den Versionen

Aus Geoportal
 
(4 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
 
<div class="topNews">
 
<div class="topNews">
<h2>{{{title|}}}</h2>
+
<h2 class="topNewsTitle">{{{title|}}}</h2>
<span><strong>{{{date|}}}</strong></span>
+
<span class="topNewsDate"><strong>{{{date|}}}</strong></span>
 
<span class="hiddenDuration" style="display:none;">{{{durationDays|}}}</span>
 
<span class="hiddenDuration" style="display:none;">{{{durationDays|}}}</span>
 
<p class="teaser">{{{teaser|}}}</p>
 
<p class="teaser">{{{teaser|}}}</p>
 
<p class="articleBody">{{{articleBody|}}}</p>
 
<p class="articleBody">{{{articleBody|}}}</p>
{{#if: {{{link|}}} {{{text|}}} |
 
<span class="external text"><strong>[{{{link|}}} {{{text|}}}]</strong></span>
 
}}
 
 
{{#if: {{{email|}}} |
 
{{#if: {{{email|}}} |
 
<span class="contact">Email: [mailto:{{{email|}}} {{{email|}}}]</span>
 
<span class="contact">Email: [mailto:{{{email|}}} {{{email|}}}]</span>
 
}}
 
}}
<!-- Reading time calculation script -->
 
<div id="reading-time">Reading time: Calculating...</div>
 
<script>
 
function calculateReadingTime() {
 
const wordsPerMinute = 200; // Adjust this value based on your content.
 
const text = document.body.innerText;
 
const words = text.split(/\s+/).length;
 
const readingTime = Math.ceil(words / wordsPerMinute);
 
document.getElementById('reading-time').textContent = `Reading time: ${readingTime} minutes`;
 
}
 
calculateReadingTime();
 
</script>
 
 
</div>
 
</div>

Aktuelle Version vom 15. Februar 2024, 14:59 Uhr