fun improvements #1
@@ -1,6 +1,7 @@
|
|||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import RSSIcon from "./rss-icon";
|
import RSSIcon from "./rss-icon";
|
||||||
|
import ReadingProgress from "./reading-progress";
|
||||||
|
|
||||||
const CloseIcon = () => (
|
const CloseIcon = () => (
|
||||||
<svg
|
<svg
|
||||||
@@ -45,18 +46,21 @@ interface WindowProps {
|
|||||||
title: string;
|
title: string;
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
className?: string;
|
className?: string;
|
||||||
|
showProgress?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function Window({
|
export default function Window({
|
||||||
title,
|
title,
|
||||||
children,
|
children,
|
||||||
className = "",
|
className = "",
|
||||||
|
showProgress = false,
|
||||||
}: WindowProps) {
|
}: WindowProps) {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={`rounded-lg border border-white/30 bg-white/70 shadow-window backdrop-blur-xl ${className}`}
|
className={`rounded-lg border border-white/30 bg-white/70 shadow-window backdrop-blur-xl ${className}`}
|
||||||
>
|
>
|
||||||
<div className="flex select-none items-center justify-between rounded-t-md bg-gradient-to-b from-blue-500 to-window-title px-4 py-1.5 font-bold text-white text-sm">
|
<div className="rounded-t-md overflow-hidden">
|
||||||
|
<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">
|
<Link href="/feed.xml" title="RSS Feed">
|
||||||
@@ -78,6 +82,8 @@ export default function Window({
|
|||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{showProgress && <ReadingProgress />}
|
||||||
|
</div>
|
||||||
<div className="p-6">{children}</div>
|
<div className="p-6">{children}</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user