fun improvements (#1)
Some checks failed
Build and Deploy Blog / build-and-deploy-local (push) Failing after 11s

Reviewed-on: #1
This commit was merged in pull request #1.
This commit is contained in:
2026-03-31 00:50:16 +00:00
parent 902521e1f3
commit 1ba5ee1b41
13 changed files with 424 additions and 66 deletions

View File

@@ -1,6 +1,7 @@
import Link from "next/link";
import React from "react";
import RSSIcon from "./rss-icon";
import ReadingProgress from "./reading-progress";
const CloseIcon = () => (
<svg
@@ -45,38 +46,47 @@ interface WindowProps {
title: string;
children: React.ReactNode;
className?: string;
showProgress?: boolean;
showRss?: boolean;
}
export default function Window({
title,
children,
className = "",
showProgress = false,
showRss = false,
}: WindowProps) {
return (
<div
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="flex items-center space-x-2">
<span>{title}</span>
<Link href="/feed.xml" title="RSS Feed">
<RSSIcon className="h-4 w-4 opacity-80 hover:opacity-100" />
</Link>
</div>
<div className="flex items-center space-x-2">
<div className="flex h-4 w-4 items-center justify-center opacity-80">
<MinimizeIcon />
<div className="rounded-t-md overflow-hidden sticky top-0 z-10">
<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">
<span>{title}</span>
{showRss && (
<Link href="/feed.xml" title="RSS Feed">
<RSSIcon className="h-4 w-4 opacity-80 hover:opacity-100" />
</Link>
)}
</div>
<div className="flex h-4 w-4 items-center justify-center opacity-80">
<MaximizeIcon />
<div className="flex items-center space-x-2">
<div className="flex h-4 w-4 items-center justify-center opacity-80">
<MinimizeIcon />
</div>
<div className="flex h-4 w-4 items-center justify-center opacity-80">
<MaximizeIcon />
</div>
<Link
href="/"
className="flex h-4 w-4 items-center justify-center opacity-80"
>
<CloseIcon />
</Link>
</div>
<Link
href="/"
className="flex h-4 w-4 items-center justify-center opacity-80"
>
<CloseIcon />
</Link>
</div>
{showProgress && <ReadingProgress />}
</div>
<div className="p-6">{children}</div>
</div>