remove redundant slideshow javascript; add static news section

This commit is contained in:
2026-08-22 13:28:57 +02:00
parent 5f96c7fdd8
commit 9df564d052
+14 -67
View File
@@ -191,77 +191,24 @@ targeting both emulators and real hardware.
<a href="images/montaukos-demo.jpg"><img src="images/montaukos-demo.jpg" width=800 alt=""></a> <a href="images/montaukos-demo.jpg"><img src="images/montaukos-demo.jpg" width=800 alt=""></a>
<p style="text-align: center;">Screenshot of MontaukOS 0.1.8</p> <p style="text-align: center;">Screenshot of MontaukOS 0.1.8</p>
<hr>
<h2 id="news">News</h2>
<article class="news-entry">
<h3><a href="https://danhammer.net/2026/08/22/a-new-system-logging-architecture-for-montaukos/">A new system logging architecture for MontaukOS</a></h3>
<p><time datetime="2026-08-22">August 22, 2026</time> &ndash; <a href="https://danhammer.net/">Daniel Hammer&rsquo;s personal blog</a></p>
<p>
MontaukOS 0.1.9 was in dire need of a unified logging system. With each version, userspace became more and more complex&hellip;
</p>
</article>
<article class="news-entry">
<h3><a href="downloads.html">MontaukOS 0.1.9 released</a></h3>
<p><time datetime="2026-08-13">August 13, 2026</time></p>
</article>
<hr> <hr>
<br> <br>
<div class="center"><p>Copyright &copy; 2025-2026 Montauk Operating System Project</p></div> <div class="center"><p>Copyright &copy; 2025-2026 Montauk Operating System Project</p></div>
</div> </div>
<script>
const slideshowItems = [
{
src: 'images/mtk_doomgame.png',
alt: 'MontaukOS screenshot showing DOOM running in the desktop environment',
caption: 'DOOM running inside MontaukOS.'
},
{
src: 'images/mtk_procmgr_devexplorer.png',
alt: 'MontaukOS screenshot showing Process Manager and Device Explorer',
caption: 'Process Manager and Device Explorer open on the MontaukOS desktop.'
}
];
const slideshowImage = document.getElementById('slideshow-image');
const slideshowCaption = document.getElementById('slideshow-caption');
const slideshowDots = document.getElementById('slideshow-dots');
const slideshowPrev = document.getElementById('slideshow-prev');
const slideshowNext = document.getElementById('slideshow-next');
let slideshowIndex = 0;
function renderSlideshow(index) {
const item = slideshowItems[index];
slideshowImage.src = item.src;
slideshowImage.alt = item.alt;
slideshowCaption.textContent = item.caption;
Array.from(slideshowDots.children).forEach(function(dot, dotIndex) {
dot.classList.toggle('active', dotIndex === index);
dot.setAttribute('aria-current', dotIndex === index ? 'true' : 'false');
});
}
function showSlide(index) {
slideshowIndex = (index + slideshowItems.length) % slideshowItems.length;
renderSlideshow(slideshowIndex);
}
if (slideshowItems.length === 0) {
slideshowImage.remove();
slideshowCaption.textContent = 'Screenshots will appear here when they are added to the site.';
slideshowPrev.hidden = true;
slideshowNext.hidden = true;
} else {
slideshowItems.forEach(function(item, index) {
const dot = document.createElement('span');
dot.className = 'slideshow-dot';
dot.setAttribute('aria-hidden', 'true');
slideshowDots.appendChild(dot);
});
slideshowPrev.addEventListener('click', function() {
showSlide(slideshowIndex - 1);
});
slideshowNext.addEventListener('click', function() {
showSlide(slideshowIndex + 1);
});
if (slideshowItems.length === 1) {
slideshowPrev.hidden = true;
slideshowNext.hidden = true;
}
renderSlideshow(slideshowIndex);
}
</script>
</body> </body>
</html> </html>