Remove latest articles section from right sidebar
This commit is contained in:
@@ -2,11 +2,10 @@ import Link from 'next/link';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import { faGithub, faMastodon, faLinkedin } from '@fortawesome/free-brands-svg-icons';
|
||||
import { siteConfig } from '@/lib/config';
|
||||
import { getAllPostsSorted, getAllTagsWithCount } from '@/lib/posts';
|
||||
import { getAllTagsWithCount } from '@/lib/posts';
|
||||
import { allPages } from 'contentlayer/generated';
|
||||
|
||||
export function RightSidebar() {
|
||||
const latest = getAllPostsSorted().slice(0, 5);
|
||||
const tags = getAllTagsWithCount().slice(0, 5);
|
||||
|
||||
const aboutPage =
|
||||
@@ -87,24 +86,6 @@ export function RightSidebar() {
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section className="rounded-xl border bg-white px-4 py-3 text-sm shadow-sm dark:border-slate-800 dark:bg-slate-900 dark:text-slate-100">
|
||||
<h2 className="text-xs font-semibold uppercase tracking-wide text-slate-500 dark:text-slate-400">
|
||||
最新文章
|
||||
</h2>
|
||||
<ul className="mt-2 space-y-1">
|
||||
{latest.map((post) => (
|
||||
<li key={post._id}>
|
||||
<Link
|
||||
href={post.url}
|
||||
className="line-clamp-2 text-xs text-slate-700 hover:text-blue-600 dark:text-slate-100 dark:hover:text-blue-400"
|
||||
>
|
||||
{post.title}
|
||||
</Link>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
{tags.length > 0 && (
|
||||
<section className="rounded-xl border bg-white px-4 py-3 text-sm shadow-sm dark:border-slate-800 dark:bg-slate-900 dark:text-slate-100">
|
||||
<h2 className="text-xs font-semibold uppercase tracking-wide text-slate-500 dark:text-slate-400">
|
||||
|
||||
Reference in New Issue
Block a user