feat: make RSS icon opt-in via showRss prop on Window
This commit is contained in:
@@ -25,7 +25,7 @@ export default function Home() {
|
|||||||
</header>
|
</header>
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
<Window title="Blog Posts">
|
<Window title="Blog Posts" showRss>
|
||||||
{allPostsData.length > 0 ? (
|
{allPostsData.length > 0 ? (
|
||||||
<ul className="space-y-4">
|
<ul className="space-y-4">
|
||||||
{allPostsData.map(({ id, date, title, wip }) => (
|
{allPostsData.map(({ id, date, title, wip }) => (
|
||||||
@@ -63,12 +63,6 @@ export default function Home() {
|
|||||||
)}
|
)}
|
||||||
</Window>
|
</Window>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section>
|
|
||||||
<Window title="About this site">
|
|
||||||
<Badges />
|
|
||||||
</Window>
|
|
||||||
</section>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ interface WindowProps {
|
|||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
className?: string;
|
className?: string;
|
||||||
showProgress?: boolean;
|
showProgress?: boolean;
|
||||||
|
showRss?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function Window({
|
export default function Window({
|
||||||
@@ -54,6 +55,7 @@ export default function Window({
|
|||||||
children,
|
children,
|
||||||
className = "",
|
className = "",
|
||||||
showProgress = false,
|
showProgress = false,
|
||||||
|
showRss = false,
|
||||||
}: WindowProps) {
|
}: WindowProps) {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
@@ -63,9 +65,11 @@ export default function Window({
|
|||||||
<div className="flex select-none items-center justify-between bg-gradient-to-b from-blue-500 to-window-title px-4 py-1.5 font-bold text-white text-sm">
|
<div className="flex select-none items-center justify-between bg-gradient-to-b from-blue-500 to-window-title px-4 py-1.5 font-bold text-white text-sm">
|
||||||
<div className="flex items-center space-x-2">
|
<div className="flex items-center space-x-2">
|
||||||
<span>{title}</span>
|
<span>{title}</span>
|
||||||
<Link href="/feed.xml" title="RSS Feed">
|
{showRss && (
|
||||||
<RSSIcon className="h-4 w-4 opacity-80 hover:opacity-100" />
|
<Link href="/feed.xml" title="RSS Feed">
|
||||||
</Link>
|
<RSSIcon className="h-4 w-4 opacity-80 hover:opacity-100" />
|
||||||
|
</Link>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center space-x-2">
|
<div className="flex items-center space-x-2">
|
||||||
<div className="flex h-4 w-4 items-center justify-center opacity-80">
|
<div className="flex h-4 w-4 items-center justify-center opacity-80">
|
||||||
|
|||||||
Reference in New Issue
Block a user