@commonpub/layer 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (436) hide show
  1. package/LICENSE +661 -0
  2. package/app.vue +7 -0
  3. package/components/AnnouncementBand.vue +117 -0
  4. package/components/AppToast.vue +108 -0
  5. package/components/AuthorCard.vue +119 -0
  6. package/components/AuthorRow.vue +81 -0
  7. package/components/CommentSection.vue +330 -0
  8. package/components/ContentCard.vue +340 -0
  9. package/components/ContentPicker.vue +240 -0
  10. package/components/ContentStarterForm.vue +214 -0
  11. package/components/ContentTypeBadge.vue +46 -0
  12. package/components/CountdownTimer.vue +68 -0
  13. package/components/CpubEditor.vue +87 -0
  14. package/components/DiscussionItem.vue +191 -0
  15. package/components/EditorPropertiesPanel.vue +393 -0
  16. package/components/EngagementBar.vue +131 -0
  17. package/components/FederatedContentCard.vue +291 -0
  18. package/components/FeedItem.vue +283 -0
  19. package/components/FilterChip.vue +21 -0
  20. package/components/HeatmapGrid.vue +92 -0
  21. package/components/ImageUpload.vue +219 -0
  22. package/components/MemberCard.vue +163 -0
  23. package/components/MessageThread.vue +120 -0
  24. package/components/NotificationItem.vue +103 -0
  25. package/components/ProgressTracker.vue +41 -0
  26. package/components/PublishErrorsModal.vue +116 -0
  27. package/components/RemoteActorCard.vue +206 -0
  28. package/components/RemoteUserSearch.vue +117 -0
  29. package/components/SearchFilters.vue +188 -0
  30. package/components/SearchSidebar.vue +181 -0
  31. package/components/SectionHeader.vue +17 -0
  32. package/components/ShareToHubModal.vue +189 -0
  33. package/components/SiteLogo.vue +21 -0
  34. package/components/SkillBar.vue +57 -0
  35. package/components/SortSelect.vue +30 -0
  36. package/components/StatBar.vue +14 -0
  37. package/components/TOCNav.vue +69 -0
  38. package/components/TimelineItem.vue +82 -0
  39. package/components/VideoCard.vue +106 -0
  40. package/components/blocks/BlockBuildStepView.vue +92 -0
  41. package/components/blocks/BlockCalloutView.vue +82 -0
  42. package/components/blocks/BlockCheckpointView.vue +50 -0
  43. package/components/blocks/BlockCodeView.vue +212 -0
  44. package/components/blocks/BlockContentRenderer.vue +143 -0
  45. package/components/blocks/BlockDividerView.vue +11 -0
  46. package/components/blocks/BlockDownloadsView.vue +126 -0
  47. package/components/blocks/BlockEmbedView.vue +61 -0
  48. package/components/blocks/BlockGalleryView.vue +57 -0
  49. package/components/blocks/BlockHeadingView.vue +29 -0
  50. package/components/blocks/BlockImageView.vue +34 -0
  51. package/components/blocks/BlockMarkdownView.vue +118 -0
  52. package/components/blocks/BlockMathView.vue +45 -0
  53. package/components/blocks/BlockPartsListView.vue +104 -0
  54. package/components/blocks/BlockQuizView.vue +239 -0
  55. package/components/blocks/BlockQuoteView.vue +41 -0
  56. package/components/blocks/BlockSectionHeaderView.vue +58 -0
  57. package/components/blocks/BlockSliderView.vue +236 -0
  58. package/components/blocks/BlockTextView.vue +41 -0
  59. package/components/blocks/BlockToolListView.vue +87 -0
  60. package/components/blocks/BlockVideoView.vue +89 -0
  61. package/components/editors/ArticleEditor.vue +545 -0
  62. package/components/editors/BlockCanvas.vue +487 -0
  63. package/components/editors/BlockInsertZone.vue +84 -0
  64. package/components/editors/BlockPicker.vue +285 -0
  65. package/components/editors/BlockWrapper.vue +192 -0
  66. package/components/editors/BlogEditor.vue +567 -0
  67. package/components/editors/EditorBlocks.vue +248 -0
  68. package/components/editors/EditorSection.vue +81 -0
  69. package/components/editors/EditorShell.vue +168 -0
  70. package/components/editors/EditorTagInput.vue +114 -0
  71. package/components/editors/EditorVisibility.vue +110 -0
  72. package/components/editors/ExplainerEditor.vue +503 -0
  73. package/components/editors/MarkdownImportDialog.vue +249 -0
  74. package/components/editors/ProjectEditor.vue +446 -0
  75. package/components/editors/blocks/BuildStepBlock.vue +102 -0
  76. package/components/editors/blocks/CalloutBlock.vue +122 -0
  77. package/components/editors/blocks/CheckpointBlock.vue +27 -0
  78. package/components/editors/blocks/CodeBlock.vue +177 -0
  79. package/components/editors/blocks/DividerBlock.vue +22 -0
  80. package/components/editors/blocks/DownloadsBlock.vue +41 -0
  81. package/components/editors/blocks/EmbedBlock.vue +20 -0
  82. package/components/editors/blocks/GalleryBlock.vue +236 -0
  83. package/components/editors/blocks/HeadingBlock.vue +96 -0
  84. package/components/editors/blocks/ImageBlock.vue +271 -0
  85. package/components/editors/blocks/MarkdownBlock.vue +258 -0
  86. package/components/editors/blocks/MathBlock.vue +37 -0
  87. package/components/editors/blocks/PartsListBlock.vue +358 -0
  88. package/components/editors/blocks/QuizBlock.vue +47 -0
  89. package/components/editors/blocks/QuoteBlock.vue +101 -0
  90. package/components/editors/blocks/SectionHeaderBlock.vue +130 -0
  91. package/components/editors/blocks/SliderBlock.vue +318 -0
  92. package/components/editors/blocks/TextBlock.vue +201 -0
  93. package/components/editors/blocks/ToolListBlock.vue +70 -0
  94. package/components/editors/blocks/VideoBlock.vue +22 -0
  95. package/components/hub/HubDiscussions.vue +47 -0
  96. package/components/hub/HubFeed.vue +199 -0
  97. package/components/hub/HubHero.vue +185 -0
  98. package/components/hub/HubLayout.vue +103 -0
  99. package/components/hub/HubMembers.vue +40 -0
  100. package/components/hub/HubProducts.vue +93 -0
  101. package/components/hub/HubProjects.vue +207 -0
  102. package/components/hub/HubSidebar.vue +12 -0
  103. package/components/hub/HubSidebarCard.vue +35 -0
  104. package/components/views/ArticleView.vue +771 -0
  105. package/components/views/BlogView.vue +667 -0
  106. package/components/views/ExplainerView.vue +688 -0
  107. package/components/views/ProjectView.vue +1500 -0
  108. package/composables/useApiError.ts +39 -0
  109. package/composables/useAuth.ts +87 -0
  110. package/composables/useBlockEditor.ts +187 -0
  111. package/composables/useContentSave.ts +253 -0
  112. package/composables/useContentTypes.ts +37 -0
  113. package/composables/useEngagement.ts +196 -0
  114. package/composables/useFeatures.ts +33 -0
  115. package/composables/useFederation.ts +72 -0
  116. package/composables/useJsonLd.ts +183 -0
  117. package/composables/useMarkdownImport.ts +77 -0
  118. package/composables/useMirrorContent.ts +105 -0
  119. package/composables/useNotifications.ts +73 -0
  120. package/composables/usePublishValidation.ts +65 -0
  121. package/composables/useSanitize.ts +34 -0
  122. package/composables/useSiteName.ts +4 -0
  123. package/composables/useTheme.ts +34 -0
  124. package/composables/useToast.ts +35 -0
  125. package/error.vue +129 -0
  126. package/layouts/admin.vue +213 -0
  127. package/layouts/auth.vue +63 -0
  128. package/layouts/default.vue +269 -0
  129. package/layouts/editor.vue +129 -0
  130. package/middleware/auth.ts +6 -0
  131. package/nuxt.config.ts +83 -0
  132. package/package.json +59 -0
  133. package/pages/[type]/[slug]/edit.vue +676 -0
  134. package/pages/[type]/[slug]/index.vue +313 -0
  135. package/pages/[type]/index.vue +118 -0
  136. package/pages/about.vue +100 -0
  137. package/pages/admin/audit.vue +66 -0
  138. package/pages/admin/content.vue +116 -0
  139. package/pages/admin/federation.vue +446 -0
  140. package/pages/admin/index.vue +62 -0
  141. package/pages/admin/reports.vue +88 -0
  142. package/pages/admin/settings.vue +167 -0
  143. package/pages/admin/users.vue +145 -0
  144. package/pages/auth/forgot-password.vue +103 -0
  145. package/pages/auth/login.vue +216 -0
  146. package/pages/auth/oauth/authorize.vue +178 -0
  147. package/pages/auth/register.vue +246 -0
  148. package/pages/auth/reset-password.vue +124 -0
  149. package/pages/auth/verify-email.vue +80 -0
  150. package/pages/cert/[code].vue +154 -0
  151. package/pages/contests/[slug]/edit.vue +153 -0
  152. package/pages/contests/[slug]/index.vue +556 -0
  153. package/pages/contests/[slug]/judge.vue +160 -0
  154. package/pages/contests/create.vue +192 -0
  155. package/pages/contests/index.vue +69 -0
  156. package/pages/create.vue +219 -0
  157. package/pages/dashboard.vue +521 -0
  158. package/pages/docs/[siteSlug]/[...pagePath].vue +704 -0
  159. package/pages/docs/[siteSlug]/edit.vue +480 -0
  160. package/pages/docs/[siteSlug]/index.vue +380 -0
  161. package/pages/docs/create.vue +60 -0
  162. package/pages/docs/index.vue +181 -0
  163. package/pages/explore.vue +422 -0
  164. package/pages/federated-hubs/[id]/index.vue +385 -0
  165. package/pages/federated-hubs/[id]/posts/[postId].vue +309 -0
  166. package/pages/federation/index.vue +157 -0
  167. package/pages/federation/search.vue +43 -0
  168. package/pages/federation/users/[handle].vue +221 -0
  169. package/pages/feed.vue +135 -0
  170. package/pages/hubs/[slug]/index.vue +513 -0
  171. package/pages/hubs/[slug]/members.vue +134 -0
  172. package/pages/hubs/[slug]/posts/[postId].vue +352 -0
  173. package/pages/hubs/[slug]/settings.vue +254 -0
  174. package/pages/hubs/create.vue +201 -0
  175. package/pages/hubs/index.vue +207 -0
  176. package/pages/index.vue +1005 -0
  177. package/pages/learn/[slug]/[lessonSlug]/edit.vue +413 -0
  178. package/pages/learn/[slug]/[lessonSlug]/index.vue +438 -0
  179. package/pages/learn/[slug]/edit.vue +414 -0
  180. package/pages/learn/[slug]/index.vue +341 -0
  181. package/pages/learn/create.vue +71 -0
  182. package/pages/learn/index.vue +360 -0
  183. package/pages/messages/[conversationId].vue +113 -0
  184. package/pages/messages/index.vue +303 -0
  185. package/pages/mirror/[id].vue +115 -0
  186. package/pages/notifications.vue +91 -0
  187. package/pages/products/[slug].vue +128 -0
  188. package/pages/products/index.vue +122 -0
  189. package/pages/search.vue +692 -0
  190. package/pages/settings/account.vue +170 -0
  191. package/pages/settings/appearance.vue +80 -0
  192. package/pages/settings/index.vue +81 -0
  193. package/pages/settings/notifications.vue +68 -0
  194. package/pages/settings/profile.vue +838 -0
  195. package/pages/tags/[slug].vue +111 -0
  196. package/pages/tags/index.vue +73 -0
  197. package/pages/u/[username]/followers.vue +86 -0
  198. package/pages/u/[username]/following.vue +94 -0
  199. package/pages/u/[username]/index.vue +837 -0
  200. package/pages/videos/[id].vue +212 -0
  201. package/pages/videos/index.vue +327 -0
  202. package/pages/videos/submit.vue +112 -0
  203. package/plugins/auth.ts +23 -0
  204. package/server/api/admin/audit.get.ts +17 -0
  205. package/server/api/admin/content/[id].delete.ts +15 -0
  206. package/server/api/admin/content/[id].patch.ts +37 -0
  207. package/server/api/admin/federation/activity.get.ts +31 -0
  208. package/server/api/admin/federation/clients.get.ts +9 -0
  209. package/server/api/admin/federation/clients.post.ts +16 -0
  210. package/server/api/admin/federation/hub-mirrors/index.get.ts +10 -0
  211. package/server/api/admin/federation/hub-mirrors/index.post.ts +42 -0
  212. package/server/api/admin/federation/mirrors/[id]/backfill.post.ts +39 -0
  213. package/server/api/admin/federation/mirrors/[id].delete.ts +11 -0
  214. package/server/api/admin/federation/mirrors/[id].get.ts +15 -0
  215. package/server/api/admin/federation/mirrors/[id].put.ts +22 -0
  216. package/server/api/admin/federation/mirrors/index.get.ts +9 -0
  217. package/server/api/admin/federation/mirrors/index.post.ts +30 -0
  218. package/server/api/admin/federation/pending.get.ts +22 -0
  219. package/server/api/admin/federation/refederate.post.ts +92 -0
  220. package/server/api/admin/federation/repair-types.post.ts +57 -0
  221. package/server/api/admin/federation/retry.post.ts +41 -0
  222. package/server/api/admin/federation/stats.get.ts +26 -0
  223. package/server/api/admin/reports/[id]/resolve.post.ts +12 -0
  224. package/server/api/admin/reports.get.ts +17 -0
  225. package/server/api/admin/settings.get.ts +22 -0
  226. package/server/api/admin/settings.put.ts +11 -0
  227. package/server/api/admin/stats.get.ts +9 -0
  228. package/server/api/admin/users/[id]/role.put.ts +12 -0
  229. package/server/api/admin/users/[id]/status.put.ts +12 -0
  230. package/server/api/admin/users/[id].delete.ts +10 -0
  231. package/server/api/admin/users.get.ts +18 -0
  232. package/server/api/auth/federated/callback.get.ts +67 -0
  233. package/server/api/auth/federated/login.post.ts +60 -0
  234. package/server/api/auth/oauth2/authorize.get.ts +30 -0
  235. package/server/api/auth/oauth2/authorize.post.ts +51 -0
  236. package/server/api/auth/oauth2/register.post.ts +41 -0
  237. package/server/api/auth/oauth2/token.post.ts +48 -0
  238. package/server/api/cert/[code].get.ts +13 -0
  239. package/server/api/content/[id]/build.post.ts +9 -0
  240. package/server/api/content/[id]/fork.post.ts +10 -0
  241. package/server/api/content/[id]/index.delete.ts +18 -0
  242. package/server/api/content/[id]/index.get.ts +15 -0
  243. package/server/api/content/[id]/index.put.ts +23 -0
  244. package/server/api/content/[id]/products/[productId].delete.ts +28 -0
  245. package/server/api/content/[id]/products-sync.post.ts +29 -0
  246. package/server/api/content/[id]/products.get.ts +9 -0
  247. package/server/api/content/[id]/products.post.ts +31 -0
  248. package/server/api/content/[id]/publish.post.ts +17 -0
  249. package/server/api/content/[id]/report.post.ts +17 -0
  250. package/server/api/content/[id]/versions.get.ts +9 -0
  251. package/server/api/content/[id]/view.post.ts +34 -0
  252. package/server/api/content/index.get.ts +23 -0
  253. package/server/api/content/index.post.ts +11 -0
  254. package/server/api/contests/[slug]/entries.get.ts +18 -0
  255. package/server/api/contests/[slug]/entries.post.ts +23 -0
  256. package/server/api/contests/[slug]/index.delete.ts +21 -0
  257. package/server/api/contests/[slug]/index.get.ts +11 -0
  258. package/server/api/contests/[slug]/index.put.ts +15 -0
  259. package/server/api/contests/[slug]/judge.post.ts +12 -0
  260. package/server/api/contests/[slug]/transition.post.ts +24 -0
  261. package/server/api/contests/index.get.ts +10 -0
  262. package/server/api/contests/index.post.ts +28 -0
  263. package/server/api/docs/[siteSlug]/index.delete.ts +14 -0
  264. package/server/api/docs/[siteSlug]/index.get.ts +17 -0
  265. package/server/api/docs/[siteSlug]/index.put.ts +20 -0
  266. package/server/api/docs/[siteSlug]/nav.get.ts +26 -0
  267. package/server/api/docs/[siteSlug]/pages/[pageId].delete.ts +14 -0
  268. package/server/api/docs/[siteSlug]/pages/[pageId].get.ts +31 -0
  269. package/server/api/docs/[siteSlug]/pages/[pageId].put.ts +15 -0
  270. package/server/api/docs/[siteSlug]/pages/index.get.ts +34 -0
  271. package/server/api/docs/[siteSlug]/pages/index.post.ts +28 -0
  272. package/server/api/docs/[siteSlug]/pages/reorder.post.ts +26 -0
  273. package/server/api/docs/[siteSlug]/search.get.ts +20 -0
  274. package/server/api/docs/[siteSlug]/versions.post.ts +11 -0
  275. package/server/api/docs/index.get.ts +6 -0
  276. package/server/api/docs/index.post.ts +10 -0
  277. package/server/api/federated-hubs/[id]/posts/[postId].get.ts +16 -0
  278. package/server/api/federated-hubs/[id]/posts.get.ts +15 -0
  279. package/server/api/federated-hubs/[id].get.ts +16 -0
  280. package/server/api/federation/boost.post.ts +21 -0
  281. package/server/api/federation/content/[id].get.ts +15 -0
  282. package/server/api/federation/follow.post.ts +16 -0
  283. package/server/api/federation/health.get.ts +56 -0
  284. package/server/api/federation/hub-follow.post.ts +27 -0
  285. package/server/api/federation/hub-post-like.post.ts +115 -0
  286. package/server/api/federation/hub-post-likes.get.ts +24 -0
  287. package/server/api/federation/hub-post-reply.post.ts +42 -0
  288. package/server/api/federation/hub-post.post.ts +33 -0
  289. package/server/api/federation/like.post.ts +21 -0
  290. package/server/api/federation/remote-actor.get.ts +22 -0
  291. package/server/api/federation/reply.post.ts +22 -0
  292. package/server/api/federation/search.post.ts +17 -0
  293. package/server/api/federation/timeline.get.ts +22 -0
  294. package/server/api/federation/unfollow.post.ts +17 -0
  295. package/server/api/files/[id].delete.ts +35 -0
  296. package/server/api/files/mine.get.ts +31 -0
  297. package/server/api/files/upload-from-url.post.ts +68 -0
  298. package/server/api/files/upload.post.ts +105 -0
  299. package/server/api/health.get.ts +4 -0
  300. package/server/api/hubs/[slug]/bans/[userId].delete.ts +13 -0
  301. package/server/api/hubs/[slug]/bans.get.ts +20 -0
  302. package/server/api/hubs/[slug]/bans.post.ts +23 -0
  303. package/server/api/hubs/[slug]/feed.xml.get.ts +60 -0
  304. package/server/api/hubs/[slug]/gallery.get.ts +21 -0
  305. package/server/api/hubs/[slug]/index.delete.ts +18 -0
  306. package/server/api/hubs/[slug]/index.get.ts +14 -0
  307. package/server/api/hubs/[slug]/index.put.ts +22 -0
  308. package/server/api/hubs/[slug]/invites.get.ts +20 -0
  309. package/server/api/hubs/[slug]/invites.post.ts +27 -0
  310. package/server/api/hubs/[slug]/join.post.ts +17 -0
  311. package/server/api/hubs/[slug]/leave.post.ts +13 -0
  312. package/server/api/hubs/[slug]/members/[userId].delete.ts +13 -0
  313. package/server/api/hubs/[slug]/members/[userId].put.ts +16 -0
  314. package/server/api/hubs/[slug]/members.get.ts +20 -0
  315. package/server/api/hubs/[slug]/posts/[postId]/like.post.ts +21 -0
  316. package/server/api/hubs/[slug]/posts/[postId]/lock.post.ts +17 -0
  317. package/server/api/hubs/[slug]/posts/[postId]/pin.post.ts +17 -0
  318. package/server/api/hubs/[slug]/posts/[postId]/replies.get.ts +16 -0
  319. package/server/api/hubs/[slug]/posts/[postId]/replies.post.ts +21 -0
  320. package/server/api/hubs/[slug]/posts/[postId].delete.ts +23 -0
  321. package/server/api/hubs/[slug]/posts/[postId].get.ts +16 -0
  322. package/server/api/hubs/[slug]/posts/index.get.ts +16 -0
  323. package/server/api/hubs/[slug]/posts/index.post.ts +36 -0
  324. package/server/api/hubs/[slug]/products.get.ts +26 -0
  325. package/server/api/hubs/[slug]/products.post.ts +18 -0
  326. package/server/api/hubs/[slug]/share.post.ts +39 -0
  327. package/server/api/hubs/index.get.ts +15 -0
  328. package/server/api/hubs/index.post.ts +11 -0
  329. package/server/api/image-proxy.get.ts +91 -0
  330. package/server/api/learn/[slug]/[lessonSlug]/complete.post.ts +13 -0
  331. package/server/api/learn/[slug]/[lessonSlug]/index.get.ts +68 -0
  332. package/server/api/learn/[slug]/enroll.post.ts +12 -0
  333. package/server/api/learn/[slug]/index.delete.ts +12 -0
  334. package/server/api/learn/[slug]/index.get.ts +14 -0
  335. package/server/api/learn/[slug]/index.put.ts +19 -0
  336. package/server/api/learn/[slug]/lessons/[lessonId].delete.ts +14 -0
  337. package/server/api/learn/[slug]/lessons/[lessonId].put.ts +24 -0
  338. package/server/api/learn/[slug]/lessons.post.ts +10 -0
  339. package/server/api/learn/[slug]/modules/[moduleId].delete.ts +14 -0
  340. package/server/api/learn/[slug]/modules/[moduleId].put.ts +15 -0
  341. package/server/api/learn/[slug]/modules.post.ts +14 -0
  342. package/server/api/learn/[slug]/publish.post.ts +13 -0
  343. package/server/api/learn/[slug]/unenroll.post.ts +12 -0
  344. package/server/api/learn/certificates.get.ts +9 -0
  345. package/server/api/learn/enrollments.get.ts +9 -0
  346. package/server/api/learn/index.get.ts +17 -0
  347. package/server/api/learn/index.post.ts +11 -0
  348. package/server/api/me.get.ts +13 -0
  349. package/server/api/messages/[conversationId]/info.get.ts +43 -0
  350. package/server/api/messages/[conversationId]/stream.get.ts +73 -0
  351. package/server/api/messages/[conversationId].get.ts +13 -0
  352. package/server/api/messages/[conversationId].post.ts +12 -0
  353. package/server/api/messages/index.get.ts +39 -0
  354. package/server/api/messages/index.post.ts +58 -0
  355. package/server/api/notifications/[id].delete.ts +11 -0
  356. package/server/api/notifications/count.get.ts +10 -0
  357. package/server/api/notifications/index.get.ts +24 -0
  358. package/server/api/notifications/read.post.ts +15 -0
  359. package/server/api/notifications/stream.get.ts +59 -0
  360. package/server/api/openapi.get.ts +5 -0
  361. package/server/api/products/[id].delete.ts +15 -0
  362. package/server/api/products/[id].put.ts +18 -0
  363. package/server/api/products/[slug]/content.get.ts +21 -0
  364. package/server/api/products/[slug].get.ts +16 -0
  365. package/server/api/products/index.get.ts +28 -0
  366. package/server/api/profile.get.ts +15 -0
  367. package/server/api/profile.put.ts +24 -0
  368. package/server/api/resolve-identity.post.ts +34 -0
  369. package/server/api/search/index.get.ts +24 -0
  370. package/server/api/search/trending.get.ts +22 -0
  371. package/server/api/social/bookmark.get.ts +16 -0
  372. package/server/api/social/bookmark.post.ts +15 -0
  373. package/server/api/social/bookmarks.get.ts +16 -0
  374. package/server/api/social/comments/[id].delete.ts +13 -0
  375. package/server/api/social/comments.get.ts +18 -0
  376. package/server/api/social/comments.post.ts +11 -0
  377. package/server/api/social/like.get.ts +17 -0
  378. package/server/api/social/like.post.ts +35 -0
  379. package/server/api/stats.get.ts +8 -0
  380. package/server/api/user/hubs.get.ts +22 -0
  381. package/server/api/users/[username]/content.get.ts +21 -0
  382. package/server/api/users/[username]/feed.xml.get.ts +65 -0
  383. package/server/api/users/[username]/follow.delete.ts +15 -0
  384. package/server/api/users/[username]/follow.post.ts +15 -0
  385. package/server/api/users/[username]/followers.get.ts +22 -0
  386. package/server/api/users/[username]/following.get.ts +22 -0
  387. package/server/api/users/[username]/learning.get.ts +18 -0
  388. package/server/api/users/[username].get.ts +25 -0
  389. package/server/api/users/index.get.ts +78 -0
  390. package/server/api/videos/[id].get.ts +18 -0
  391. package/server/api/videos/categories/[id].delete.ts +15 -0
  392. package/server/api/videos/categories/[id].put.ts +17 -0
  393. package/server/api/videos/categories.get.ts +7 -0
  394. package/server/api/videos/categories.post.ts +11 -0
  395. package/server/api/videos/index.get.ts +20 -0
  396. package/server/api/videos/index.post.ts +11 -0
  397. package/server/middleware/auth.ts +180 -0
  398. package/server/middleware/features.ts +31 -0
  399. package/server/middleware/security.ts +54 -0
  400. package/server/plugins/auto-admin.ts +69 -0
  401. package/server/plugins/federation-delivery.ts +74 -0
  402. package/server/routes/.well-known/nodeinfo.ts +15 -0
  403. package/server/routes/.well-known/webfinger.ts +86 -0
  404. package/server/routes/actor/followers.ts +34 -0
  405. package/server/routes/actor/following.ts +34 -0
  406. package/server/routes/actor/outbox.ts +31 -0
  407. package/server/routes/actor.ts +30 -0
  408. package/server/routes/feed.xml.ts +59 -0
  409. package/server/routes/hubs/[slug]/followers.ts +39 -0
  410. package/server/routes/hubs/[slug]/inbox.ts +35 -0
  411. package/server/routes/hubs/[slug]/outbox.ts +43 -0
  412. package/server/routes/hubs/[slug]/posts/[postId].ts +63 -0
  413. package/server/routes/hubs/[slug].ts +29 -0
  414. package/server/routes/inbox.ts +34 -0
  415. package/server/routes/nodeinfo/2.1.ts +27 -0
  416. package/server/routes/robots.txt.ts +19 -0
  417. package/server/routes/sitemap.xml.ts +105 -0
  418. package/server/routes/users/[username]/followers.ts +33 -0
  419. package/server/routes/users/[username]/following.ts +33 -0
  420. package/server/routes/users/[username]/inbox.ts +34 -0
  421. package/server/routes/users/[username]/outbox.ts +35 -0
  422. package/server/routes/users/[username].ts +62 -0
  423. package/server/utils/auth.ts +36 -0
  424. package/server/utils/db.ts +34 -0
  425. package/server/utils/errors.ts +24 -0
  426. package/server/utils/inbox.ts +122 -0
  427. package/server/utils/validate.ts +82 -0
  428. package/theme/base.css +283 -0
  429. package/theme/components.css +322 -0
  430. package/theme/dark.css +87 -0
  431. package/theme/editor-panels.css +63 -0
  432. package/theme/forms.css +216 -0
  433. package/theme/generics.css +68 -0
  434. package/theme/layouts.css +415 -0
  435. package/theme/prose.css +342 -0
  436. package/types/hub.ts +61 -0
