a tool for shared writing and social publishing
0
fork

Configure Feed

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

wip add icon and start styling publication

+26 -17
+18 -12
app/home/Publications.tsx
··· 27 27 </div> 28 28 ); 29 29 return ( 30 - <div className="w-full flex flex-col gap-2"> 30 + <div className="w-full flex flex-col gap-2 container mx-8 mt-8"> 31 31 <PublicationList publications={identity.publications} /> 32 32 <Link 33 33 href={"./lish/createPub"} ··· 50 50 let { identity } = useIdentityData(); 51 51 52 52 return ( 53 - <div className="w-full flex flex-col gap-2"> 53 + <div className="w-full grid auto-rows-max p-4"> 54 54 {props.publications?.map((d) => ( 55 - <div 55 + <Publication 56 + {...d} 56 57 key={d.uri} 57 - className={`pubPostListItem flex hover:no-underline justify-between items-center`} 58 - > 59 - <Link 60 - className="justify-self-start font-bold hover:no-underline" 61 - href={`/lish/${identity?.resolved_did?.alsoKnownAs?.[0].slice(5)}/${d.name}/`} 62 - > 63 - <div key={d.uri}>{d.name}</div> 64 - </Link> 65 - </div> 58 + handle={identity?.resolved_did?.alsoKnownAs?.[0].slice(5)!} 59 + /> 66 60 ))} 67 61 </div> 68 62 ); 69 63 }; 64 + 65 + function Publication(props: { uri: string; name: string; handle: string }) { 66 + return ( 67 + <Link 68 + className="p-3 rounded-lg bg-bg-page flex flex-col gap-1 text-primary justify-center w-min" 69 + href={`/lish/${props.handle}/${props.name}/`} 70 + > 71 + <div className="w-8 h-8 rounded-full bg-test" /> 72 + <div className="text-lg font-bold">{props.name}</div> 73 + </Link> 74 + ); 75 + }
+1 -1
app/lish/createPub/CreatePubForm.tsx
··· 26 26 await createPublication({ 27 27 name: nameValue, 28 28 description: descriptionValue, 29 - logoFile, 29 + iconFile: logoFile, 30 30 }); 31 31 router.push( 32 32 `/lish/${identity?.resolved_did?.alsoKnownAs?.[0].slice(5)}/${nameValue}/`,
+2 -4
app/lish/createPub/createPublication.ts
··· 9 9 export async function createPublication({ 10 10 name, 11 11 description, 12 - logoFile, 12 + iconFile, 13 13 }: { 14 14 name: string; 15 15 description: string; 16 - logoFile: File | null; 16 + iconFile: File | null; 17 17 }) { 18 - console.log(logoFile); 19 - return; 20 18 const oauthClient = await createOauthClient(); 21 19 let identity = await getIdentityData(); 22 20 if (!identity || !identity.atp_did) return;
+5
lexicons/api/lexicons.ts
··· 101 101 type: 'string', 102 102 maxLength: 2000, 103 103 }, 104 + icon: { 105 + type: 'blob', 106 + accept: ['image/*'], 107 + maxSize: 1000000, 108 + }, 104 109 }, 105 110 }, 106 111 },