Skip to content

Commit

Permalink
Refactor index.js file layout
Browse files Browse the repository at this point in the history
  • Loading branch information
besoeasy committed Dec 5, 2023
1 parent ab8fe1f commit 27c9f65
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,20 +111,22 @@ async function buildIndex() {
"dist/",
"https://tailwind.besoeasy.com/"
);
const link = `<div><a class="m-5 uppercase" href="${fileUrl}">${nameS}</a><div>`;
const link = `<div class="col-span-1"><a class="m-5" href="${fileUrl}">${nameS}</a><div>`;

indexEntries[directoryName].push(link);
}

let mainIndex = "";

mainIndex += ` <div class="grid grid-cols-8 gap-4">`;

for (const directory in indexEntries) {
mainIndex += `<div class="py-20 leading-none text-3xl uppercase">${directory}</div>`;
mainIndex += ` <div class="grid grid-cols-8 gap-4">`;
mainIndex += `<div class="text-3xl col-span-8">${directory}</div>`;
mainIndex += indexEntries[directory].join("");
mainIndex += ` </div>`;
}

mainIndex += ` </div>`;

const indexHTML = `
Expand Down Expand Up @@ -222,7 +224,7 @@ async function buildIndex() {
</div>
</div>
</section></div>
<section class="m-auto container py-20 m-5">
<section class="m-auto container py-20 m-5 uppercase">
${mainIndex}
</section>
</body>
Expand Down

0 comments on commit 27c9f65

Please sign in to comment.