@@ -0,0 +1,771 @@
1
+ <script setup lang="ts">
2
+ import type { ContentViewData } from '../../composables/useEngagement';
3
+
4
+ const props = defineProps<{
5
+ content: ContentViewData;
6
+ federatedId?: string;
7
+ }>();
8
+
9
+ const contentId = computed(() => props.content?.id);
10
+ const contentType = computed(() => props.content?.type ?? 'article');
11
+ const fedId = computed(() => props.federatedId);
12
+ const { liked, bookmarked, likeCount, isFederated, toggleLike, toggleBookmark, share, fetchInitialState } = useEngagement({ contentId, contentType, federatedContentId: fedId });
13
+
14
+ onMounted(() => {
15
+ fetchInitialState(props.content?.likeCount ?? 0);
16
+ });
17
+
18
+ // Extract headings from block content for TOC
19
+ const tocHeadings = computed(() => {
20
+ const blocks = props.content?.content;
21
+ if (!Array.isArray(blocks)) return [];
22
+ return blocks
23
+ .filter((b: unknown) => {
24
+ const block = b as [string, Record<string, unknown>];
25
+ return block[0] === 'heading';
26
+ })
27
+ .map((b: unknown, idx: number) => {
28
+ const block = b as [string, Record<string, unknown>];
29
+ return {
30
+ id: `heading-${idx}`,
31
+ text: (block[1].text as string) || 'Untitled',
32
+ level: (block[1].level as number) || 2,
33
+ };
34
+ });
35
+ });
36
+
37
+ const { isAuthenticated } = useAuth();
38
+ const toast = useToast();
39
+ const followingAuthor = ref((props.content as unknown as Record<string, unknown>).isFollowingAuthor as boolean ?? false);
40
+
41
+ async function handleFollowAuthor(): Promise<void> {
42
+ if (!isAuthenticated.value) {
43
+ await navigateTo(`/auth/login?redirect=/article/${props.content.slug}`);
44
+ return;
45
+ }
46
+ const username = props.content.author?.username;
47
+ if (!username) return;
48
+ try {
49
+ if (followingAuthor.value) {
50
+ await $fetch(`/api/users/${username}/follow`, { method: 'DELETE' });
51
+ followingAuthor.value = false;
52
+ } else {
53
+ await $fetch(`/api/users/${username}/follow`, { method: 'POST' });
54
+ followingAuthor.value = true;
55
+ }
56
+ } catch {
57
+ toast.error('Failed to update follow');
58
+ }
59
+ }
60
+
61
+ const config = useRuntimeConfig();
62
+ useJsonLd({
63
+ type: 'article',
64
+ title: props.content.title,
65
+ description: props.content.seoDescription ?? props.content.description ?? '',
66
+ url: `${config.public.siteUrl}/article/${props.content.slug}`,
67
+ imageUrl: props.content.coverImageUrl ?? undefined,
68
+ authorName: props.content.author?.displayName ?? props.content.author?.username ?? '',
69
+ authorUrl: `${config.public.siteUrl}/u/${props.content.author?.username}`,
70
+ publishedAt: props.content.publishedAt ?? props.content.createdAt,
71
+ updatedAt: props.content.updatedAt,
72
+ });
73
+ </script>
74
+
75
+ <template>
76
+ <div class="cpub-article-view">
77
+ <!-- COVER IMAGE -->
78
+ <div class="cpub-cover">
79
+ <img v-if="content.coverImageUrl" :src="content.coverImageUrl" :alt="content.title" class="cpub-cover-img" />
80
+ <template v-else>
81
+ <div class="cpub-cover-label">
82
+ <i class="fa-solid fa-microchip"></i>
83
+ cover image · 1280×720
84
+ </div>
85
+ </template>
86
+ </div>
87
+
88
+ <!-- ARTICLE CONTENT -->
89
+ <div class="cpub-article-wrap">
90
+
91
+ <!-- TYPE BADGE -->
92
+ <div class="cpub-content-type-badge"><i class="fa-solid fa-newspaper"></i> Article</div>
93
+
94
+ <!-- TITLE -->
95
+ <h1 class="cpub-article-title">{{ content.title }}</h1>
96
+
97
+ <!-- LEAD -->
98
+ <p v-if="content.description" class="cpub-article-lead">{{ content.description }}</p>
99
+
100
+ <!-- AUTHOR ROW -->
101
+ <div class="cpub-author-row">
102
+ <NuxtLink v-if="content.author" :to="`/u/${content.author.username}`" style="text-decoration:none;">
103
+ <img v-if="content.author?.avatarUrl" :src="content.author.avatarUrl" :alt="content.author?.displayName ?? content.author?.username ?? ''" class="cpub-av cpub-av-lg" style="object-fit:cover;border:2px solid var(--border);" />
104
+ <div v-else class="cpub-av cpub-av-lg">{{ content.author?.displayName?.slice(0, 2).toUpperCase() || 'CP' }}</div>
105
+ </NuxtLink>
106
+ <div class="cpub-author-info">
107
+ <NuxtLink v-if="content.author" :to="`/u/${content.author.username}`" class="cpub-author-name">
108
+ {{ content.author.displayName || content.author.username }}
109
+ <i v-if="content.author.verified" class="fa-solid fa-circle-check cpub-verified" title="Verified"></i>
110
+ </NuxtLink>
111
+ <div class="cpub-author-meta">
112
+ <span v-if="content.author?.username">@{{ content.author.username }}</span>
113
+ <span class="cpub-sep">·</span>
114
+ <span>{{ new Date(content.publishedAt || content.createdAt).toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric' }) }}</span>
115
+ <span class="cpub-sep">·</span>
116
+ <span><i class="fa-regular fa-clock"></i> {{ content.readTime || '5 min read' }}</span>
117
+ <template v-if="content.tags?.length">
118
+ <span class="cpub-sep">·</span>
119
+ <span class="cpub-tag cpub-tag-teal">{{ content.tags[0]?.name || content.tags[0] }}</span>
120
+ </template>
121
+ </div>
122
+ </div>
123
+ </div>
124
+
125
+ <!-- ENGAGEMENT ROW -->
126
+ <div class="cpub-engagement-row">
127
+ <div class="cpub-eng-stat"><i class="fa-regular fa-eye"></i> {{ content.viewCount?.toLocaleString() || '0' }} views</div>
128
+ <div class="cpub-eng-sep"></div>
129
+ <button class="cpub-eng-btn" :class="{ liked }" @click="toggleLike">
130
+ <i class="fa-solid fa-heart"></i> {{ likeCount }}
131
+ </button>
132
+ <button class="cpub-eng-btn" :class="{ bookmarked }" @click="toggleBookmark">
133
+ <i class="fa-solid fa-bookmark"></i> Bookmark
134
+ </button>
135
+ <div class="cpub-eng-spacer"></div>
136
+ <button class="cpub-eng-btn" @click="share"><i class="fa-solid fa-share-nodes"></i> Share</button>
137
+ <button class="cpub-eng-btn"><i class="fa-solid fa-ellipsis"></i></button>
138
+ </div>
139
+
140
+ <!-- ARTICLE BODY WITH TOC SIDEBAR -->
141
+ <div v-if="tocHeadings.length > 0" class="cpub-article-body-layout">
142
+ <aside class="cpub-article-toc-sidebar" aria-label="Table of contents">
143
+ <TOCNav :headings="tocHeadings" />
144
+ </aside>
145
+ </div>
146
+
147
+ <!-- ARTICLE BODY (PROSE) -->
148
+ <div class="cpub-prose">
149
+ <template v-if="content.content && Array.isArray(content.content) && (content.content as unknown[]).length > 0">
150
+ <BlocksBlockContentRenderer :blocks="(content.content as [string, Record<string, unknown>][])" />
151
+ </template>
152
+ <template v-else>
153
+ <p>No content body yet.</p>
154
+ </template>
155
+ </div>
156
+
157
+ <!-- TAGS -->
158
+ <div v-if="content.tags?.length" class="cpub-tags-row">
159
+ <div class="cpub-tags-label">Filed under</div>
160
+ <span
161
+ v-for="(tag, i) in content.tags"
162
+ :key="tag.id || tag.name || i"
163
+ class="cpub-tag"
164
+ :class="{ 'cpub-tag-accent': i === 0 }"
165
+ >
166
+ {{ tag.name || tag }}
167
+ </span>
168
+ </div>
169
+
170
+ <!-- AUTHOR CARD -->
171
+ <div v-if="content.author" class="cpub-author-card">
172
+ <div class="cpub-av cpub-av-xl">{{ content.author.displayName?.slice(0, 2).toUpperCase() || 'CP' }}</div>
173
+ <div class="cpub-author-card-info">
174
+ <div class="cpub-author-card-label">Written by</div>
175
+ <div class="cpub-author-card-name">
176
+ {{ content.author.displayName || content.author.username }}
177
+ <i v-if="content.author.verified" class="fa-solid fa-circle-check cpub-verified-sm" title="Verified author"></i>
178
+ </div>
179
+ <div class="cpub-author-card-handle">@{{ content.author.username }}</div>
180
+ <div v-if="content.author.bio" class="cpub-author-card-bio">{{ content.author.bio }}</div>
181
+ <div class="cpub-author-card-footer">
182
+ <div class="cpub-author-card-stats">
183
+ <div class="cpub-author-card-stat"><span class="n">{{ content.author.articleCount ?? 0 }}</span><span class="l">articles</span></div>
184
+ <div class="cpub-author-card-stat"><span class="n">{{ content.author.followerCount ?? 0 }}</span><span class="l">followers</span></div>
185
+ <div class="cpub-author-card-stat"><span class="n">{{ content.author.totalViews ?? 0 }}</span><span class="l">total views</span></div>
186
+ </div>
187
+ <div class="cpub-author-card-actions">
188
+ <button class="cpub-btn cpub-btn-sm" @click="handleFollowAuthor">
189
+ <i :class="followingAuthor ? 'fa-solid fa-user-check' : 'fa-solid fa-rss'"></i>
190
+ {{ followingAuthor ? 'Following' : 'Follow' }}
191
+ </button>
192
+ </div>
193
+ </div>
194
+ </div>
195
+ </div>
196
+
197
+ <!-- RELATED ARTICLES -->
198
+ <div v-if="content.related?.length" class="cpub-section-head">Related Articles</div>
199
+ <div v-if="content.related?.length" class="cpub-related-grid">
200
+ <NuxtLink
201
+ v-for="item in content.related.slice(0, 3)"
202
+ :key="item.id"
203
+ :to="`/${item.type}/${item.slug}`"
204
+ class="cpub-related-card"
205
+ >
206
+ <div class="cpub-related-card-thumb">
207
+ <i class="fa-solid fa-newspaper"></i>
208
+ </div>
209
+ <div class="cpub-related-card-body">
210
+ <div class="cpub-related-card-type">{{ item.type }}</div>
211
+ <div class="cpub-related-card-title">{{ item.title }}</div>
212
+ <div class="cpub-related-card-meta">
213
+ <span>{{ item.readTime || '5 min' }}</span>
214
+ <span>·</span>
215
+ <span>{{ item.viewCount?.toLocaleString() || '0' }} views</span>
216
+ </div>
217
+ </div>
218
+ </NuxtLink>
219
+ </div>
220
+
221
+ <!-- COMMENTS SECTION -->
222
+ <CommentSection :target-type="content.type" :target-id="content.id" :federated-content-id="federatedId" />
223
+
224
+ </div>
225
+ </div>
226
+ </template>
227
+
228
+ <style scoped>
229
+ /* ── TOC SIDEBAR ── */
230
+ .cpub-article-toc-sidebar {
231
+ display: none;
232
+ }
233
+ @media (min-width: 1200px) {
234
+ .cpub-article-body-layout {
235
+ position: fixed;
236
+ right: max(24px, calc((100vw - 720px) / 2 - 240px));
237
+ top: 120px;
238
+ width: 200px;
239
+ z-index: 10;
240
+ pointer-events: none;
241
+ }
242
+ .cpub-article-toc-sidebar {
243
+ display: block;
244
+ pointer-events: auto;
245
+ position: sticky;
246
+ top: 80px;
247
+ }
248
+ }
249
+
250
+ /* ── COVER IMAGE ── */
251
+ .cpub-cover {
252
+ width: 100%;
253
+ height: 300px;
254
+ background: var(--accent-bg);
255
+ position: relative;
256
+ display: flex;
257
+ align-items: center;
258
+ justify-content: center;
259
+ overflow: hidden;
260
+ border-bottom: 1px solid var(--border);
261
+ }
262
+
263
+ .cpub-cover::after {
264
+ content: '';
265
+ position: absolute;
266
+ inset: 0;
267
+ background-image:
268
+ linear-gradient(var(--border2) 1px, transparent 1px),
269
+ linear-gradient(90deg, var(--border2) 1px, transparent 1px);
270
+ background-size: 40px 40px;
271
+ opacity: 0.25;
272
+ pointer-events: none;
273
+ }
274
+
275
+ .cpub-cover-img {
276
+ width: 100%;
277
+ height: 100%;
278
+ object-fit: cover;
279
+ position: relative;
280
+ z-index: 1;
281
+ }
282
+
283
+ .cpub-cover-label {
284
+ position: relative;
285
+ z-index: 1;
286
+ text-align: center;
287
+ display: flex;
288
+ flex-direction: column;
289
+ align-items: center;
290
+ gap: 8px;
291
+ color: var(--text-faint);
292
+ font-size: 11px;
293
+ font-family: var(--font-mono);
294
+ }
295
+
296
+ .cpub-cover-label i {
297
+ font-size: 40px;
298
+ color: var(--accent);
299
+ opacity: 0.4;
300
+ }
301
+
302
+ /* ── ARTICLE WRAP ── */
303
+ .cpub-article-wrap {
304
+ max-width: 720px;
305
+ margin: 0 auto;
306
+ padding: 40px 24px 80px;
307
+ }
308
+
309
+ /* ── TYPE BADGE ── */
310
+ .cpub-content-type-badge {
311
+ display: inline-flex;
312
+ align-items: center;
313
+ gap: 5px;
314
+ font-size: 10px;
315
+ font-family: var(--font-mono);
316
+ letter-spacing: 0.1em;
317
+ text-transform: uppercase;
318
+ color: var(--accent);
319
+ border: 1px solid var(--border);
320
+ background: var(--accent-bg);
321
+ padding: 3px 10px;
322
+ margin-bottom: 16px;
323
+ box-shadow: var(--shadow-sm);
324
+ }
325
+
326
+ /* ── TITLE ── */
327
+ .cpub-article-title {
328
+ font-size: 28px;
329
+ font-weight: 700;
330
+ line-height: 1.25;
331
+ color: var(--text);
332
+ margin-bottom: 14px;
333
+ letter-spacing: -0.01em;
334
+ }
335
+
336
+ /* ── LEAD ── */
337
+ .cpub-article-lead {
338
+ font-size: 16px;
339
+ color: var(--text-dim);
340
+ line-height: 1.7;
341
+ margin-bottom: 24px;
342
+ font-weight: 400;
343
+ }
344
+
345
+ /* ── AVATARS ── */
346
+ .cpub-av {
347
+ width: 28px;
348
+ height: 28px;
349
+ border-radius: 50%;
350
+ background: var(--surface3);
351
+ border: 1px solid var(--border);
352
+ display: flex;
353
+ align-items: center;
354
+ justify-content: center;
355
+ font-size: 10px;
356
+ font-weight: 600;
357
+ color: var(--text-dim);
358
+ font-family: var(--font-mono);
359
+ flex-shrink: 0;
360
+ }
361
+
362
+ .cpub-av-lg { width: 44px; height: 44px; font-size: 14px; }
363
+ .cpub-av-xl { width: 64px; height: 64px; font-size: 18px; }
364
+
365
+ /* ── AUTHOR ROW ── */
366
+ .cpub-author-row {
367
+ display: flex;
368
+ align-items: center;
369
+ gap: 12px;
370
+ margin-bottom: 20px;
371
+ flex-wrap: wrap;
372
+ }
373
+
374
+ .cpub-author-info {
375
+ display: flex;
376
+ flex-direction: column;
377
+ gap: 2px;
378
+ }
379
+
380
+ .cpub-author-name {
381
+ font-size: 13px;
382
+ font-weight: 600;
383
+ color: var(--text);
384
+ text-decoration: none;
385
+ }
386
+
387
+ .cpub-author-name:hover { color: var(--accent); }
388
+
389
+ .cpub-verified {
390
+ color: var(--accent);
391
+ font-size: 10px;
392
+ }
393
+
394
+ .cpub-author-meta {
395
+ font-size: 11px;
396
+ color: var(--text-faint);
397
+ font-family: var(--font-mono);
398
+ display: flex;
399
+ align-items: center;
400
+ gap: 8px;
401
+ }
402
+
403
+ .cpub-sep { color: var(--border2); }
404
+
405
+ /* ── TAGS (inline) ── */
406
+ .cpub-tag {
407
+ display: inline-flex;
408
+ align-items: center;
409
+ font-size: 10px;
410
+ font-family: var(--font-mono);
411
+ padding: 2px 8px;
412
+ border: 1px solid var(--border2);
413
+ color: var(--text-dim);
414
+ background: var(--surface2);
415
+ }
416
+
417
+ .cpub-tag-accent {
418
+ border-color: var(--accent-border);
419
+ color: var(--accent);
420
+ background: var(--accent-bg);
421
+ }
422
+
423
+ .cpub-tag-teal {
424
+ border-color: var(--teal-border);
425
+ color: var(--teal);
426
+ background: var(--teal-bg);
427
+ }
428
+
429
+ /* ── ENGAGEMENT ROW ── */
430
+ .cpub-engagement-row {
431
+ display: flex;
432
+ align-items: center;
433
+ gap: 6px;
434
+ padding: 14px 0;
435
+ border-top: 1px solid var(--border);
436
+ border-bottom: 1px solid var(--border);
437
+ margin-bottom: 28px;
438
+ }
439
+
440
+ .cpub-eng-stat {
441
+ font-size: 11px;
442
+ font-family: var(--font-mono);
443
+ color: var(--text-faint);
444
+ display: flex;
445
+ align-items: center;
446
+ gap: 5px;
447
+ padding: 5px 10px;
448
+ }
449
+
450
+ .cpub-eng-stat i { font-size: 12px; }
451
+
452
+ .cpub-eng-btn {
453
+ display: flex;
454
+ align-items: center;
455
+ gap: 5px;
456
+ font-size: 11px;
457
+ font-family: var(--font-mono);
458
+ color: var(--text-dim);
459
+ background: var(--surface);
460
+ border: 1px solid var(--border);
461
+ padding: 5px 12px;
462
+ cursor: pointer;
463
+ transition: background var(--transition-fast), color var(--transition-fast);
464
+ }
465
+
466
+ .cpub-eng-btn:hover { background: var(--surface2); color: var(--text); }
467
+ .cpub-eng-btn.liked { color: var(--red); border-color: var(--border); background: var(--red-bg); }
468
+ .cpub-eng-btn.bookmarked { color: var(--yellow); border-color: var(--border); background: var(--yellow-bg); }
469
+
470
+ .cpub-eng-sep {
471
+ width: 2px;
472
+ height: 20px;
473
+ background: var(--border);
474
+ margin: 0 4px;
475
+ }
476
+
477
+ .cpub-eng-spacer { margin-left: auto; }
478
+
479
+ /* ── PROSE ── */
480
+ .cpub-prose {
481
+ font-size: 15px;
482
+ line-height: 1.85;
483
+ color: var(--text-dim);
484
+ }
485
+
486
+ .cpub-prose :deep(h2) {
487
+ font-size: 20px;
488
+ font-weight: 700;
489
+ color: var(--text);
490
+ margin: 40px 0 12px;
491
+ letter-spacing: -0.01em;
492
+ padding-bottom: 8px;
493
+ border-bottom: 1px solid var(--border);
494
+ }
495
+
496
+ .cpub-prose :deep(h3) {
497
+ font-size: 16px;
498
+ font-weight: 600;
499
+ color: var(--text);
500
+ margin: 28px 0 8px;
501
+ }
502
+
503
+ .cpub-prose :deep(p) { margin-bottom: 18px; }
504
+ .cpub-prose :deep(strong) { color: var(--text); font-weight: 600; }
505
+ .cpub-prose :deep(em) { font-style: italic; color: var(--text-dim); }
506
+ .cpub-prose :deep(a) { color: var(--accent); text-decoration: none; }
507
+ .cpub-prose :deep(a:hover) { text-decoration: underline; }
508
+
509
+ .cpub-prose :deep(code) {
510
+ font-family: var(--font-mono);
511
+ font-size: 13px;
512
+ color: var(--teal);
513
+ background: var(--surface2);
514
+ border: 1px solid var(--border);
515
+ padding: 1px 6px;
516
+ }
517
+
518
+ .cpub-prose :deep(pre code) {
519
+ background: none;
520
+ border: none;
521
+ padding: 0;
522
+ color: inherit;
523
+ font-size: inherit;
524
+ }
525
+
526
+ .cpub-prose :deep(ul),
527
+ .cpub-prose :deep(ol) {
528
+ margin: 0 0 18px 20px;
529
+ display: flex;
530
+ flex-direction: column;
531
+ gap: 6px;
532
+ }
533
+
534
+ .cpub-prose :deep(li) { color: var(--text-dim); }
535
+
536
+ .cpub-prose :deep(blockquote) {
537
+ border-left: 4px solid var(--accent);
538
+ padding: 14px 20px;
539
+ margin: 28px 0;
540
+ background: var(--surface);
541
+ }
542
+
543
+ .cpub-prose :deep(blockquote p) {
544
+ color: var(--text-dim);
545
+ font-style: italic;
546
+ margin: 0;
547
+ font-size: 15px;
548
+ }
549
+
550
+ .cpub-prose :deep(hr) {
551
+ border: none;
552
+ border-top: 1px solid var(--border);
553
+ margin: 36px 0;
554
+ }
555
+
556
+ /* ── TAGS ROW ── */
557
+ .cpub-tags-row {
558
+ display: flex;
559
+ flex-wrap: wrap;
560
+ gap: 6px;
561
+ margin: 40px 0 32px;
562
+ padding-top: 24px;
563
+ border-top: 1px solid var(--border);
564
+ }
565
+
566
+ .cpub-tags-label {
567
+ font-size: 10px;
568
+ font-family: var(--font-mono);
569
+ color: var(--text-faint);
570
+ letter-spacing: 0.1em;
571
+ text-transform: uppercase;
572
+ width: 100%;
573
+ margin-bottom: 4px;
574
+ }
575
+
576
+ /* ── AUTHOR CARD ── */
577
+ .cpub-author-card {
578
+ background: var(--surface);
579
+ border: 1px solid var(--border);
580
+ padding: 24px;
581
+ display: flex;
582
+ gap: 20px;
583
+ align-items: flex-start;
584
+ margin: 32px 0;
585
+ box-shadow: var(--shadow-sm);
586
+ }
587
+
588
+ .cpub-author-card-info { flex: 1; min-width: 0; }
589
+
590
+ .cpub-author-card-label {
591
+ font-size: 9px;
592
+ font-family: var(--font-mono);
593
+ color: var(--text-faint);
594
+ letter-spacing: 0.12em;
595
+ text-transform: uppercase;
596
+ margin-bottom: 6px;
597
+ }
598
+
599
+ .cpub-author-card-name {
600
+ font-size: 15px;
601
+ font-weight: 700;
602
+ color: var(--text);
603
+ margin-bottom: 4px;
604
+ display: flex;
605
+ align-items: center;
606
+ gap: 8px;
607
+ }
608
+
609
+ .cpub-verified-sm {
610
+ color: var(--accent);
611
+ font-size: 12px;
612
+ }
613
+
614
+ .cpub-author-card-handle {
615
+ font-size: 11px;
616
+ font-family: var(--font-mono);
617
+ color: var(--text-faint);
618
+ margin-bottom: 10px;
619
+ }
620
+
621
+ .cpub-author-card-bio {
622
+ font-size: 13px;
623
+ color: var(--text-dim);
624
+ line-height: 1.65;
625
+ margin-bottom: 14px;
626
+ }
627
+
628
+ .cpub-author-card-footer {
629
+ display: flex;
630
+ align-items: center;
631
+ gap: 12px;
632
+ flex-wrap: wrap;
633
+ }
634
+
635
+ .cpub-author-card-stats {
636
+ display: flex;
637
+ gap: 20px;
638
+ }
639
+
640
+ .cpub-author-card-stat {
641
+ display: flex;
642
+ flex-direction: column;
643
+ gap: 1px;
644
+ }
645
+
646
+ .cpub-author-card-stat .n {
647
+ font-size: 15px;
648
+ font-weight: 700;
649
+ color: var(--text);
650
+ font-family: var(--font-mono);
651
+ }
652
+
653
+ .cpub-author-card-stat .l {
654
+ font-size: 10px;
655
+ color: var(--text-faint);
656
+ font-family: var(--font-mono);
657
+ }
658
+
659
+ .cpub-author-card-actions {
660
+ margin-left: auto;
661
+ display: flex;
662
+ gap: 8px;
663
+ }
664
+
665
+ /* ── RELATED ARTICLES ── */
666
+ .cpub-section-head {
667
+ font-size: 11px;
668
+ font-family: var(--font-mono);
669
+ color: var(--text-faint);
670
+ letter-spacing: 0.12em;
671
+ text-transform: uppercase;
672
+ margin-bottom: 16px;
673
+ padding-bottom: 8px;
674
+ border-bottom: 1px solid var(--border);
675
+ }
676
+
677
+ .cpub-related-grid {
678
+ display: grid;
679
+ grid-template-columns: repeat(3, 1fr);
680
+ gap: 12px;
681
+ margin-bottom: 48px;
682
+ }
683
+
684
+ .cpub-related-card {
685
+ background: var(--surface);
686
+ border: 1px solid var(--border);
687
+ overflow: hidden;
688
+ cursor: pointer;
689
+ transition: box-shadow var(--transition-fast);
690
+ box-shadow: var(--shadow-sm);
691
+ text-decoration: none;
692
+ color: inherit;
693
+ }
694
+
695
+ .cpub-related-card:hover { box-shadow: var(--shadow-md); }
696
+
697
+ .cpub-related-card-thumb {
698
+ aspect-ratio: 16/9;
699
+ background: var(--surface2);
700
+ display: flex;
701
+ align-items: center;
702
+ justify-content: center;
703
+ position: relative;
704
+ overflow: hidden;
705
+ border-bottom: 1px solid var(--border);
706
+ }
707
+
708
+ .cpub-related-card-thumb::after {
709
+ content: '';
710
+ position: absolute;
711
+ inset: 0;
712
+ background-image:
713
+ linear-gradient(var(--border2) 1px, transparent 1px),
714
+ linear-gradient(90deg, var(--border2) 1px, transparent 1px);
715
+ background-size: 20px 20px;
716
+ opacity: 0.3;
717
+ }
718
+
719
+ .cpub-related-card-thumb i {
720
+ font-size: 22px;
721
+ color: var(--text-faint);
722
+ position: relative;
723
+ z-index: 1;
724
+ opacity: 0.5;
725
+ }
726
+
727
+ .cpub-related-card-body { padding: 12px; }
728
+
729
+ .cpub-related-card-type {
730
+ font-size: 9px;
731
+ font-family: var(--font-mono);
732
+ color: var(--accent);
733
+ letter-spacing: 0.1em;
734
+ text-transform: uppercase;
735
+ margin-bottom: 4px;
736
+ }
737
+
738
+ .cpub-related-card-title {
739
+ font-size: 12px;
740
+ font-weight: 600;
741
+ color: var(--text);
742
+ line-height: 1.4;
743
+ margin-bottom: 6px;
744
+ }
745
+
746
+ .cpub-related-card-meta {
747
+ font-size: 10px;
748
+ font-family: var(--font-mono);
749
+ color: var(--text-faint);
750
+ display: flex;
751
+ align-items: center;
752
+ gap: 6px;
753
+ }
754
+
755
+ /* ── RESPONSIVE ── */
756
+ @media (max-width: 640px) {
757
+ .cpub-article-wrap {
758
+ padding: 24px 16px 48px;
759
+ }
760
+ .cpub-related-grid {
761
+ grid-template-columns: 1fr;
762
+ }
763
+ .cpub-engagement-row {
764
+ flex-wrap: wrap;
765
+ }
766
+ .cpub-author-card {
767
+ flex-direction: column;
768
+ gap: 16px;
769
+ }
770
+ }
771
+ </style>