Redesign of index
Squashed commit of the following: commit1d157b529fAuthor: wholteza <zackarias@montell.se> Date: Fri Sep 19 20:53:00 2025 +0200 Improve on profile commit3e3c209ac9Author: wholteza <zackarias@montell.se> Date: Fri Sep 19 20:28:21 2025 +0200 Finish styling index commit4e68f393bdAuthor: wholteza <zackarias@montell.se> Date: Fri Sep 19 19:45:22 2025 +0200 Links commitfcba900a7eAuthor: wholteza <zackarias@montell.se> Date: Fri Sep 19 15:37:35 2025 +0200 add fetchpriority commit0478cb71b9Author: wholteza <zackarias@montell.se> Date: Thu Sep 18 14:44:35 2025 +0200 wip redesign
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user