Add programming-resources; swi->generic Nintendo;

Remove custom html from markdown, clean-up UI (again)

Signed-off-by: Paul W. <lambdapaul@protonmail.com>
This commit is contained in:
2024-02-13 18:01:07 -05:00
parent 366f09864f
commit fece0bc86c
28 changed files with 392 additions and 304 deletions
+18 -11
View File
@@ -2,22 +2,29 @@ import Link from "next/link";
import NotesInfo from '../public/notes.json';
function RecentNotes() {
const notes = Object.entries(NotesInfo);
const notes = Object.entries(NotesInfo).reverse();
return (
<div className='block'>
<div className='h2'>Recent Notes</div>
{notes?.slice(0, 10)
.map(([slug, note]: any) => {
return <Link key={slug} href={`/notes/${slug}`} className={`button link`}>{note.title}</Link>
<ul className='block'>
<h2>Recent Notes</h2>
{notes?.slice(0, 5)
.map(([slug, note]: any, i: number) => {
return (
<li
key={i}
>
<Link
href={`/notes/${slug}`}>
{note.title}
</Link>
</li>
);
})
}
{
notes.length > 10 &&
<div>
<Link href='/notes' className='h5'>More...</Link>
</div>
notes.length > 5 &&
<Link href='/notes'>More...</Link>
}
</div>
</ul>
);
}