@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,413 @@
|
|
|
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 lessonSlug = computed(() => route.params.lessonSlug as string);
|
|
7
|
+
const toast = useToast();
|
|
8
|
+
|
|
9
|
+
// Fetch lesson data
|
|
10
|
+
interface LessonResponse {
|
|
11
|
+
lesson: { id: string; title: string; slug: string; type: string; content: unknown; contentItemId: string | null; duration: number | null; moduleId: string };
|
|
12
|
+
module: { id: string; title: string };
|
|
13
|
+
pathId: string;
|
|
14
|
+
linkedContent?: { id: string; title: string; slug: string; type: string };
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const { data: lessonData, pending: lessonPending, error: lessonError, refresh } = useLazyFetch<LessonResponse>(
|
|
18
|
+
() => `/api/learn/${slug.value}/${lessonSlug.value}`,
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
useSeoMeta({
|
|
22
|
+
title: () => lessonData.value ? `Edit: ${lessonData.value.lesson.title} — ${useSiteName()}` : `Edit Lesson — ${useSiteName()}`,
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
const lesson = computed(() => lessonData.value?.lesson);
|
|
26
|
+
const saving = ref(false);
|
|
27
|
+
|
|
28
|
+
// Editable fields
|
|
29
|
+
const editTitle = ref('');
|
|
30
|
+
const editType = ref('article');
|
|
31
|
+
const editDuration = ref(0);
|
|
32
|
+
const editContent = ref<unknown>(null);
|
|
33
|
+
|
|
34
|
+
// Article/text content as markdown string
|
|
35
|
+
const editMarkdown = ref('');
|
|
36
|
+
|
|
37
|
+
// Video URL
|
|
38
|
+
const editVideoUrl = ref('');
|
|
39
|
+
|
|
40
|
+
// Quiz data
|
|
41
|
+
interface QuizQuestion {
|
|
42
|
+
question: string;
|
|
43
|
+
options: string[];
|
|
44
|
+
correctIndex: number;
|
|
45
|
+
explanation: string;
|
|
46
|
+
}
|
|
47
|
+
const editQuiz = ref<QuizQuestion[]>([]);
|
|
48
|
+
|
|
49
|
+
const lessonTypes = ['article', 'video', 'quiz', 'project', 'explainer'] as const;
|
|
50
|
+
|
|
51
|
+
// Initialize form from lesson data
|
|
52
|
+
watch(lesson, (l) => {
|
|
53
|
+
if (!l) return;
|
|
54
|
+
editTitle.value = l.title;
|
|
55
|
+
editType.value = l.type;
|
|
56
|
+
editDuration.value = l.duration ?? 0;
|
|
57
|
+
|
|
58
|
+
const content = l.content as Record<string, unknown> | null;
|
|
59
|
+
if (!content) {
|
|
60
|
+
editMarkdown.value = '';
|
|
61
|
+
editVideoUrl.value = '';
|
|
62
|
+
editQuiz.value = [];
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if (l.type === 'article' || l.type === 'explainer' || l.type === 'project') {
|
|
67
|
+
editMarkdown.value = (content.markdown as string) ?? '';
|
|
68
|
+
} else if (l.type === 'video') {
|
|
69
|
+
editVideoUrl.value = (content.videoUrl as string) ?? '';
|
|
70
|
+
editMarkdown.value = (content.notes as string) ?? '';
|
|
71
|
+
} else if (l.type === 'quiz') {
|
|
72
|
+
editQuiz.value = Array.isArray(content.questions)
|
|
73
|
+
? (content.questions as QuizQuestion[]).map(q => ({ ...q }))
|
|
74
|
+
: [];
|
|
75
|
+
}
|
|
76
|
+
}, { immediate: true });
|
|
77
|
+
|
|
78
|
+
// Build content payload based on type
|
|
79
|
+
function buildContent(): unknown {
|
|
80
|
+
switch (editType.value) {
|
|
81
|
+
case 'article':
|
|
82
|
+
case 'explainer':
|
|
83
|
+
case 'project':
|
|
84
|
+
return { markdown: editMarkdown.value };
|
|
85
|
+
case 'video':
|
|
86
|
+
return { videoUrl: editVideoUrl.value, notes: editMarkdown.value };
|
|
87
|
+
case 'quiz':
|
|
88
|
+
return { questions: editQuiz.value };
|
|
89
|
+
default:
|
|
90
|
+
return { markdown: editMarkdown.value };
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
async function handleSave(): Promise<void> {
|
|
95
|
+
if (!lesson.value) return;
|
|
96
|
+
saving.value = true;
|
|
97
|
+
try {
|
|
98
|
+
await $fetch(`/api/learn/${slug.value}/lessons/${lesson.value.id}`, {
|
|
99
|
+
method: 'PUT',
|
|
100
|
+
body: {
|
|
101
|
+
title: editTitle.value,
|
|
102
|
+
type: editType.value,
|
|
103
|
+
content: buildContent(),
|
|
104
|
+
durationMinutes: editDuration.value || undefined,
|
|
105
|
+
},
|
|
106
|
+
});
|
|
107
|
+
toast.success('Lesson saved!');
|
|
108
|
+
await refresh();
|
|
109
|
+
} catch {
|
|
110
|
+
toast.error('Failed to save lesson');
|
|
111
|
+
} finally {
|
|
112
|
+
saving.value = false;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// Unlink content item
|
|
117
|
+
async function unlinkContent(): Promise<void> {
|
|
118
|
+
if (!lesson.value) return;
|
|
119
|
+
if (!confirm('Unlink this content? The lesson will switch to inline editing.')) return;
|
|
120
|
+
saving.value = true;
|
|
121
|
+
try {
|
|
122
|
+
await $fetch(`/api/learn/${slug.value}/lessons/${lesson.value.id}`, {
|
|
123
|
+
method: 'PUT',
|
|
124
|
+
body: { contentItemId: null },
|
|
125
|
+
});
|
|
126
|
+
toast.success('Content unlinked');
|
|
127
|
+
await refresh();
|
|
128
|
+
} catch {
|
|
129
|
+
toast.error('Failed to unlink');
|
|
130
|
+
} finally {
|
|
131
|
+
saving.value = false;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// Quiz helpers
|
|
136
|
+
function addQuestion(): void {
|
|
137
|
+
editQuiz.value.push({
|
|
138
|
+
question: '',
|
|
139
|
+
options: ['', '', '', ''],
|
|
140
|
+
correctIndex: 0,
|
|
141
|
+
explanation: '',
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
function removeQuestion(index: number): void {
|
|
146
|
+
editQuiz.value.splice(index, 1);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
function addOption(qIndex: number): void {
|
|
150
|
+
editQuiz.value[qIndex]!.options.push('');
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
function removeOption(qIndex: number, oIndex: number): void {
|
|
154
|
+
const q = editQuiz.value[qIndex]!;
|
|
155
|
+
q.options.splice(oIndex, 1);
|
|
156
|
+
if (q.correctIndex >= q.options.length) {
|
|
157
|
+
q.correctIndex = Math.max(0, q.options.length - 1);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// Video embed preview
|
|
162
|
+
const videoEmbedUrl = computed(() => {
|
|
163
|
+
const url = editVideoUrl.value.trim();
|
|
164
|
+
if (!url) return '';
|
|
165
|
+
// YouTube
|
|
166
|
+
const ytMatch = url.match(/(?:youtube\.com\/watch\?v=|youtu\.be\/)([^&\s]+)/);
|
|
167
|
+
if (ytMatch) return `https://www.youtube.com/embed/${ytMatch[1]}`;
|
|
168
|
+
// Vimeo
|
|
169
|
+
const vimeoMatch = url.match(/vimeo\.com\/(\d+)/);
|
|
170
|
+
if (vimeoMatch) return `https://player.vimeo.com/video/${vimeoMatch[1]}`;
|
|
171
|
+
return url;
|
|
172
|
+
});
|
|
173
|
+
</script>
|
|
174
|
+
|
|
175
|
+
<template>
|
|
176
|
+
<div v-if="lesson" class="lesson-edit">
|
|
177
|
+
<!-- Header -->
|
|
178
|
+
<div class="lesson-edit-header">
|
|
179
|
+
<NuxtLink :to="`/learn/${slug}/edit`" class="cpub-back-link">
|
|
180
|
+
<i class="fa-solid fa-arrow-left"></i> Back to path editor
|
|
181
|
+
</NuxtLink>
|
|
182
|
+
<div class="lesson-edit-header-row">
|
|
183
|
+
<div>
|
|
184
|
+
<h1 class="lesson-edit-title">Edit Lesson</h1>
|
|
185
|
+
<p class="lesson-edit-subtitle">{{ lesson.title }}</p>
|
|
186
|
+
</div>
|
|
187
|
+
<button class="cpub-btn cpub-btn-primary" :disabled="saving || !editTitle.trim()" @click="handleSave">
|
|
188
|
+
<i class="fa-solid fa-floppy-disk"></i> {{ saving ? 'Saving...' : 'Save' }}
|
|
189
|
+
</button>
|
|
190
|
+
</div>
|
|
191
|
+
</div>
|
|
192
|
+
|
|
193
|
+
<!-- Metadata -->
|
|
194
|
+
<section class="lesson-section">
|
|
195
|
+
<h2 class="lesson-section-title">Lesson Details</h2>
|
|
196
|
+
<div class="lesson-form-grid">
|
|
197
|
+
<div class="form-field">
|
|
198
|
+
<label for="lesson-title" class="form-label">Title</label>
|
|
199
|
+
<input id="lesson-title" v-model="editTitle" type="text" class="form-input" />
|
|
200
|
+
</div>
|
|
201
|
+
<div class="form-field">
|
|
202
|
+
<label for="lesson-type" class="form-label">Type</label>
|
|
203
|
+
<select id="lesson-type" v-model="editType" class="form-select">
|
|
204
|
+
<option v-for="t in lessonTypes" :key="t" :value="t">{{ t }}</option>
|
|
205
|
+
</select>
|
|
206
|
+
</div>
|
|
207
|
+
<div class="form-field">
|
|
208
|
+
<label for="lesson-duration" class="form-label">Duration (minutes)</label>
|
|
209
|
+
<input id="lesson-duration" v-model.number="editDuration" type="number" min="0" class="form-input" />
|
|
210
|
+
</div>
|
|
211
|
+
</div>
|
|
212
|
+
</section>
|
|
213
|
+
|
|
214
|
+
<!-- Content Editor — varies by type -->
|
|
215
|
+
|
|
216
|
+
<!-- LINKED CONTENT -->
|
|
217
|
+
<section v-if="lesson.contentItemId" class="lesson-section">
|
|
218
|
+
<h2 class="lesson-section-title"><i class="fa-solid fa-link" style="color: var(--teal); margin-right: 6px;"></i>Linked Content</h2>
|
|
219
|
+
<div class="linked-content-info">
|
|
220
|
+
<div class="linked-content-card">
|
|
221
|
+
<span class="cpub-lesson-type-badge" style="margin-right: 8px;">{{ lesson.type }}</span>
|
|
222
|
+
<span class="linked-content-title">{{ lesson.title }}</span>
|
|
223
|
+
</div>
|
|
224
|
+
<div class="linked-content-actions">
|
|
225
|
+
<NuxtLink :to="`/${lesson.type}/${lessonData?.linkedContent?.slug || ''}/edit`" class="cpub-btn cpub-btn-sm">
|
|
226
|
+
<i class="fa-solid fa-pen"></i> Edit Content
|
|
227
|
+
</NuxtLink>
|
|
228
|
+
<button class="cpub-btn cpub-btn-sm" style="color: var(--red); border-color: var(--red-border);" @click="unlinkContent">
|
|
229
|
+
<i class="fa-solid fa-link-slash"></i> Unlink
|
|
230
|
+
</button>
|
|
231
|
+
</div>
|
|
232
|
+
<p class="linked-content-hint">This lesson's content comes from a linked content item. Edit it in the content editor, or unlink to write inline.</p>
|
|
233
|
+
</div>
|
|
234
|
+
</section>
|
|
235
|
+
|
|
236
|
+
<!-- ARTICLE / EXPLAINER / PROJECT: Markdown editor (only when NOT linked) -->
|
|
237
|
+
<section v-else-if="editType === 'article' || editType === 'explainer' || editType === 'project'" class="lesson-section">
|
|
238
|
+
<h2 class="lesson-section-title">Content</h2>
|
|
239
|
+
<p class="lesson-section-hint">Write your lesson content in Markdown.</p>
|
|
240
|
+
<textarea
|
|
241
|
+
v-model="editMarkdown"
|
|
242
|
+
class="lesson-editor"
|
|
243
|
+
rows="20"
|
|
244
|
+
placeholder="# Lesson Title Write your content here using Markdown..."
|
|
245
|
+
/>
|
|
246
|
+
</section>
|
|
247
|
+
|
|
248
|
+
<!-- VIDEO: URL + Notes -->
|
|
249
|
+
<section v-else-if="editType === 'video'" class="lesson-section">
|
|
250
|
+
<h2 class="lesson-section-title">Video</h2>
|
|
251
|
+
<div class="form-field">
|
|
252
|
+
<label for="video-url" class="form-label">Video URL</label>
|
|
253
|
+
<input id="video-url" v-model="editVideoUrl" type="url" class="form-input" placeholder="https://youtube.com/watch?v=..." />
|
|
254
|
+
</div>
|
|
255
|
+
<div v-if="videoEmbedUrl" class="video-preview">
|
|
256
|
+
<iframe :src="videoEmbedUrl" frameborder="0" allowfullscreen class="video-iframe" />
|
|
257
|
+
</div>
|
|
258
|
+
<div class="form-field" style="margin-top: 16px;">
|
|
259
|
+
<label for="video-notes" class="form-label">Notes (optional)</label>
|
|
260
|
+
<textarea v-model="editMarkdown" id="video-notes" class="lesson-editor" rows="8" placeholder="Additional notes in Markdown..." />
|
|
261
|
+
</div>
|
|
262
|
+
</section>
|
|
263
|
+
|
|
264
|
+
<!-- QUIZ: Question builder -->
|
|
265
|
+
<section v-else-if="editType === 'quiz'" class="lesson-section">
|
|
266
|
+
<h2 class="lesson-section-title">Quiz Questions</h2>
|
|
267
|
+
|
|
268
|
+
<div v-for="(q, qi) in editQuiz" :key="qi" class="quiz-question-card">
|
|
269
|
+
<div class="quiz-q-header">
|
|
270
|
+
<span class="quiz-q-number">Q{{ qi + 1 }}</span>
|
|
271
|
+
<button class="cpub-delete-btn" @click="removeQuestion(qi)" aria-label="Remove question">
|
|
272
|
+
<i class="fa-solid fa-xmark"></i>
|
|
273
|
+
</button>
|
|
274
|
+
</div>
|
|
275
|
+
|
|
276
|
+
<div class="form-field">
|
|
277
|
+
<label class="form-label">Question</label>
|
|
278
|
+
<textarea v-model="q.question" class="form-textarea" rows="2" placeholder="What is...?" />
|
|
279
|
+
</div>
|
|
280
|
+
|
|
281
|
+
<div class="quiz-options">
|
|
282
|
+
<div v-for="(opt, oi) in q.options" :key="oi" class="quiz-option-row">
|
|
283
|
+
<label class="quiz-radio-label">
|
|
284
|
+
<input type="radio" :name="`q${qi}-correct`" :value="oi" v-model="q.correctIndex" />
|
|
285
|
+
</label>
|
|
286
|
+
<input v-model="q.options[oi]" type="text" class="form-input quiz-option-input" :placeholder="`Option ${oi + 1}`" />
|
|
287
|
+
<button v-if="q.options.length > 2" class="cpub-delete-btn cpub-delete-btn-sm" @click="removeOption(qi, oi)" aria-label="Remove option">
|
|
288
|
+
<i class="fa-solid fa-xmark"></i>
|
|
289
|
+
</button>
|
|
290
|
+
</div>
|
|
291
|
+
<button v-if="q.options.length < 6" class="cpub-btn cpub-btn-sm" @click="addOption(qi)">
|
|
292
|
+
<i class="fa-solid fa-plus"></i> Add Option
|
|
293
|
+
</button>
|
|
294
|
+
</div>
|
|
295
|
+
|
|
296
|
+
<div class="form-field" style="margin-top: 8px;">
|
|
297
|
+
<label class="form-label">Explanation (shown after answering)</label>
|
|
298
|
+
<textarea v-model="q.explanation" class="form-textarea" rows="2" placeholder="This is correct because..." />
|
|
299
|
+
</div>
|
|
300
|
+
</div>
|
|
301
|
+
|
|
302
|
+
<button class="cpub-btn" @click="addQuestion">
|
|
303
|
+
<i class="fa-solid fa-plus"></i> Add Question
|
|
304
|
+
</button>
|
|
305
|
+
|
|
306
|
+
<div v-if="!editQuiz.length" class="quiz-empty">
|
|
307
|
+
<p>No questions yet. Add your first question above.</p>
|
|
308
|
+
</div>
|
|
309
|
+
</section>
|
|
310
|
+
</div>
|
|
311
|
+
<div v-else class="lesson-not-found">
|
|
312
|
+
<p>Lesson not found</p>
|
|
313
|
+
</div>
|
|
314
|
+
</template>
|
|
315
|
+
|
|
316
|
+
<style scoped>
|
|
317
|
+
.lesson-edit { max-width: 760px; margin: 0 auto; padding: 32px; }
|
|
318
|
+
|
|
319
|
+
.lesson-edit-header { margin-bottom: 32px; }
|
|
320
|
+
.lesson-edit-header-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
|
|
321
|
+
.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; }
|
|
322
|
+
.cpub-back-link:hover { color: var(--accent); }
|
|
323
|
+
.lesson-edit-title { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
|
|
324
|
+
.lesson-edit-subtitle { font-size: 13px; color: var(--text-dim); }
|
|
325
|
+
|
|
326
|
+
.lesson-section {
|
|
327
|
+
background: var(--surface);
|
|
328
|
+
border: var(--border-width-default) solid var(--border);
|
|
329
|
+
padding: 20px;
|
|
330
|
+
margin-bottom: 20px;
|
|
331
|
+
box-shadow: var(--shadow-md);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.lesson-section-title { font-size: 14px; font-weight: 700; margin-bottom: 12px; }
|
|
335
|
+
.lesson-section-hint { font-size: 12px; color: var(--text-faint); margin-bottom: 12px; }
|
|
336
|
+
|
|
337
|
+
.lesson-form-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
|
|
338
|
+
|
|
339
|
+
.form-field { display: flex; flex-direction: column; gap: 4px; }
|
|
340
|
+
.form-label { font-size: 11px; font-weight: 600; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); }
|
|
341
|
+
.form-input, .form-select, .form-textarea {
|
|
342
|
+
padding: 8px 10px;
|
|
343
|
+
border: var(--border-width-default) solid var(--border);
|
|
344
|
+
background: var(--surface);
|
|
345
|
+
color: var(--text);
|
|
346
|
+
font-size: 13px;
|
|
347
|
+
font-family: inherit;
|
|
348
|
+
}
|
|
349
|
+
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--accent); outline: none; }
|
|
350
|
+
.form-textarea { resize: vertical; }
|
|
351
|
+
|
|
352
|
+
/* Markdown editor */
|
|
353
|
+
.lesson-editor {
|
|
354
|
+
width: 100%;
|
|
355
|
+
padding: 12px 14px;
|
|
356
|
+
border: var(--border-width-default) solid var(--border);
|
|
357
|
+
background: var(--surface2);
|
|
358
|
+
color: var(--text);
|
|
359
|
+
font-size: 13px;
|
|
360
|
+
font-family: var(--font-mono);
|
|
361
|
+
line-height: 1.6;
|
|
362
|
+
resize: vertical;
|
|
363
|
+
min-height: 200px;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
.lesson-editor:focus { border-color: var(--accent); outline: none; }
|
|
367
|
+
.lesson-editor::placeholder { color: var(--text-faint); }
|
|
368
|
+
|
|
369
|
+
/* Video preview */
|
|
370
|
+
.video-preview {
|
|
371
|
+
margin-top: 12px;
|
|
372
|
+
border: var(--border-width-default) solid var(--border);
|
|
373
|
+
background: var(--surface2);
|
|
374
|
+
box-shadow: var(--shadow-md);
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
.video-iframe { width: 100%; aspect-ratio: 16 / 9; display: block; }
|
|
378
|
+
|
|
379
|
+
/* Quiz builder */
|
|
380
|
+
.quiz-question-card {
|
|
381
|
+
border: var(--border-width-default) solid var(--border);
|
|
382
|
+
padding: 16px;
|
|
383
|
+
margin-bottom: 12px;
|
|
384
|
+
background: var(--surface2);
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
.quiz-q-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
|
|
388
|
+
.quiz-q-number { font-size: 12px; font-family: var(--font-mono); font-weight: 700; color: var(--accent); background: var(--accent-bg); padding: 2px 8px; border: var(--border-width-default) solid var(--accent-border); }
|
|
389
|
+
|
|
390
|
+
.quiz-options { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
|
|
391
|
+
|
|
392
|
+
.quiz-option-row { display: flex; align-items: center; gap: 8px; }
|
|
393
|
+
.quiz-radio-label { flex-shrink: 0; }
|
|
394
|
+
.quiz-radio-label input[type="radio"] { accent-color: var(--accent); }
|
|
395
|
+
.quiz-option-input { flex: 1; }
|
|
396
|
+
|
|
397
|
+
.quiz-empty { text-align: center; padding: 24px; color: var(--text-faint); font-size: 13px; }
|
|
398
|
+
|
|
399
|
+
.lesson-not-found { text-align: center; padding: 64px; color: var(--text-dim); }
|
|
400
|
+
|
|
401
|
+
@media (max-width: 640px) {
|
|
402
|
+
.lesson-form-grid { grid-template-columns: 1fr; }
|
|
403
|
+
.lesson-edit { padding: 16px; }
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
/* Linked content */
|
|
407
|
+
.linked-content-info { display: flex; flex-direction: column; gap: 12px; }
|
|
408
|
+
.linked-content-card { display: flex; align-items: center; padding: 12px 14px; background: var(--surface2); border: var(--border-width-default) solid var(--border); }
|
|
409
|
+
.linked-content-title { font-size: 14px; font-weight: 600; }
|
|
410
|
+
.linked-content-actions { display: flex; gap: 8px; }
|
|
411
|
+
.linked-content-hint { font-size: 11px; color: var(--text-faint); line-height: 1.5; }
|
|
412
|
+
.cpub-lesson-type-badge { font-size: 9px; font-family: var(--font-mono); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; padding: 2px 7px; border: var(--border-width-default) solid var(--accent-border); background: var(--accent-bg); color: var(--accent); flex-shrink: 0; }
|
|
413
|
+
</style>
|