a tool for shared writing and social publishing
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

styling pub page

celine c0b97b4a cda76a90

+51 -32
+1
app/lish/[handle]/[publication]/dashboard/PublishedPostsLists.tsx
··· 34 34 <Fragment key={doc.documents?.uri}> 35 35 <div className="flex w-full "> 36 36 <Link 37 + target="_blank" 37 38 href={`/lish/${params.handle}/${params.publication}/${uri.rkey}`} 38 39 className="publishedPost grow flex flex-col hover:!no-underline" 39 40 >
+49 -32
app/lish/[handle]/[publication]/page.tsx
··· 50 50 try { 51 51 return ( 52 52 <ThemeProvider entityID={null}> 53 - <div>publication index page </div> 54 - {publication.documents_in_publications 55 - .filter((d) => !!d?.documents) 56 - .sort((a, b) => { 57 - let aRecord = a.documents?.data! as PubLeafletDocument.Record; 58 - let bRecord = a.documents?.data! as PubLeafletDocument.Record; 59 - const aDate = aRecord.publishedAt 60 - ? new Date(aRecord.publishedAt) 61 - : new Date(0); 62 - const bDate = bRecord.publishedAt 63 - ? new Date(bRecord.publishedAt) 64 - : new Date(0); 65 - return bDate.getTime() - aDate.getTime(); // Sort by most recent first 66 - }) 67 - .map((doc) => { 68 - if (!doc.documents) return null; 69 - let uri = new AtUri(doc.documents.uri); 70 - let record = doc.documents.data as PubLeafletDocument.Record; 71 - return ( 72 - <React.Fragment key={doc.documents?.uri}> 73 - <div className="flex w-full "> 74 - <Link 75 - href={`/lish/${params.handle}/${params.publication}/${uri.rkey}`} 76 - className="publishedPost grow flex flex-col gap-2 hover:!no-underline" 77 - > 78 - <h3 className="text-primary">{record.title}</h3> 79 - </Link> 80 - </div> 81 - <hr className="last:hidden border-border-light" /> 82 - </React.Fragment> 83 - ); 84 - })} 53 + <div className="publicationWrapper w-screen h-screen flex place-items-center bg-bg-leaflet"> 54 + <div className="publication max-w-prose w-full mx-auto h-full pt-9"> 55 + <div className="flex flex-col pb-6 w-full text-center justify-center "> 56 + <h2 className="text-accent-contrast">{publication.name}</h2> 57 + <p className="text-lg text-tertiary"> 58 + Here is a placeholder description 59 + </p> 60 + </div> 61 + <div className="publicationPostList w-full flex flex-col gap-4 pb-6"> 62 + {publication.documents_in_publications 63 + .filter((d) => !!d?.documents) 64 + .sort((a, b) => { 65 + let aRecord = a.documents?.data! as PubLeafletDocument.Record; 66 + let bRecord = a.documents?.data! as PubLeafletDocument.Record; 67 + const aDate = aRecord.publishedAt 68 + ? new Date(aRecord.publishedAt) 69 + : new Date(0); 70 + const bDate = bRecord.publishedAt 71 + ? new Date(bRecord.publishedAt) 72 + : new Date(0); 73 + return bDate.getTime() - aDate.getTime(); // Sort by most recent first 74 + }) 75 + .map((doc) => { 76 + if (!doc.documents) return null; 77 + let uri = new AtUri(doc.documents.uri); 78 + let record = doc.documents.data as PubLeafletDocument.Record; 79 + return ( 80 + <React.Fragment key={doc.documents?.uri}> 81 + <div className="flex w-full "> 82 + <Link 83 + href={`/lish/${params.handle}/${params.publication}/${uri.rkey}`} 84 + className="publishedPost grow flex flex-col gap-2 hover:!no-underline" 85 + > 86 + <h3 className="text-primary">{record.title}</h3> 87 + <p className="italic text-secondary"> 88 + This is a placeholder for description 89 + </p> 90 + <p className="text-sm text-tertiary pt-2"> 91 + {record.publishedAt} PlaceholderDate 92 + </p> 93 + </Link> 94 + </div> 95 + <hr className="last:hidden border-border-light" /> 96 + </React.Fragment> 97 + ); 98 + })} 99 + </div> 100 + </div> 101 + </div> 85 102 </ThemeProvider> 86 103 ); 87 104 } catch (e) {
+1
components/Pages/PublicationMetadata.tsx
··· 79 79 <p className="text-sm text-tertiary">Published XX/XX/XXX</p> 80 80 <Separator classname="h-4" /> 81 81 <Link 82 + target="_blank" 82 83 className="text-sm" 83 84 href={`/lish/${identity?.resolved_did?.alsoKnownAs?.[0].slice(5)}/${pub.publications.name}/${new AtUri(pub.doc).rkey}`} 84 85 >