// ── Blog URL classification ────────────────────────────────────────────────────
const mainSections = [
- { name: 'blog', url: '/blog/', title: 'Blog' },
- { name: 'projects', url: '/projects/', title: 'Projects' },
- { name: 'about', url: '/about.html', title: 'About' },
+ {
+ name: 'blog',
+ url: '/blog/',
+ title: 'Blog',
+ description: 'Java-Tipps und Tricks aus dem Entwickleralltag | Erfahrungsberichte aus Open-Source-Projekten | Technische Einblicke für Java-Entwickler'
+ },
+ {
+ name: 'projects',
+ url: '/projects/',
+ title: 'Projects',
+ description: 'Open-Source-Werkzeuge für Maven und Java | Nützliche Plugins für den Entwickleralltag | Bewährte Lösungen für typische Java-Probleme'
+ },
+ {
+ name: 'about',
+ url: '/about.html',
+ title: 'About',
+ description: 'Wer steckt hinter juplo.de? | Kontakt, Impressum und rechtliche Hinweise | Über den Autor und seine Arbeit'
+ },
];
const onBlog = currentUrl === '/blog/';
{mainSections.map(s => (
<li class={`m ${s.name}`}>
<a href={s.url} class={activeSection === s.name ? 'm selected' : 'm'}>{s.title}</a><span class="sep">:</span>
- <span class="description">Wechselnde passende Beschreibung des Bereichs</span>
+ <span class="description">{s.description}</span>
</li>
))}
</ul>
</div>
<hr class="n"/>
</nav>
-
-<script>
- const descriptions: Record<string, string[]> = {
- blog: [
- 'Java-Tipps und Tricks aus dem Entwickleralltag',
- 'Erfahrungsberichte aus Open-Source-Projekten',
- 'Technische Einblicke für Java-Entwickler',
- ],
- projects: [
- 'Open-Source-Werkzeuge für Maven und Java',
- 'Nützliche Plugins für den Entwickleralltag',
- 'Bewährte Lösungen für typische Java-Probleme',
- ],
- about: [
- 'Wer steckt hinter juplo.de?',
- 'Kontakt, Impressum und rechtliche Hinweise',
- 'Über den Autor und seine Arbeit',
- ],
- };
-
- const indices: Record<string, number> = {};
- const menuItems = document.querySelectorAll<HTMLElement>('#menu > li.m');
-
- menuItems.forEach(li => {
- const section = Array.from(li.classList).find(c => c !== 'm');
- if (!section || !descriptions[section]) return;
- const span = li.querySelector<HTMLElement>('span.description');
- if (!span) return;
- indices[section] = 0;
- span.textContent = descriptions[section][0];
- });
-
- setInterval(() => {
- menuItems.forEach(li => {
- const section = Array.from(li.classList).find(c => c !== 'm');
- if (!section || !descriptions[section]) return;
- const span = li.querySelector<HTMLElement>('span.description');
- if (!span) return;
- indices[section] = (indices[section] + 1) % descriptions[section].length;
- span.textContent = descriptions[section][indices[section]];
- });
- }, 5000);
-</script>