remove redundant slideshow javascript; add static news section
This commit is contained in:
+14
-67
@@ -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>
|
||||
<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> – <a href="https://danhammer.net/">Daniel Hammer’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…
|
||||
</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>
|
||||
<br>
|
||||
<div class="center"><p>Copyright © 2025-2026 Montauk Operating System Project</p></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>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user