@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.
- package/LICENSE +661 -0
- package/app.vue +7 -0
- package/components/AnnouncementBand.vue +117 -0
- package/components/AppToast.vue +108 -0
- package/components/AuthorCard.vue +119 -0
- package/components/AuthorRow.vue +81 -0
- package/components/CommentSection.vue +330 -0
- package/components/ContentCard.vue +340 -0
- package/components/ContentPicker.vue +240 -0
- package/components/ContentStarterForm.vue +214 -0
- package/components/ContentTypeBadge.vue +46 -0
- package/components/CountdownTimer.vue +68 -0
- package/components/CpubEditor.vue +87 -0
- package/components/DiscussionItem.vue +191 -0
- package/components/EditorPropertiesPanel.vue +393 -0
- package/components/EngagementBar.vue +131 -0
- package/components/FederatedContentCard.vue +291 -0
- package/components/FeedItem.vue +283 -0
- package/components/FilterChip.vue +21 -0
- package/components/HeatmapGrid.vue +92 -0
- package/components/ImageUpload.vue +219 -0
- package/components/MemberCard.vue +163 -0
- package/components/MessageThread.vue +120 -0
- package/components/NotificationItem.vue +103 -0
- package/components/ProgressTracker.vue +41 -0
- package/components/PublishErrorsModal.vue +116 -0
- package/components/RemoteActorCard.vue +206 -0
- package/components/RemoteUserSearch.vue +117 -0
- package/components/SearchFilters.vue +188 -0
- package/components/SearchSidebar.vue +181 -0
- package/components/SectionHeader.vue +17 -0
- package/components/ShareToHubModal.vue +189 -0
- package/components/SiteLogo.vue +21 -0
- package/components/SkillBar.vue +57 -0
- package/components/SortSelect.vue +30 -0
- package/components/StatBar.vue +14 -0
- package/components/TOCNav.vue +69 -0
- package/components/TimelineItem.vue +82 -0
- package/components/VideoCard.vue +106 -0
- package/components/blocks/BlockBuildStepView.vue +92 -0
- package/components/blocks/BlockCalloutView.vue +82 -0
- package/components/blocks/BlockCheckpointView.vue +50 -0
- package/components/blocks/BlockCodeView.vue +212 -0
- package/components/blocks/BlockContentRenderer.vue +143 -0
- package/components/blocks/BlockDividerView.vue +11 -0
- package/components/blocks/BlockDownloadsView.vue +126 -0
- package/components/blocks/BlockEmbedView.vue +61 -0
- package/components/blocks/BlockGalleryView.vue +57 -0
- package/components/blocks/BlockHeadingView.vue +29 -0
- package/components/blocks/BlockImageView.vue +34 -0
- package/components/blocks/BlockMarkdownView.vue +118 -0
- package/components/blocks/BlockMathView.vue +45 -0
- package/components/blocks/BlockPartsListView.vue +104 -0
- package/components/blocks/BlockQuizView.vue +239 -0
- package/components/blocks/BlockQuoteView.vue +41 -0
- package/components/blocks/BlockSectionHeaderView.vue +58 -0
- package/components/blocks/BlockSliderView.vue +236 -0
- package/components/blocks/BlockTextView.vue +41 -0
- package/components/blocks/BlockToolListView.vue +87 -0
- package/components/blocks/BlockVideoView.vue +89 -0
- package/components/editors/ArticleEditor.vue +545 -0
- package/components/editors/BlockCanvas.vue +487 -0
- package/components/editors/BlockInsertZone.vue +84 -0
- package/components/editors/BlockPicker.vue +285 -0
- package/components/editors/BlockWrapper.vue +192 -0
- package/components/editors/BlogEditor.vue +567 -0
- package/components/editors/EditorBlocks.vue +248 -0
- package/components/editors/EditorSection.vue +81 -0
- package/components/editors/EditorShell.vue +168 -0
- package/components/editors/EditorTagInput.vue +114 -0
- package/components/editors/EditorVisibility.vue +110 -0
- package/components/editors/ExplainerEditor.vue +503 -0
- package/components/editors/MarkdownImportDialog.vue +249 -0
- package/components/editors/ProjectEditor.vue +446 -0
- package/components/editors/blocks/BuildStepBlock.vue +102 -0
- package/components/editors/blocks/CalloutBlock.vue +122 -0
- package/components/editors/blocks/CheckpointBlock.vue +27 -0
- package/components/editors/blocks/CodeBlock.vue +177 -0
- package/components/editors/blocks/DividerBlock.vue +22 -0
- package/components/editors/blocks/DownloadsBlock.vue +41 -0
- package/components/editors/blocks/EmbedBlock.vue +20 -0
- package/components/editors/blocks/GalleryBlock.vue +236 -0
- package/components/editors/blocks/HeadingBlock.vue +96 -0
- package/components/editors/blocks/ImageBlock.vue +271 -0
- package/components/editors/blocks/MarkdownBlock.vue +258 -0
- package/components/editors/blocks/MathBlock.vue +37 -0
- package/components/editors/blocks/PartsListBlock.vue +358 -0
- package/components/editors/blocks/QuizBlock.vue +47 -0
- package/components/editors/blocks/QuoteBlock.vue +101 -0
- package/components/editors/blocks/SectionHeaderBlock.vue +130 -0
- package/components/editors/blocks/SliderBlock.vue +318 -0
- package/components/editors/blocks/TextBlock.vue +201 -0
- package/components/editors/blocks/ToolListBlock.vue +70 -0
- package/components/editors/blocks/VideoBlock.vue +22 -0
- package/components/hub/HubDiscussions.vue +47 -0
- package/components/hub/HubFeed.vue +199 -0
- package/components/hub/HubHero.vue +185 -0
- package/components/hub/HubLayout.vue +103 -0
- package/components/hub/HubMembers.vue +40 -0
- package/components/hub/HubProducts.vue +93 -0
- package/components/hub/HubProjects.vue +207 -0
- package/components/hub/HubSidebar.vue +12 -0
- package/components/hub/HubSidebarCard.vue +35 -0
- package/components/views/ArticleView.vue +771 -0
- package/components/views/BlogView.vue +667 -0
- package/components/views/ExplainerView.vue +688 -0
- package/components/views/ProjectView.vue +1500 -0
- package/composables/useApiError.ts +39 -0
- package/composables/useAuth.ts +87 -0
- package/composables/useBlockEditor.ts +187 -0
- package/composables/useContentSave.ts +253 -0
- package/composables/useContentTypes.ts +37 -0
- package/composables/useEngagement.ts +196 -0
- package/composables/useFeatures.ts +33 -0
- package/composables/useFederation.ts +72 -0
- package/composables/useJsonLd.ts +183 -0
- package/composables/useMarkdownImport.ts +77 -0
- package/composables/useMirrorContent.ts +105 -0
- package/composables/useNotifications.ts +73 -0
- package/composables/usePublishValidation.ts +65 -0
- package/composables/useSanitize.ts +34 -0
- package/composables/useSiteName.ts +4 -0
- package/composables/useTheme.ts +34 -0
- package/composables/useToast.ts +35 -0
- package/error.vue +129 -0
- package/layouts/admin.vue +213 -0
- package/layouts/auth.vue +63 -0
- package/layouts/default.vue +269 -0
- package/layouts/editor.vue +129 -0
- package/middleware/auth.ts +6 -0
- package/nuxt.config.ts +83 -0
- package/package.json +59 -0
- package/pages/[type]/[slug]/edit.vue +676 -0
- package/pages/[type]/[slug]/index.vue +313 -0
- package/pages/[type]/index.vue +118 -0
- package/pages/about.vue +100 -0
- package/pages/admin/audit.vue +66 -0
- package/pages/admin/content.vue +116 -0
- package/pages/admin/federation.vue +446 -0
- package/pages/admin/index.vue +62 -0
- package/pages/admin/reports.vue +88 -0
- package/pages/admin/settings.vue +167 -0
- package/pages/admin/users.vue +145 -0
- package/pages/auth/forgot-password.vue +103 -0
- package/pages/auth/login.vue +216 -0
- package/pages/auth/oauth/authorize.vue +178 -0
- package/pages/auth/register.vue +246 -0
- package/pages/auth/reset-password.vue +124 -0
- package/pages/auth/verify-email.vue +80 -0
- package/pages/cert/[code].vue +154 -0
- package/pages/contests/[slug]/edit.vue +153 -0
- package/pages/contests/[slug]/index.vue +556 -0
- package/pages/contests/[slug]/judge.vue +160 -0
- package/pages/contests/create.vue +192 -0
- package/pages/contests/index.vue +69 -0
- package/pages/create.vue +219 -0
- package/pages/dashboard.vue +521 -0
- package/pages/docs/[siteSlug]/[...pagePath].vue +704 -0
- package/pages/docs/[siteSlug]/edit.vue +480 -0
- package/pages/docs/[siteSlug]/index.vue +380 -0
- package/pages/docs/create.vue +60 -0
- package/pages/docs/index.vue +181 -0
- package/pages/explore.vue +422 -0
- package/pages/federated-hubs/[id]/index.vue +385 -0
- package/pages/federated-hubs/[id]/posts/[postId].vue +309 -0
- package/pages/federation/index.vue +157 -0
- package/pages/federation/search.vue +43 -0
- package/pages/federation/users/[handle].vue +221 -0
- package/pages/feed.vue +135 -0
- package/pages/hubs/[slug]/index.vue +513 -0
- package/pages/hubs/[slug]/members.vue +134 -0
- package/pages/hubs/[slug]/posts/[postId].vue +352 -0
- package/pages/hubs/[slug]/settings.vue +254 -0
- package/pages/hubs/create.vue +201 -0
- package/pages/hubs/index.vue +207 -0
- package/pages/index.vue +1005 -0
- package/pages/learn/[slug]/[lessonSlug]/edit.vue +413 -0
- package/pages/learn/[slug]/[lessonSlug]/index.vue +438 -0
- package/pages/learn/[slug]/edit.vue +414 -0
- package/pages/learn/[slug]/index.vue +341 -0
- package/pages/learn/create.vue +71 -0
- package/pages/learn/index.vue +360 -0
- package/pages/messages/[conversationId].vue +113 -0
- package/pages/messages/index.vue +303 -0
- package/pages/mirror/[id].vue +115 -0
- package/pages/notifications.vue +91 -0
- package/pages/products/[slug].vue +128 -0
- package/pages/products/index.vue +122 -0
- package/pages/search.vue +692 -0
- package/pages/settings/account.vue +170 -0
- package/pages/settings/appearance.vue +80 -0
- package/pages/settings/index.vue +81 -0
- package/pages/settings/notifications.vue +68 -0
- package/pages/settings/profile.vue +838 -0
- package/pages/tags/[slug].vue +111 -0
- package/pages/tags/index.vue +73 -0
- package/pages/u/[username]/followers.vue +86 -0
- package/pages/u/[username]/following.vue +94 -0
- package/pages/u/[username]/index.vue +837 -0
- package/pages/videos/[id].vue +212 -0
- package/pages/videos/index.vue +327 -0
- package/pages/videos/submit.vue +112 -0
- package/plugins/auth.ts +23 -0
- package/server/api/admin/audit.get.ts +17 -0
- package/server/api/admin/content/[id].delete.ts +15 -0
- package/server/api/admin/content/[id].patch.ts +37 -0
- package/server/api/admin/federation/activity.get.ts +31 -0
- package/server/api/admin/federation/clients.get.ts +9 -0
- package/server/api/admin/federation/clients.post.ts +16 -0
- package/server/api/admin/federation/hub-mirrors/index.get.ts +10 -0
- package/server/api/admin/federation/hub-mirrors/index.post.ts +42 -0
- package/server/api/admin/federation/mirrors/[id]/backfill.post.ts +39 -0
- package/server/api/admin/federation/mirrors/[id].delete.ts +11 -0
- package/server/api/admin/federation/mirrors/[id].get.ts +15 -0
- package/server/api/admin/federation/mirrors/[id].put.ts +22 -0
- package/server/api/admin/federation/mirrors/index.get.ts +9 -0
- package/server/api/admin/federation/mirrors/index.post.ts +30 -0
- package/server/api/admin/federation/pending.get.ts +22 -0
- package/server/api/admin/federation/refederate.post.ts +92 -0
- package/server/api/admin/federation/repair-types.post.ts +57 -0
- package/server/api/admin/federation/retry.post.ts +41 -0
- package/server/api/admin/federation/stats.get.ts +26 -0
- package/server/api/admin/reports/[id]/resolve.post.ts +12 -0
- package/server/api/admin/reports.get.ts +17 -0
- package/server/api/admin/settings.get.ts +22 -0
- package/server/api/admin/settings.put.ts +11 -0
- package/server/api/admin/stats.get.ts +9 -0
- package/server/api/admin/users/[id]/role.put.ts +12 -0
- package/server/api/admin/users/[id]/status.put.ts +12 -0
- package/server/api/admin/users/[id].delete.ts +10 -0
- package/server/api/admin/users.get.ts +18 -0
- package/server/api/auth/federated/callback.get.ts +67 -0
- package/server/api/auth/federated/login.post.ts +60 -0
- package/server/api/auth/oauth2/authorize.get.ts +30 -0
- package/server/api/auth/oauth2/authorize.post.ts +51 -0
- package/server/api/auth/oauth2/register.post.ts +41 -0
- package/server/api/auth/oauth2/token.post.ts +48 -0
- package/server/api/cert/[code].get.ts +13 -0
- package/server/api/content/[id]/build.post.ts +9 -0
- package/server/api/content/[id]/fork.post.ts +10 -0
- package/server/api/content/[id]/index.delete.ts +18 -0
- package/server/api/content/[id]/index.get.ts +15 -0
- package/server/api/content/[id]/index.put.ts +23 -0
- package/server/api/content/[id]/products/[productId].delete.ts +28 -0
- package/server/api/content/[id]/products-sync.post.ts +29 -0
- package/server/api/content/[id]/products.get.ts +9 -0
- package/server/api/content/[id]/products.post.ts +31 -0
- package/server/api/content/[id]/publish.post.ts +17 -0
- package/server/api/content/[id]/report.post.ts +17 -0
- package/server/api/content/[id]/versions.get.ts +9 -0
- package/server/api/content/[id]/view.post.ts +34 -0
- package/server/api/content/index.get.ts +23 -0
- package/server/api/content/index.post.ts +11 -0
- package/server/api/contests/[slug]/entries.get.ts +18 -0
- package/server/api/contests/[slug]/entries.post.ts +23 -0
- package/server/api/contests/[slug]/index.delete.ts +21 -0
- package/server/api/contests/[slug]/index.get.ts +11 -0
- package/server/api/contests/[slug]/index.put.ts +15 -0
- package/server/api/contests/[slug]/judge.post.ts +12 -0
- package/server/api/contests/[slug]/transition.post.ts +24 -0
- package/server/api/contests/index.get.ts +10 -0
- package/server/api/contests/index.post.ts +28 -0
- package/server/api/docs/[siteSlug]/index.delete.ts +14 -0
- package/server/api/docs/[siteSlug]/index.get.ts +17 -0
- package/server/api/docs/[siteSlug]/index.put.ts +20 -0
- package/server/api/docs/[siteSlug]/nav.get.ts +26 -0
- package/server/api/docs/[siteSlug]/pages/[pageId].delete.ts +14 -0
- package/server/api/docs/[siteSlug]/pages/[pageId].get.ts +31 -0
- package/server/api/docs/[siteSlug]/pages/[pageId].put.ts +15 -0
- package/server/api/docs/[siteSlug]/pages/index.get.ts +34 -0
- package/server/api/docs/[siteSlug]/pages/index.post.ts +28 -0
- package/server/api/docs/[siteSlug]/pages/reorder.post.ts +26 -0
- package/server/api/docs/[siteSlug]/search.get.ts +20 -0
- package/server/api/docs/[siteSlug]/versions.post.ts +11 -0
- package/server/api/docs/index.get.ts +6 -0
- package/server/api/docs/index.post.ts +10 -0
- package/server/api/federated-hubs/[id]/posts/[postId].get.ts +16 -0
- package/server/api/federated-hubs/[id]/posts.get.ts +15 -0
- package/server/api/federated-hubs/[id].get.ts +16 -0
- package/server/api/federation/boost.post.ts +21 -0
- package/server/api/federation/content/[id].get.ts +15 -0
- package/server/api/federation/follow.post.ts +16 -0
- package/server/api/federation/health.get.ts +56 -0
- package/server/api/federation/hub-follow.post.ts +27 -0
- package/server/api/federation/hub-post-like.post.ts +115 -0
- package/server/api/federation/hub-post-likes.get.ts +24 -0
- package/server/api/federation/hub-post-reply.post.ts +42 -0
- package/server/api/federation/hub-post.post.ts +33 -0
- package/server/api/federation/like.post.ts +21 -0
- package/server/api/federation/remote-actor.get.ts +22 -0
- package/server/api/federation/reply.post.ts +22 -0
- package/server/api/federation/search.post.ts +17 -0
- package/server/api/federation/timeline.get.ts +22 -0
- package/server/api/federation/unfollow.post.ts +17 -0
- package/server/api/files/[id].delete.ts +35 -0
- package/server/api/files/mine.get.ts +31 -0
- package/server/api/files/upload-from-url.post.ts +68 -0
- package/server/api/files/upload.post.ts +105 -0
- package/server/api/health.get.ts +4 -0
- package/server/api/hubs/[slug]/bans/[userId].delete.ts +13 -0
- package/server/api/hubs/[slug]/bans.get.ts +20 -0
- package/server/api/hubs/[slug]/bans.post.ts +23 -0
- package/server/api/hubs/[slug]/feed.xml.get.ts +60 -0
- package/server/api/hubs/[slug]/gallery.get.ts +21 -0
- package/server/api/hubs/[slug]/index.delete.ts +18 -0
- package/server/api/hubs/[slug]/index.get.ts +14 -0
- package/server/api/hubs/[slug]/index.put.ts +22 -0
- package/server/api/hubs/[slug]/invites.get.ts +20 -0
- package/server/api/hubs/[slug]/invites.post.ts +27 -0
- package/server/api/hubs/[slug]/join.post.ts +17 -0
- package/server/api/hubs/[slug]/leave.post.ts +13 -0
- package/server/api/hubs/[slug]/members/[userId].delete.ts +13 -0
- package/server/api/hubs/[slug]/members/[userId].put.ts +16 -0
- package/server/api/hubs/[slug]/members.get.ts +20 -0
- package/server/api/hubs/[slug]/posts/[postId]/like.post.ts +21 -0
- package/server/api/hubs/[slug]/posts/[postId]/lock.post.ts +17 -0
- package/server/api/hubs/[slug]/posts/[postId]/pin.post.ts +17 -0
- package/server/api/hubs/[slug]/posts/[postId]/replies.get.ts +16 -0
- package/server/api/hubs/[slug]/posts/[postId]/replies.post.ts +21 -0
- package/server/api/hubs/[slug]/posts/[postId].delete.ts +23 -0
- package/server/api/hubs/[slug]/posts/[postId].get.ts +16 -0
- package/server/api/hubs/[slug]/posts/index.get.ts +16 -0
- package/server/api/hubs/[slug]/posts/index.post.ts +36 -0
- package/server/api/hubs/[slug]/products.get.ts +26 -0
- package/server/api/hubs/[slug]/products.post.ts +18 -0
- package/server/api/hubs/[slug]/share.post.ts +39 -0
- package/server/api/hubs/index.get.ts +15 -0
- package/server/api/hubs/index.post.ts +11 -0
- package/server/api/image-proxy.get.ts +91 -0
- package/server/api/learn/[slug]/[lessonSlug]/complete.post.ts +13 -0
- package/server/api/learn/[slug]/[lessonSlug]/index.get.ts +68 -0
- package/server/api/learn/[slug]/enroll.post.ts +12 -0
- package/server/api/learn/[slug]/index.delete.ts +12 -0
- package/server/api/learn/[slug]/index.get.ts +14 -0
- package/server/api/learn/[slug]/index.put.ts +19 -0
- package/server/api/learn/[slug]/lessons/[lessonId].delete.ts +14 -0
- package/server/api/learn/[slug]/lessons/[lessonId].put.ts +24 -0
- package/server/api/learn/[slug]/lessons.post.ts +10 -0
- package/server/api/learn/[slug]/modules/[moduleId].delete.ts +14 -0
- package/server/api/learn/[slug]/modules/[moduleId].put.ts +15 -0
- package/server/api/learn/[slug]/modules.post.ts +14 -0
- package/server/api/learn/[slug]/publish.post.ts +13 -0
- package/server/api/learn/[slug]/unenroll.post.ts +12 -0
- package/server/api/learn/certificates.get.ts +9 -0
- package/server/api/learn/enrollments.get.ts +9 -0
- package/server/api/learn/index.get.ts +17 -0
- package/server/api/learn/index.post.ts +11 -0
- package/server/api/me.get.ts +13 -0
- package/server/api/messages/[conversationId]/info.get.ts +43 -0
- package/server/api/messages/[conversationId]/stream.get.ts +73 -0
- package/server/api/messages/[conversationId].get.ts +13 -0
- package/server/api/messages/[conversationId].post.ts +12 -0
- package/server/api/messages/index.get.ts +39 -0
- package/server/api/messages/index.post.ts +58 -0
- package/server/api/notifications/[id].delete.ts +11 -0
- package/server/api/notifications/count.get.ts +10 -0
- package/server/api/notifications/index.get.ts +24 -0
- package/server/api/notifications/read.post.ts +15 -0
- package/server/api/notifications/stream.get.ts +59 -0
- package/server/api/openapi.get.ts +5 -0
- package/server/api/products/[id].delete.ts +15 -0
- package/server/api/products/[id].put.ts +18 -0
- package/server/api/products/[slug]/content.get.ts +21 -0
- package/server/api/products/[slug].get.ts +16 -0
- package/server/api/products/index.get.ts +28 -0
- package/server/api/profile.get.ts +15 -0
- package/server/api/profile.put.ts +24 -0
- package/server/api/resolve-identity.post.ts +34 -0
- package/server/api/search/index.get.ts +24 -0
- package/server/api/search/trending.get.ts +22 -0
- package/server/api/social/bookmark.get.ts +16 -0
- package/server/api/social/bookmark.post.ts +15 -0
- package/server/api/social/bookmarks.get.ts +16 -0
- package/server/api/social/comments/[id].delete.ts +13 -0
- package/server/api/social/comments.get.ts +18 -0
- package/server/api/social/comments.post.ts +11 -0
- package/server/api/social/like.get.ts +17 -0
- package/server/api/social/like.post.ts +35 -0
- package/server/api/stats.get.ts +8 -0
- package/server/api/user/hubs.get.ts +22 -0
- package/server/api/users/[username]/content.get.ts +21 -0
- package/server/api/users/[username]/feed.xml.get.ts +65 -0
- package/server/api/users/[username]/follow.delete.ts +15 -0
- package/server/api/users/[username]/follow.post.ts +15 -0
- package/server/api/users/[username]/followers.get.ts +22 -0
- package/server/api/users/[username]/following.get.ts +22 -0
- package/server/api/users/[username]/learning.get.ts +18 -0
- package/server/api/users/[username].get.ts +25 -0
- package/server/api/users/index.get.ts +78 -0
- package/server/api/videos/[id].get.ts +18 -0
- package/server/api/videos/categories/[id].delete.ts +15 -0
- package/server/api/videos/categories/[id].put.ts +17 -0
- package/server/api/videos/categories.get.ts +7 -0
- package/server/api/videos/categories.post.ts +11 -0
- package/server/api/videos/index.get.ts +20 -0
- package/server/api/videos/index.post.ts +11 -0
- package/server/middleware/auth.ts +180 -0
- package/server/middleware/features.ts +31 -0
- package/server/middleware/security.ts +54 -0
- package/server/plugins/auto-admin.ts +69 -0
- package/server/plugins/federation-delivery.ts +74 -0
- package/server/routes/.well-known/nodeinfo.ts +15 -0
- package/server/routes/.well-known/webfinger.ts +86 -0
- package/server/routes/actor/followers.ts +34 -0
- package/server/routes/actor/following.ts +34 -0
- package/server/routes/actor/outbox.ts +31 -0
- package/server/routes/actor.ts +30 -0
- package/server/routes/feed.xml.ts +59 -0
- package/server/routes/hubs/[slug]/followers.ts +39 -0
- package/server/routes/hubs/[slug]/inbox.ts +35 -0
- package/server/routes/hubs/[slug]/outbox.ts +43 -0
- package/server/routes/hubs/[slug]/posts/[postId].ts +63 -0
- package/server/routes/hubs/[slug].ts +29 -0
- package/server/routes/inbox.ts +34 -0
- package/server/routes/nodeinfo/2.1.ts +27 -0
- package/server/routes/robots.txt.ts +19 -0
- package/server/routes/sitemap.xml.ts +105 -0
- package/server/routes/users/[username]/followers.ts +33 -0
- package/server/routes/users/[username]/following.ts +33 -0
- package/server/routes/users/[username]/inbox.ts +34 -0
- package/server/routes/users/[username]/outbox.ts +35 -0
- package/server/routes/users/[username].ts +62 -0
- package/server/utils/auth.ts +36 -0
- package/server/utils/db.ts +34 -0
- package/server/utils/errors.ts +24 -0
- package/server/utils/inbox.ts +122 -0
- package/server/utils/validate.ts +82 -0
- package/theme/base.css +283 -0
- package/theme/components.css +322 -0
- package/theme/dark.css +87 -0
- package/theme/editor-panels.css +63 -0
- package/theme/forms.css +216 -0
- package/theme/generics.css +68 -0
- package/theme/layouts.css +415 -0
- package/theme/prose.css +342 -0
- package/types/hub.ts +61 -0
|
@@ -0,0 +1,414 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
definePageMeta({ middleware: 'auth' });
|
|
3
|
+
|
|
4
|
+
const route = useRoute();
|
|
5
|
+
const slug = computed(() => route.params.slug as string);
|
|
6
|
+
const toast = useToast();
|
|
7
|
+
|
|
8
|
+
import type { Serialized, LearningPathDetail } from '@commonpub/server';
|
|
9
|
+
|
|
10
|
+
type PathLesson = NonNullable<Serialized<LearningPathDetail>['modules']>[number]['lessons'][number] & {
|
|
11
|
+
contentItemId?: string | null;
|
|
12
|
+
content?: unknown;
|
|
13
|
+
};
|
|
14
|
+
type PathModule = Omit<NonNullable<Serialized<LearningPathDetail>['modules']>[number], 'lessons'> & {
|
|
15
|
+
lessons: PathLesson[];
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const { data: path, pending: pathPending, error: pathError, refresh } = useLazyFetch<Serialized<LearningPathDetail>>(() => `/api/learn/${slug.value}`);
|
|
19
|
+
|
|
20
|
+
useSeoMeta({ title: () => `Edit ${path.value?.title ?? 'Path'} — ${useSiteName()}` });
|
|
21
|
+
|
|
22
|
+
const saving = ref(false);
|
|
23
|
+
const publishing = ref(false);
|
|
24
|
+
const savingMeta = ref(false);
|
|
25
|
+
const newModuleTitle = ref('');
|
|
26
|
+
const newLessonTitle = ref<Record<string, string>>({});
|
|
27
|
+
const newLessonType = ref<Record<string, string>>({});
|
|
28
|
+
|
|
29
|
+
// Path metadata editing
|
|
30
|
+
const editTitle = ref('');
|
|
31
|
+
const editDescription = ref('');
|
|
32
|
+
const editDifficulty = ref('beginner');
|
|
33
|
+
const editEstimatedHours = ref(0);
|
|
34
|
+
|
|
35
|
+
watch(() => path.value, (p) => {
|
|
36
|
+
if (!p) return;
|
|
37
|
+
editTitle.value = p.title ?? '';
|
|
38
|
+
editDescription.value = p.description ?? '';
|
|
39
|
+
editDifficulty.value = p.difficulty ?? 'beginner';
|
|
40
|
+
editEstimatedHours.value = Number(p.estimatedHours) || 0;
|
|
41
|
+
}, { immediate: true });
|
|
42
|
+
|
|
43
|
+
async function saveMetadata(): Promise<void> {
|
|
44
|
+
savingMeta.value = true;
|
|
45
|
+
try {
|
|
46
|
+
await ($fetch as Function)(`/api/learn/${slug.value}`, {
|
|
47
|
+
method: 'PUT',
|
|
48
|
+
body: {
|
|
49
|
+
title: editTitle.value,
|
|
50
|
+
description: editDescription.value,
|
|
51
|
+
difficulty: editDifficulty.value,
|
|
52
|
+
estimatedHours: editEstimatedHours.value || undefined,
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
toast.success('Path details updated');
|
|
56
|
+
await refresh();
|
|
57
|
+
} catch {
|
|
58
|
+
toast.error('Failed to update path details');
|
|
59
|
+
} finally {
|
|
60
|
+
savingMeta.value = false;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const lessonTypes = ['article', 'video', 'quiz', 'project', 'explainer'] as const;
|
|
65
|
+
|
|
66
|
+
// Content linking
|
|
67
|
+
const showContentPicker = ref(false);
|
|
68
|
+
const linkingModuleId = ref<string | null>(null);
|
|
69
|
+
|
|
70
|
+
function openPicker(moduleId: string): void {
|
|
71
|
+
linkingModuleId.value = moduleId;
|
|
72
|
+
showContentPicker.value = true;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
async function linkContent(item: { id: string; title: string; slug: string; type: string }): Promise<void> {
|
|
76
|
+
if (!linkingModuleId.value) return;
|
|
77
|
+
saving.value = true;
|
|
78
|
+
try {
|
|
79
|
+
await $fetch(`/api/learn/${slug.value}/lessons`, {
|
|
80
|
+
method: 'POST',
|
|
81
|
+
body: {
|
|
82
|
+
moduleId: linkingModuleId.value,
|
|
83
|
+
title: item.title,
|
|
84
|
+
type: item.type,
|
|
85
|
+
contentItemId: item.id,
|
|
86
|
+
},
|
|
87
|
+
});
|
|
88
|
+
toast.success('Content linked as lesson');
|
|
89
|
+
await refresh();
|
|
90
|
+
} catch {
|
|
91
|
+
toast.error('Failed to link content');
|
|
92
|
+
} finally {
|
|
93
|
+
saving.value = false;
|
|
94
|
+
linkingModuleId.value = null;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
async function addModule(): Promise<void> {
|
|
99
|
+
if (!newModuleTitle.value.trim()) return;
|
|
100
|
+
saving.value = true;
|
|
101
|
+
try {
|
|
102
|
+
await $fetch(`/api/learn/${slug.value}/modules`, {
|
|
103
|
+
method: 'POST',
|
|
104
|
+
body: { title: newModuleTitle.value.trim() },
|
|
105
|
+
});
|
|
106
|
+
newModuleTitle.value = '';
|
|
107
|
+
toast.success('Module added');
|
|
108
|
+
await refresh();
|
|
109
|
+
} catch {
|
|
110
|
+
toast.error('Failed to add module');
|
|
111
|
+
} finally {
|
|
112
|
+
saving.value = false;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
async function addLesson(moduleId: string): Promise<void> {
|
|
117
|
+
const title = newLessonTitle.value[moduleId]?.trim();
|
|
118
|
+
if (!title) return;
|
|
119
|
+
saving.value = true;
|
|
120
|
+
try {
|
|
121
|
+
await $fetch(`/api/learn/${slug.value}/lessons`, {
|
|
122
|
+
method: 'POST',
|
|
123
|
+
body: { moduleId, title, type: newLessonType.value[moduleId] || 'article' },
|
|
124
|
+
});
|
|
125
|
+
newLessonTitle.value[moduleId] = '';
|
|
126
|
+
newLessonType.value[moduleId] = '';
|
|
127
|
+
toast.success('Lesson added');
|
|
128
|
+
await refresh();
|
|
129
|
+
} catch {
|
|
130
|
+
toast.error('Failed to add lesson');
|
|
131
|
+
} finally {
|
|
132
|
+
saving.value = false;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
async function updateModuleTitle(mod: PathModule, newTitle: string): Promise<void> {
|
|
137
|
+
if (!newTitle.trim() || newTitle === mod.title) return;
|
|
138
|
+
try {
|
|
139
|
+
await $fetch(`/api/learn/${slug.value}/modules/${mod.id}`, {
|
|
140
|
+
method: 'PUT',
|
|
141
|
+
body: { title: newTitle.trim() },
|
|
142
|
+
});
|
|
143
|
+
toast.success('Module updated');
|
|
144
|
+
await refresh();
|
|
145
|
+
} catch {
|
|
146
|
+
toast.error('Failed to update module');
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
async function removeModule(moduleId: string): Promise<void> {
|
|
151
|
+
if (!confirm('Delete this module and all its lessons?')) return;
|
|
152
|
+
try {
|
|
153
|
+
await $fetch(`/api/learn/${slug.value}/modules/${moduleId}`, { method: 'DELETE' });
|
|
154
|
+
toast.success('Module deleted');
|
|
155
|
+
await refresh();
|
|
156
|
+
} catch {
|
|
157
|
+
toast.error('Failed to delete module');
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
async function deletePath(): Promise<void> {
|
|
162
|
+
if (!confirm('Delete this entire learning path? All modules, lessons, and enrollments will be permanently deleted.')) return;
|
|
163
|
+
try {
|
|
164
|
+
await ($fetch as Function)(`/api/learn/${slug.value}`, { method: 'DELETE' });
|
|
165
|
+
toast.success('Learning path deleted');
|
|
166
|
+
await navigateTo('/learn');
|
|
167
|
+
} catch {
|
|
168
|
+
toast.error('Failed to delete path');
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
async function removeLesson(lessonId: string): Promise<void> {
|
|
173
|
+
if (!confirm('Delete this lesson?')) return;
|
|
174
|
+
try {
|
|
175
|
+
await $fetch(`/api/learn/${slug.value}/lessons/${lessonId}`, { method: 'DELETE' });
|
|
176
|
+
toast.success('Lesson deleted');
|
|
177
|
+
await refresh();
|
|
178
|
+
} catch {
|
|
179
|
+
toast.error('Failed to delete lesson');
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
async function handlePublish(): Promise<void> {
|
|
184
|
+
publishing.value = true;
|
|
185
|
+
try {
|
|
186
|
+
await $fetch(`/api/learn/${slug.value}/publish`, { method: 'POST' });
|
|
187
|
+
toast.success('Path published!');
|
|
188
|
+
await refresh();
|
|
189
|
+
} catch {
|
|
190
|
+
toast.error('Failed to publish path');
|
|
191
|
+
} finally {
|
|
192
|
+
publishing.value = false;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
</script>
|
|
196
|
+
|
|
197
|
+
<template>
|
|
198
|
+
<div v-if="pathPending" class="cpub-loading">Loading path editor...</div>
|
|
199
|
+
<div v-else-if="pathError" class="cpub-fetch-error">
|
|
200
|
+
<div class="cpub-fetch-error-icon"><i class="fa-solid fa-triangle-exclamation"></i></div>
|
|
201
|
+
<div class="cpub-fetch-error-msg">{{ pathError.statusMessage || 'Failed to load learning path.' }}</div>
|
|
202
|
+
<button class="cpub-btn cpub-btn-sm" @click="refresh()">Retry</button>
|
|
203
|
+
</div>
|
|
204
|
+
<div v-else-if="path" class="cpub-path-edit">
|
|
205
|
+
<div class="cpub-edit-header">
|
|
206
|
+
<NuxtLink :to="`/learn/${slug}`" class="cpub-back-link">
|
|
207
|
+
<i class="fa-solid fa-arrow-left"></i> Back to path
|
|
208
|
+
</NuxtLink>
|
|
209
|
+
<div class="cpub-edit-header-row">
|
|
210
|
+
<div>
|
|
211
|
+
<h1 class="cpub-edit-title">Edit: {{ path.title }}</h1>
|
|
212
|
+
<p class="cpub-edit-subtitle">
|
|
213
|
+
Manage modules and lessons
|
|
214
|
+
<span class="cpub-status-badge" :class="path.status === 'published' ? 'cpub-status-published' : 'cpub-status-draft'">
|
|
215
|
+
{{ path.status }}
|
|
216
|
+
</span>
|
|
217
|
+
</p>
|
|
218
|
+
</div>
|
|
219
|
+
<div style="display: flex; gap: 8px;">
|
|
220
|
+
<button
|
|
221
|
+
class="cpub-btn cpub-btn-primary"
|
|
222
|
+
:disabled="publishing"
|
|
223
|
+
@click="handlePublish"
|
|
224
|
+
>
|
|
225
|
+
<i class="fa-solid fa-rocket"></i> {{ publishing ? 'Publishing...' : 'Publish' }}
|
|
226
|
+
</button>
|
|
227
|
+
<button class="cpub-btn" style="color: var(--red); border-color: var(--red-border);" @click="deletePath">
|
|
228
|
+
<i class="fa-solid fa-trash"></i>
|
|
229
|
+
</button>
|
|
230
|
+
</div>
|
|
231
|
+
</div>
|
|
232
|
+
</div>
|
|
233
|
+
|
|
234
|
+
<!-- Path Metadata -->
|
|
235
|
+
<div class="cpub-meta-section">
|
|
236
|
+
<h2 class="cpub-meta-section-title">Path Details</h2>
|
|
237
|
+
<div class="cpub-meta-form">
|
|
238
|
+
<div class="cpub-meta-field">
|
|
239
|
+
<label class="cpub-meta-label">Title</label>
|
|
240
|
+
<input v-model="editTitle" type="text" class="cpub-meta-input" />
|
|
241
|
+
</div>
|
|
242
|
+
<div class="cpub-meta-field">
|
|
243
|
+
<label class="cpub-meta-label">Description</label>
|
|
244
|
+
<textarea v-model="editDescription" class="cpub-meta-textarea" rows="3" placeholder="What will learners gain?" />
|
|
245
|
+
</div>
|
|
246
|
+
<div class="cpub-meta-row">
|
|
247
|
+
<div class="cpub-meta-field">
|
|
248
|
+
<label class="cpub-meta-label">Difficulty</label>
|
|
249
|
+
<select v-model="editDifficulty" class="cpub-meta-select">
|
|
250
|
+
<option value="beginner">Beginner</option>
|
|
251
|
+
<option value="intermediate">Intermediate</option>
|
|
252
|
+
<option value="advanced">Advanced</option>
|
|
253
|
+
</select>
|
|
254
|
+
</div>
|
|
255
|
+
<div class="cpub-meta-field">
|
|
256
|
+
<label class="cpub-meta-label">Est. Hours</label>
|
|
257
|
+
<input v-model.number="editEstimatedHours" type="number" min="0" class="cpub-meta-input" />
|
|
258
|
+
</div>
|
|
259
|
+
</div>
|
|
260
|
+
<button class="cpub-btn cpub-btn-sm" :disabled="savingMeta" @click="saveMetadata">
|
|
261
|
+
{{ savingMeta ? 'Saving...' : 'Save Details' }}
|
|
262
|
+
</button>
|
|
263
|
+
</div>
|
|
264
|
+
</div>
|
|
265
|
+
|
|
266
|
+
<!-- Modules -->
|
|
267
|
+
<div class="cpub-modules-list">
|
|
268
|
+
<div v-for="mod in (path.modules ?? [])" :key="mod.id" class="cpub-module-card">
|
|
269
|
+
<div class="cpub-module-header">
|
|
270
|
+
<input
|
|
271
|
+
:value="mod.title"
|
|
272
|
+
class="cpub-module-title-input"
|
|
273
|
+
@blur="updateModuleTitle(mod, ($event.target as HTMLInputElement).value)"
|
|
274
|
+
@keyup.enter="($event.target as HTMLInputElement).blur()"
|
|
275
|
+
/>
|
|
276
|
+
<span class="cpub-module-count">{{ mod.lessons?.length ?? 0 }} lessons</span>
|
|
277
|
+
<button class="cpub-delete-btn" aria-label="Delete module" @click="removeModule(mod.id)">
|
|
278
|
+
<i class="fa-solid fa-xmark"></i>
|
|
279
|
+
</button>
|
|
280
|
+
</div>
|
|
281
|
+
|
|
282
|
+
<!-- Lessons in this module -->
|
|
283
|
+
<div class="cpub-lessons-list">
|
|
284
|
+
<div v-for="lesson in ((mod.lessons ?? []) as PathLesson[])" :key="lesson.id" class="cpub-lesson-row">
|
|
285
|
+
<i class="fa-solid fa-grip-vertical cpub-lesson-grip"></i>
|
|
286
|
+
<span class="cpub-lesson-type-badge">{{ lesson.type }}</span>
|
|
287
|
+
<span v-if="lesson.contentItemId" class="cpub-lesson-linked-badge" title="Linked to content"><i class="fa-solid fa-link"></i></span>
|
|
288
|
+
<span class="cpub-lesson-title">{{ lesson.title }}</span>
|
|
289
|
+
<span v-if="!lesson.content && !lesson.contentItemId" class="cpub-lesson-empty-badge">empty</span>
|
|
290
|
+
<NuxtLink :to="`/learn/${slug}/${lesson.slug}/edit`" class="cpub-lesson-edit-btn" aria-label="Edit lesson content">
|
|
291
|
+
<i class="fa-solid fa-pen"></i>
|
|
292
|
+
</NuxtLink>
|
|
293
|
+
<button class="cpub-delete-btn cpub-delete-btn-sm" aria-label="Delete lesson" @click="removeLesson(lesson.id)">
|
|
294
|
+
<i class="fa-solid fa-xmark"></i>
|
|
295
|
+
</button>
|
|
296
|
+
</div>
|
|
297
|
+
|
|
298
|
+
<!-- Add lesson -->
|
|
299
|
+
<div class="cpub-add-lesson">
|
|
300
|
+
<select v-model="newLessonType[mod.id]" class="cpub-type-select" aria-label="Lesson type">
|
|
301
|
+
<option value="">Type</option>
|
|
302
|
+
<option v-for="lt in lessonTypes" :key="lt" :value="lt">{{ lt }}</option>
|
|
303
|
+
</select>
|
|
304
|
+
<input
|
|
305
|
+
v-model="newLessonTitle[mod.id]"
|
|
306
|
+
type="text"
|
|
307
|
+
class="cpub-add-input"
|
|
308
|
+
placeholder="New lesson title..."
|
|
309
|
+
@keyup.enter="addLesson(mod.id)"
|
|
310
|
+
/>
|
|
311
|
+
<button class="cpub-add-btn" :disabled="saving" @click="addLesson(mod.id)" aria-label="Add inline lesson">
|
|
312
|
+
<i class="fa-solid fa-plus"></i>
|
|
313
|
+
</button>
|
|
314
|
+
<button class="cpub-link-btn" :disabled="saving" @click="openPicker(mod.id)" aria-label="Link existing content">
|
|
315
|
+
<i class="fa-solid fa-link"></i> Link Content
|
|
316
|
+
</button>
|
|
317
|
+
</div>
|
|
318
|
+
</div>
|
|
319
|
+
</div>
|
|
320
|
+
|
|
321
|
+
<div v-if="!path.modules?.length" class="cpub-empty-modules">
|
|
322
|
+
<p>No modules yet. Add one to get started.</p>
|
|
323
|
+
</div>
|
|
324
|
+
</div>
|
|
325
|
+
|
|
326
|
+
<!-- Add module -->
|
|
327
|
+
<div class="cpub-add-module">
|
|
328
|
+
<input
|
|
329
|
+
v-model="newModuleTitle"
|
|
330
|
+
type="text"
|
|
331
|
+
class="cpub-add-module-input"
|
|
332
|
+
placeholder="New module title..."
|
|
333
|
+
@keyup.enter="addModule"
|
|
334
|
+
/>
|
|
335
|
+
<button class="cpub-btn cpub-btn-primary" :disabled="saving || !newModuleTitle.trim()" @click="addModule">
|
|
336
|
+
<i class="fa-solid fa-plus"></i> Add Module
|
|
337
|
+
</button>
|
|
338
|
+
</div>
|
|
339
|
+
</div>
|
|
340
|
+
<div v-else class="cpub-empty-state" style="padding: 64px 24px; text-align: center;">
|
|
341
|
+
<p>Learning path not found</p>
|
|
342
|
+
</div>
|
|
343
|
+
|
|
344
|
+
<ContentPicker
|
|
345
|
+
:open="showContentPicker"
|
|
346
|
+
:types="['article', 'project', 'explainer', 'blog']"
|
|
347
|
+
@update:open="showContentPicker = $event"
|
|
348
|
+
@select="linkContent"
|
|
349
|
+
/>
|
|
350
|
+
</template>
|
|
351
|
+
|
|
352
|
+
<style scoped>
|
|
353
|
+
.cpub-path-edit { max-width: 700px; margin: 0 auto; padding: 32px; }
|
|
354
|
+
.cpub-edit-header { margin-bottom: 32px; }
|
|
355
|
+
.cpub-edit-header-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
|
|
356
|
+
.cpub-back-link { font-size: 11px; font-family: var(--font-mono); color: var(--text-faint); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; margin-bottom: 16px; }
|
|
357
|
+
.cpub-back-link:hover { color: var(--accent); }
|
|
358
|
+
.cpub-edit-title { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
|
|
359
|
+
.cpub-edit-subtitle { font-size: 13px; color: var(--text-dim); display: flex; align-items: center; gap: 8px; }
|
|
360
|
+
|
|
361
|
+
.cpub-status-badge { font-size: 10px; font-family: var(--font-mono); text-transform: uppercase; padding: 2px 8px; letter-spacing: 0.06em; }
|
|
362
|
+
.cpub-status-draft { background: var(--surface3); color: var(--text-faint); border: var(--border-width-default) solid var(--border2); }
|
|
363
|
+
.cpub-status-published { background: var(--green-bg); color: var(--green); border: var(--border-width-default) solid var(--green-border); }
|
|
364
|
+
|
|
365
|
+
.cpub-meta-section { background: var(--surface); border: var(--border-width-default) solid var(--border); padding: 16px 20px; margin-bottom: 24px; box-shadow: var(--shadow-md); }
|
|
366
|
+
.cpub-meta-section-title { font-size: 13px; font-weight: 700; margin-bottom: 12px; }
|
|
367
|
+
.cpub-meta-form { display: flex; flex-direction: column; gap: 10px; }
|
|
368
|
+
.cpub-meta-field { display: flex; flex-direction: column; gap: 3px; }
|
|
369
|
+
.cpub-meta-label { font-size: 10px; font-weight: 600; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); }
|
|
370
|
+
.cpub-meta-input, .cpub-meta-textarea, .cpub-meta-select { padding: 6px 10px; border: var(--border-width-default) solid var(--border); background: var(--surface); color: var(--text); font-size: 13px; }
|
|
371
|
+
.cpub-meta-input:focus, .cpub-meta-textarea:focus, .cpub-meta-select:focus { border-color: var(--accent); outline: none; }
|
|
372
|
+
.cpub-meta-textarea { resize: vertical; font-family: inherit; }
|
|
373
|
+
.cpub-meta-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
|
|
374
|
+
|
|
375
|
+
.cpub-modules-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }
|
|
376
|
+
|
|
377
|
+
.cpub-module-card { background: var(--surface); border: var(--border-width-default) solid var(--border); box-shadow: var(--shadow-md); }
|
|
378
|
+
|
|
379
|
+
.cpub-module-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: var(--border-width-default) solid var(--border); background: var(--surface2); gap: 8px; }
|
|
380
|
+
.cpub-module-title-input { font-size: 14px; font-weight: 600; background: none; border: var(--border-width-default) solid transparent; padding: 4px 8px; color: var(--text); outline: none; flex: 1; }
|
|
381
|
+
.cpub-module-title-input:focus { border-color: var(--accent); background: var(--surface); }
|
|
382
|
+
.cpub-module-count { font-size: 10px; font-family: var(--font-mono); color: var(--text-faint); flex-shrink: 0; }
|
|
383
|
+
|
|
384
|
+
.cpub-lessons-list { padding: 8px 0; }
|
|
385
|
+
.cpub-lesson-row { display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-bottom: var(--border-width-default) solid var(--border2); }
|
|
386
|
+
.cpub-lesson-row:last-child { border-bottom: none; }
|
|
387
|
+
.cpub-lesson-grip { color: var(--text-faint); font-size: 10px; cursor: grab; }
|
|
388
|
+
.cpub-lesson-type-badge { font-size: 9px; font-family: var(--font-mono); text-transform: uppercase; padding: 1px 6px; border: var(--border-width-default) solid var(--border2); color: var(--text-faint); background: var(--surface2); }
|
|
389
|
+
.cpub-lesson-title { font-size: 13px; color: var(--text); flex: 1; }
|
|
390
|
+
.cpub-lesson-empty-badge { font-size: 9px; font-family: var(--font-mono); color: var(--yellow); background: var(--yellow-bg); border: var(--border-width-default) solid var(--yellow-border); padding: 1px 6px; text-transform: uppercase; }
|
|
391
|
+
.cpub-lesson-edit-btn { font-size: 10px; color: var(--text-faint); padding: 3px 6px; border: var(--border-width-default) solid var(--border2); text-decoration: none; }
|
|
392
|
+
.cpub-lesson-edit-btn:hover { color: var(--accent); border-color: var(--accent); }
|
|
393
|
+
|
|
394
|
+
.cpub-add-lesson { display: flex; gap: 0; padding: 8px 16px; }
|
|
395
|
+
.cpub-type-select { padding: 6px 8px; border: var(--border-width-default) solid var(--border); background: var(--surface); color: var(--text-dim); font-size: 11px; font-family: var(--font-mono); outline: none; min-width: 80px; }
|
|
396
|
+
.cpub-type-select:focus { border-color: var(--accent); }
|
|
397
|
+
.cpub-add-input { flex: 1; padding: 6px 10px; border: var(--border-width-default) solid var(--border); border-left: none; background: var(--surface); color: var(--text); font-size: 12px; outline: none; }
|
|
398
|
+
.cpub-add-input:focus { border-color: var(--accent); }
|
|
399
|
+
.cpub-add-input::placeholder { color: var(--text-faint); }
|
|
400
|
+
.cpub-add-btn { padding: 6px 10px; background: var(--accent); color: var(--color-text-inverse); border: var(--border-width-default) solid var(--accent); border-left: none; font-size: 11px; cursor: pointer; }
|
|
401
|
+
.cpub-add-btn:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
402
|
+
.cpub-link-btn { padding: 6px 10px; background: var(--surface2); color: var(--text-dim); border: var(--border-width-default) solid var(--border); font-size: 10px; font-family: var(--font-mono); cursor: pointer; display: flex; align-items: center; gap: 5px; margin-left: 4px; }
|
|
403
|
+
.cpub-link-btn:hover { border-color: var(--accent); color: var(--accent); }
|
|
404
|
+
.cpub-link-btn:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
405
|
+
.cpub-lesson-linked-badge { font-size: 9px; color: var(--teal); display: flex; align-items: center; flex-shrink: 0; }
|
|
406
|
+
|
|
407
|
+
.cpub-empty-modules { text-align: center; padding: 32px; color: var(--text-faint); font-size: 13px; }
|
|
408
|
+
|
|
409
|
+
.cpub-add-module { display: flex; gap: 10px; align-items: center; }
|
|
410
|
+
.cpub-add-module-input { flex: 1; padding: 8px 12px; border: var(--border-width-default) solid var(--border); background: var(--surface); color: var(--text); font-size: 13px; outline: none; }
|
|
411
|
+
.cpub-add-module-input:focus { border-color: var(--accent); }
|
|
412
|
+
.cpub-add-module-input::placeholder { color: var(--text-faint); }
|
|
413
|
+
|
|
414
|
+
</style>
|