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:
+18
-11
@@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user