126 | {!!likeCount && (
127 |
128 |
140 |
{prettyNumber(likeCount)}
141 |
142 | )}
143 | {!!repostCount && (
144 |
145 |
157 |
{prettyNumber(repostCount)}
158 |
159 | )}
160 |
161 |
173 |
Reply
174 |
175 |
176 |
177 | {replyCount
178 | ? `Read ${prettyNumber(replyCount)} ${
179 | replyCount > 1 ? "replies" : "reply"
180 | } on Bluesky`
181 | : "View on Bluesky"}
182 |
183 |
184 | View on Bluesky
185 |
186 |
187 | );
188 | }
189 |
--------------------------------------------------------------------------------
/packages/core/src/components/Embed/embed.module.css:
--------------------------------------------------------------------------------
1 | .record {
2 | width: 100%;
3 | border: var(--post-border);
4 | border-radius: 0.5rem;
5 | padding: 0.5rem;
6 | transition-property: color, background-color, border-color,
7 | text-decoration-color, fill, stroke;
8 | transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
9 | transition-duration: 150ms;
10 | display: flex;
11 | flex-direction: column;
12 | gap: 0.375rem;
13 | background-color: var(--post-bg-color);
14 | }
15 | .record:hover {
16 | background-color: var(--post-bg-color-hover);
17 | }
18 |
19 | .recordHeader {
20 | width: 100%;
21 | display: flex;
22 | align-items: center;
23 | gap: 0.375rem;
24 | }
25 |
26 | .recordAvatar {
27 | width: 1rem;
28 | height: 1rem;
29 | min-width: 1rem;
30 | min-height: 1rem;
31 | overflow: hidden;
32 | border-radius: 9999px;
33 | flex-shrink: 0;
34 | background-color: var(--post-bg-color-hover);
35 | }
36 |
37 | .recordAvatarImg {
38 | filter: blur(0.094rem);
39 | }
40 |
41 | .recordAuthor {
42 | font-size: 0.875rem;
43 | line-height: 1.25rem;
44 | overflow: hidden;
45 | display: -webkit-box;
46 | -webkit-box-orient: vertical;
47 | -webkit-line-clamp: 1;
48 | }
49 |
50 | .recordAuthorDisplayName {
51 | font-weight: 700;
52 | }
53 |
54 | .recordAuthorHandle {
55 | color: var(--post-font-color-secondary);
56 | margin-left: 0.25rem;
57 | }
58 |
59 | .recordText {
60 | font-size: 0.875rem;
61 | line-height: 1.25rem;
62 | }
63 |
64 | .recordMedia {
65 | display: flex;
66 | flex-direction: column;
67 | gap: 0.5rem;
68 | }
69 |
70 | .info {
71 | width: 100%;
72 | border-radius: 0.5rem;
73 | border: var(--post-border);
74 | padding-top: 0.5rem;
75 | padding-bottom: 0.5rem;
76 | padding-left: 0.625rem;
77 | padding-right: 0.625rem;
78 | display: flex;
79 | gap: 0.5rem;
80 | background-color: var(--post-bg-color-hover);
81 | }
82 |
83 | .infoIcon {
84 | width: 1rem;
85 | height: 1rem;
86 | min-width: 1rem;
87 | min-height: 1rem;
88 | flex-shrink: 0;
89 | margin-top: 0.125rem;
90 | fill: var(--post-font-color);
91 | }
92 |
93 | .infoText {
94 | font-size: 0.875rem;
95 | line-height: 1.25rem;
96 | color: var(--post-font-color-secondary);
97 | }
98 |
99 | .singleImage {
100 | width: 100%;
101 | border-radius: 0.5rem;
102 | overflow: hidden;
103 | object-fit: cover;
104 | height: auto;
105 | max-height: 1000px;
106 | }
107 |
108 | .imagesContainer {
109 | width: 100%;
110 | aspect-ratio: 2/1;
111 | border-radius: 0.5rem;
112 | display: flex;
113 | gap: 0.25rem;
114 | overflow: hidden;
115 | }
116 |
117 | .doubleImagesImg {
118 | width: 50%;
119 | height: 100%;
120 | object-fit: cover;
121 | border-radius: 0.125rem;
122 | }
123 |
124 | .threeImagesLargeImg {
125 | flex: 3;
126 | object-fit: cover;
127 | border-radius: 0.125rem;
128 | }
129 |
130 | .threeImagesRemainingImagesContainer {
131 | flex: 2;
132 | display: flex;
133 | flex-direction: column;
134 | gap: 0.25rem;
135 | }
136 |
137 | .threeImagesRemainingImages {
138 | width: 100%;
139 | height: 100%;
140 | object-fit: cover;
141 | border-radius: 0.125rem;
142 | }
143 |
144 | .fourImagesContainer {
145 | width: 100%;
146 | display: grid;
147 | grid-template-columns: repeat(2, minmax(0, 1fr));
148 | gap: 0.25rem;
149 | border-radius: 0.5rem;
150 | overflow: hidden;
151 | }
152 |
153 | .fourImagesImg {
154 | aspect-ratio: 1 / 1;
155 | width: 100%;
156 | object-fit: cover;
157 | border-radius: 0.125rem;
158 | }
159 |
160 | .external {
161 | width: 100%;
162 | border-radius: 0.5rem;
163 | overflow: hidden;
164 | border: var(--post-border);
165 | display: flex;
166 | flex-direction: column;
167 | align-items: stretch;
168 | }
169 |
170 | .externalThumbnail {
171 | aspect-ratio: 1.91 / 1;
172 | object-fit: cover;
173 | }
174 |
175 | .externalContent {
176 | padding-top: 0.75rem;
177 | padding-bottom: 0.75rem;
178 | padding-left: 1rem;
179 | padding-right: 1rem;
180 | }
181 |
182 | .externalDomain {
183 | font-size: 0.875rem;
184 | line-height: 1.25rem;
185 | color: var(--post-font-color-secondary);
186 | overflow: hidden;
187 | display: -webkit-box;
188 | -webkit-box-orient: vertical;
189 | -webkit-line-clamp: 1;
190 | }
191 |
192 | .externalTitle {
193 | font-weight: 600;
194 | overflow: hidden;
195 | display: -webkit-box;
196 | -webkit-box-orient: vertical;
197 | -webkit-line-clamp: 3;
198 | }
199 |
200 | .externalDescription {
201 | font-size: 0.875rem;
202 | line-height: 1.25rem;
203 | color: var(--post-font-color-secondary);
204 | overflow: hidden;
205 | display: -webkit-box;
206 | -webkit-box-orient: vertical;
207 | -webkit-line-clamp: 2;
208 | margin-top: 0.125rem;
209 | }
210 |
211 | .generic {
212 | width: 100%;
213 | border-radius: 0.5rem;
214 | border: var(--post-border);
215 | padding-top: 0.5rem;
216 | padding-bottom: 0.5rem;
217 | padding-left: 0.75rem;
218 | padding-right: 0.75rem;
219 | display: flex;
220 | flex-direction: column;
221 | gap: 0.5rem;
222 | }
223 |
224 | .genericHeader {
225 | display: flex;
226 | gap: 0.625rem;
227 | align-items: center;
228 | }
229 |
230 | .genericImage {
231 | width: 2rem;
232 | height: 2rem;
233 | min-width: 2rem;
234 | min-height: 2rem;
235 | border-radius: 0.375rem;
236 | flex-shrink: 0;
237 | }
238 |
239 | .genericImageImg {
240 | background-color: var(--post-bg-color-hover);
241 | }
242 |
243 | .genericImagePlaceholder {
244 | background-color: var(--post-color-blue-primary);
245 | }
246 |
247 | .genericTitleAndDescription {
248 | flex: 1 1 0%;
249 | font-size: 0.875rem;
250 | line-height: 1.25rem;
251 | }
252 |
253 | .genericTitle {
254 | font-weight: 700;
255 | }
256 |
257 | .genericDescription {
258 | color: var(--post-font-color-secondary);
259 | }
260 |
261 | .genericText {
262 | color: var(--post-font-color-secondary);
263 | font-size: 0.875rem;
264 | line-height: 1.25rem;
265 | }
266 |
267 | .videoEmbed {
268 | width: 100%;
269 | overflow: hidden;
270 | border-radius: 0.5rem;
271 | aspect-ratio: 1 / 1;
272 | position: relative;
273 | }
274 |
275 | .videoEmbedThumbnail {
276 | object-fit: cover;
277 | width: 100%;
278 | height: 100%;
279 | }
280 |
281 | .videoEmbedIconBg {
282 | width: 6rem;
283 | height: 6rem;
284 | position: absolute;
285 | top: 50%;
286 | left: 50%;
287 | --tw-translate-x: -50%;
288 | --tw-translate-y: -50%;
289 | transform: translate(var(--tw-translate-x), var(--tw-translate-y))
290 | rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y))
291 | scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
292 | border-radius: 9999px;
293 | background-color: rgb(0 0 0 / 0.5);
294 | display: flex;
295 | align-items: center;
296 | justify-content: center;
297 | }
298 |
299 | .videoEmbedIcon {
300 | object-fit: cover;
301 | width: 60%;
302 | height: 60%;
303 | }
304 |
305 | .starterPack {
306 | width: 100%;
307 | border-radius: 0.5rem;
308 | overflow: hidden;
309 | border: var(--post-border);
310 | display: flex;
311 | flex-direction: column;
312 | align-items: stretch;
313 | }
314 |
315 | .starterPackImage {
316 | aspect-ratio: 1.91 / 1;
317 | object-fit: cover;
318 | }
319 |
320 | .starterPackContent {
321 | padding-top: 0.75rem;
322 | padding-bottom: 0.75rem;
323 | padding-left: 1rem;
324 | padding-right: 1rem;
325 | }
326 |
327 | .starterPackContentHeader {
328 | display: flex;
329 | gap: 0.5rem;
330 | align-items: center;
331 | }
332 |
333 | .starterPackIcon {
334 | width: 2.5rem;
335 | height: 2.5rem;
336 | min-width: 2.5rem;
337 | min-height: 2.5rem;
338 | }
339 |
340 | .starterPackName {
341 | font-size: 1rem;
342 | line-height: 1.313rem;
343 | font-weight: 600;
344 | }
345 |
346 | .starterPackAuthor {
347 | font-size: 0.875rem;
348 | line-height: 1.125rem;
349 | color: var(--post-font-color-secondary);
350 | overflow: hidden;
351 | display: -webkit-box;
352 | -webkit-box-orient: vertical;
353 | -webkit-line-clamp: 2;
354 | }
355 |
356 | .starterPackDescription {
357 | font-size: 0.875rem;
358 | line-height: 1.25rem;
359 | margin-top: 0.25rem;
360 | }
361 |
362 | .starterPackJoined {
363 | font-size: 0.875rem;
364 | line-height: 1.25rem;
365 | font-weight: 600;
366 | color: var(--post-font-color-secondary);
367 | margin-top: 0.25rem;
368 | }
369 |
--------------------------------------------------------------------------------
/apps/docs/components/Navigation.tsx:
--------------------------------------------------------------------------------
1 | "use client";
2 | import { classNames } from "@rafty/ui";
3 | import { AnimatePresence, motion, useIsPresent } from "framer-motion";
4 | import Link from "next/link";
5 | import { usePathname } from "next/navigation";
6 | import {
7 | type HTMLAttributes,
8 | type LiHTMLAttributes,
9 | type PropsWithChildren,
10 | useRef,
11 | } from "react";
12 | import { useIsInsideMobileNavigation } from "../components/MobileNavigation";
13 | import { useSectionStore } from "../components/SectionProvider";
14 | import { Tag } from "../components/Tag";
15 | import { remToPx } from "../lib/remToPx";
16 |
17 | type NavGroupType = {
18 | title: string;
19 | links: {
20 | title: string;
21 | href: string;
22 | }[];
23 | };
24 |
25 | function useInitialValue