Redesign of index

Squashed commit of the following:

commit 1d157b529f
Author: wholteza <zackarias@montell.se>
Date:   Fri Sep 19 20:53:00 2025 +0200

    Improve on profile

commit 3e3c209ac9
Author: wholteza <zackarias@montell.se>
Date:   Fri Sep 19 20:28:21 2025 +0200

    Finish styling index

commit 4e68f393bd
Author: wholteza <zackarias@montell.se>
Date:   Fri Sep 19 19:45:22 2025 +0200

    Links

commit fcba900a7e
Author: wholteza <zackarias@montell.se>
Date:   Fri Sep 19 15:37:35 2025 +0200

    add fetchpriority

commit 0478cb71b9
Author: wholteza <zackarias@montell.se>
Date:   Thu Sep 18 14:44:35 2025 +0200

    wip redesign
This commit is contained in:
2025-09-19 20:54:49 +02:00
parent 215c9ff878
commit 9293108dcf
5 changed files with 139 additions and 28 deletions

View File

@@ -14,13 +14,13 @@ export class StartPagePlugin implements IPluginBuilder {
return (builderContext) => {
let htmlTemplate = readFileAsText(this.options.indexTemplatePath);
const links = builderContext.menuManifest
.map((m) => `<a href='${m.link}'>${m.name}</a>`)
.map((m) => {
const name = m.name.slice(m.name.indexOf("-") + 1).replaceAll("-", " ");
return `<div class="entry"><h2>${name}</h2><a href='${m.link}'>Read here!</a></div>`
})
.reverse();
const unorderedListItems = links.map((l) => `<li>${l}</li>`).join("\r\n");
const html = `
<ul>
${unorderedListItems}
<ul>
${links.join("")}
`;
htmlTemplate = htmlTemplate.replace("{{content}}", html);
writeTextAsFile(