Finish styling index

This commit is contained in:
2025-09-19 20:28:21 +02:00
parent 4e68f393bd
commit 3e3c209ac9
2 changed files with 33 additions and 24 deletions

View File

@@ -14,13 +14,13 @@ export class StartPagePlugin implements IPluginBuilder {
return (builderContext) => { return (builderContext) => {
let htmlTemplate = readFileAsText(this.options.indexTemplatePath); let htmlTemplate = readFileAsText(this.options.indexTemplatePath);
const links = builderContext.menuManifest 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(); .reverse();
const unorderedListItems = links.map((l) => `<li>${l}</li>`).join("\r\n");
const html = ` const html = `
<ul> ${links.join("")}
${unorderedListItems}
<ul>
`; `;
htmlTemplate = htmlTemplate.replace("{{content}}", html); htmlTemplate = htmlTemplate.replace("{{content}}", html);
writeTextAsFile( writeTextAsFile(

View File

@@ -30,29 +30,37 @@
align-items: center; align-items: center;
} }
.content ul { .content {
list-style-type: none; display: flex;
padding: 0; width: 100%;
flex: 1;
flex-direction: column;
} }
.content li { .content .entry {
margin: 1em 0; margin-top: 1rem;
padding: 8px;
border-radius: 8px; h2 {
border-style: solid; color: #00FFFF;
border-width: 1px; text-transform: capitalize;
border-color: #aaa;
} }
.content li::before { h2::after {
content: "📝"; margin-top: 1rem;
margin-right: 8px; top: 8px;
border-bottom: 3px dotted #00FFFF;
border-top: 3px dotted #00FFFF;
content: "";
width: 100%;
display: block;
position: relative;
box-sizing: border-box;
height: 8px;
} }
h2 a {
.content a { color: white;
color: #fbfbfe; }
text-decoration: none;
} }
.profile { .profile {
@@ -65,6 +73,7 @@
font-family: monospace; font-family: monospace;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
flex: 1;
} }
.profile .picture { .profile .picture {
@@ -78,7 +87,7 @@
.profile li {} .profile li {}
.banner { .banner {
margin-top: 2rem; margin-top: 1rem;
width: 100%; width: 100%;
height: 40px; height: 40px;
display: flex; display: flex;