a tool for shared writing and social publishing
0
fork

Configure Feed

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

some pageheader color and spacing fixes as well as getting share button to work in reader

celine 4687513d 872c2d0c

+27 -23
+16 -14
app/reader/ReaderContent.tsx
··· 110 110 `} 111 111 > 112 112 <SpeedyLink 113 - className="h-full w-full absolute top-0 left-0" 113 + className="h-full w-full absolute top-0 left-0 z-0" 114 114 href={`${props.publication.href}/${postUri.rkey}`} 115 115 /> 116 116 <div 117 - className={`${showPageBackground ? "bg-bg-page " : "bg-transparent"} rounded-md w-full px-[10px] pt-2 pb-2`} 117 + className={`${showPageBackground ? "bg-bg-page " : "bg-transparent"} rounded-md w-full px-[10px] pt-2 pb-2 z-1 pointer-events-none`} 118 118 style={{ 119 119 backgroundColor: showPageBackground 120 120 ? "rgba(var(--bg-page), var(--bg-page-alpha))" 121 121 : "transparent", 122 122 }} 123 123 > 124 - <div className="flex justify-between gap-2"> 125 - <button className="text-tertiary">{/*<ShareSmall />*/}</button> 126 - </div> 127 124 <h3 className="text-primary truncate">{postRecord.title}</h3> 128 125 129 126 <p className="text-secondary">{postRecord.description}</p> ··· 142 139 </div> 143 140 144 141 <PostInterations 145 - postUrl={`props.publication.href}/${postUri.rkey}`} 142 + postUrl={`${props.publication.href}/${postUri.rkey}`} 146 143 quotesCount={quotes} 147 144 commentsCount={comments} 148 145 showComments={pubRecord.preferences?.showComments} ··· 163 160 <SpeedyLink 164 161 href={props.href} 165 162 className="text-accent-contrast font-bold no-underline text-sm flex gap-1 items-center md:w-fit w-full relative shrink-0" 163 + style={{ pointerEvents: "all" }} 166 164 > 167 165 <PubIcon small record={props.pubRecord} uri={props.uri} /> 168 166 {props.pubRecord.name} ··· 214 212 )} 215 213 <Separator classname="h-4 !min-h-0" /> 216 214 <button 217 - id="copy-post-link" 215 + id={`copy-post-link-${props.postUrl}`} 218 216 className="flex gap-1 items-center hover:font-bold px-1" 219 - onClick={() => { 220 - let rect = document 221 - .getElementById("copy-post-link") 222 - ?.getBoundingClientRect(); 217 + style={{ pointerEvents: "all" }} 218 + onClick={(e) => { 219 + e.stopPropagation(); 220 + e.preventDefault(); 221 + console.log("copied"); 222 + let mouseX = e.clientX; 223 + let mouseY = e.clientY; 224 + 223 225 if (!props.postUrl) return; 224 226 navigator.clipboard.writeText(props.postUrl); 225 227 226 228 smoker({ 227 - text: <strong>Copied Link</strong>, 229 + text: <strong>Copied Link!</strong>, 228 230 position: { 229 - y: rect ? rect.top : 0, 230 - x: rect ? rect.right + 5 : 0, 231 + y: mouseY, 232 + x: mouseX, 231 233 }, 232 234 }); 233 235 }}
+3 -3
app/reader/page.tsx
··· 164 164 id="reader" 165 165 cardBorderHidden={false} 166 166 currentPage="reader" 167 - defaultTab="reader" 167 + defaultTab="Read" 168 168 actions={null} 169 169 tabs={{ 170 - reader: { 170 + Read: { 171 171 controls: null, 172 172 content: ( 173 173 <ReaderContent ··· 176 176 /> 177 177 ), 178 178 }, 179 - subscriptions: { 179 + Subscriptions: { 180 180 controls: null, 181 181 content: ( 182 182 <SubscriptionsContent publications={subbedPublications} />
+8 -6
components/PageHeader.tsx
··· 54 54 style={ 55 55 scrollPos < 20 56 56 ? { 57 - backgroundColor: `rgba(${headerBGColor}, ${scrollPos / 60 + 0.75})`, 57 + backgroundColor: props.cardBorderHidden 58 + ? `rgba(${headerBGColor}, ${scrollPos / 60 + 0.75})` 59 + : `rgba(${headerBGColor}, ${scrollPos / 20})`, 58 60 paddingLeft: props.cardBorderHidden 59 - ? `calc(${scrollPos / 20}*8px)` 60 - : "8px", 61 + ? "4px" 62 + : `calc(${scrollPos / 20}*4px)`, 61 63 paddingRight: props.cardBorderHidden 62 - ? `calc(${scrollPos / 20}*8px)` 63 - : "8px", 64 + ? "8px" 65 + : `calc(${scrollPos / 20}*8px)`, 64 66 } 65 67 : { 66 68 backgroundColor: `rgb(${headerBGColor})`, 67 - paddingLeft: "8px", 69 + paddingLeft: "4px", 68 70 paddingRight: "8px", 69 71 } 70 72 }