Skip to content

Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.

add new design to document list and detail

Marc Seitz80dcf306e95b
diff --git a/components/Sidebar.tsx b/components/Sidebar.tsx
index b7184fb7..55b0f5d1 100644
--- a/components/Sidebar.tsx
+++ b/components/Sidebar.tsx
@@ -138,7 +138,7 @@ export default function Sidebar({ children }: { children: React.ReactNode }) {
{/* Static sidebar for desktop */}
<div className="hidden lg:fixed lg:inset-y-0 lg:z-50 lg:flex lg:w-72 lg:flex-col">
{/* Sidebar component, swap this element with another sidebar if you like */}
- <div className="flex grow flex-col gap-y-5 overflow-y-auto bg-black/10 px-6 ring-1 ring-white/5">
+ <div className="flex grow flex-col gap-y-5 overflow-y-auto bg-black/10 px-6">
<div className="flex h-16 shrink-0 items-center">
<p className="text-2xl font-bold tracking-tighter text-white">
Papermark
diff --git a/pages/documents/[id].tsx b/pages/documents/[id].tsx
index 3dcc1bba..3e481248 100644
--- a/pages/documents/[id].tsx
+++ b/pages/documents/[id].tsx
@@ -5,7 +5,6 @@ import { useDocument } from "@/lib/swr/use-document";
import ErrorPage from "next/error";
import LinksContainer from "@/components/links/links-container";
import StatsCard from "@/components/documents/stats-card";
-import BarChartComponent from "@/components/charts/bar-chart";
import StatsChart from "@/components/documents/stats-chart";
export default function DocumentPage() {
@@ -17,9 +16,10 @@ export default function DocumentPage() {
return (
<>
- <div>
- <Sidebar>
- <main>
+ <div className="flex flex-col lg:flex-row min-h-screen bg-gradient-to-tl from-black to-gray-950">
+ <Sidebar></Sidebar>
+ <main className="lg:m-2 grow w-full bg-gray-900 shadow rounded-xl">
+ <div className="">
{document ? (
<>
<header>
@@ -64,8 +64,8 @@ export default function DocumentPage() {
) : (
<div>Loading...</div>
)}
- </main>
- </Sidebar>
+ </div>
+ </main>
</div>
</>
);
diff --git a/pages/documents/index.tsx b/pages/documents/index.tsx
index 39d53a05..ed8a9d5b 100644
--- a/pages/documents/index.tsx
+++ b/pages/documents/index.tsx
@@ -11,64 +11,58 @@ export default function Documents() {
return (
<>
- <div>
- <Sidebar>
- <main className="h-fit">
- <div className="border-b border-white/5 px-4 py-5 sm:px-6 lg:px-8">
- <div className="-ml-4 -mt-2 flex flex-wrap items-center justify-between sm:flex-nowrap">
- <div className="ml-4 mt-2">
- <h3 className="text-base font-semibold leading-6 text-white">
- My Documents
- </h3>
- </div>
- {documents && documents.length !== 0 && (
- <div className="ml-4 mt-2 flex-shrink-0">
- <AddDocumentModal>
- <button
- type="button"
- className="inline-flex items-center px-4 py-2 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"
- >
- <PlusIcon
- className="-ml-1 mr-2 h-5 w-5"
- aria-hidden="true"
- />
- New Document
- </button>
- </AddDocumentModal>
- </div>
- )}
+ <div className="flex flex-col lg:flex-row min-h-screen bg-gradient-to-tl from-black to-gray-950">
+ <Sidebar></Sidebar>
+ <main className="lg:m-2 grow w-full bg-gray-900 shadow rounded-xl">
+ <div className="border-b border-white/5 px-4 py-5 sm:px-6 lg:px-8">
+ <div className="-ml-4 -mt-2 flex flex-wrap items-center justify-between sm:flex-nowrap">
+ <div className="ml-4 mt-2">
+ <h3 className="text-base font-semibold leading-6 text-white">
+ My Documents
+ </h3>
</div>
+ {documents && documents.length !== 0 && (
+ <div className="ml-4 mt-2 flex-shrink-0">
+ <AddDocumentModal>
+ <button
+ type="button"
+ className="inline-flex items-center px-4 py-2 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"
+ >
+ <PlusIcon
+ className="-ml-1 mr-2 h-5 w-5"
+ aria-hidden="true"
+ />
+ New Document
+ </button>
+ </AddDocumentModal>
+ </div>
+ )}
</div>
+ </div>
- {documents && documents.length === 0 && (
- <div className="flex items-center justify-center h-96">
- <EmptyDocuments />
- </div>
- )}
+ {documents && documents.length === 0 && (
+ <div className="flex items-center justify-center h-96">
+ <EmptyDocuments />
+ </div>
+ )}
- {/* Documents list */}
- <ul
- role="list"
- className="divide-y divide-white/5 overflow-y-hidden"
- >
- {documents
- ? documents.map((document) => {
- return (
- <DocumentCard key={document.id} document={document} />
- );
- })
- : Array.from({ length: 3 }).map((_, i) => (
- <li
- key={i}
- className="flex flex-col space-y-4 px-4 py-4 sm:px-6 lg:px-8"
- >
- <Skeleton key={i} className="h-5 w-20" />
- <Skeleton key={i} className="mt-3 h-3 w-10" />
- </li>
- ))}
- </ul>
- </main>
- </Sidebar>
+ {/* Documents list */}
+ <ul role="list" className="divide-y divide-white/5 overflow-y-hidden">
+ {documents
+ ? documents.map((document) => {
+ return <DocumentCard key={document.id} document={document} />;
+ })
+ : Array.from({ length: 3 }).map((_, i) => (
+ <li
+ key={i}
+ className="flex flex-col space-y-4 px-4 py-4 sm:px-6 lg:px-8"
+ >
+ <Skeleton key={i} className="h-5 w-20" />
+ <Skeleton key={i} className="mt-3 h-3 w-10" />
+ </li>
+ ))}
+ </ul>
+ </main>
</div>
</>
);