@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
package/pages/search.vue
ADDED
|
@@ -0,0 +1,692 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { Serialized, ContentListItem, PaginatedResponse } from '@commonpub/server';
|
|
3
|
+
|
|
4
|
+
useSeoMeta({
|
|
5
|
+
title: 'Search -- devEco.io',
|
|
6
|
+
description: 'Search for projects, articles, people, and communities.',
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
const { hubs: hubsEnabled, video: videoEnabled } = useFeatures();
|
|
10
|
+
const { enabledTypeMeta } = useContentTypes();
|
|
11
|
+
|
|
12
|
+
const route = useRoute();
|
|
13
|
+
const query = ref((route.query.q as string) || '');
|
|
14
|
+
const activeType = ref('all');
|
|
15
|
+
|
|
16
|
+
// Sync query ref when navigating to /search?q=... from header
|
|
17
|
+
watch(() => route.query.q, (newQ) => {
|
|
18
|
+
if (typeof newQ === 'string' && newQ !== query.value) {
|
|
19
|
+
query.value = newQ;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
const sortBy = ref('relevance');
|
|
23
|
+
const advOpen = ref(false);
|
|
24
|
+
const viewMode = ref<'grid' | 'list'>('grid');
|
|
25
|
+
|
|
26
|
+
// Advanced filters
|
|
27
|
+
const diffFilters = ref<string[]>([]);
|
|
28
|
+
const activeTags = ref<string[]>([]);
|
|
29
|
+
const dateFrom = ref('');
|
|
30
|
+
const dateTo = ref('');
|
|
31
|
+
const authorFilter = ref('');
|
|
32
|
+
const communityFilter = ref('');
|
|
33
|
+
|
|
34
|
+
const typePills = computed(() => {
|
|
35
|
+
const pills: Array<{ value: string; label: string; icon: string }> = [
|
|
36
|
+
{ value: 'all', label: 'All', icon: '' },
|
|
37
|
+
...enabledTypeMeta.value.map(m => ({ value: m.type, label: m.plural, icon: m.icon })),
|
|
38
|
+
];
|
|
39
|
+
if (videoEnabled.value) {
|
|
40
|
+
pills.push({ value: 'video', label: 'Videos', icon: 'fa-solid fa-video' });
|
|
41
|
+
}
|
|
42
|
+
if (hubsEnabled.value) {
|
|
43
|
+
pills.push({ value: 'community', label: 'Communities', icon: 'fa-solid fa-people-group' });
|
|
44
|
+
}
|
|
45
|
+
pills.push({ value: 'people', label: 'People', icon: 'fa-solid fa-user' });
|
|
46
|
+
pills.push({ value: 'fediverse', label: 'Fediverse', icon: 'fa-solid fa-globe' });
|
|
47
|
+
return pills;
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
const page = ref(1);
|
|
51
|
+
const pageSize = 24;
|
|
52
|
+
|
|
53
|
+
// Reset page when search params change
|
|
54
|
+
watch([query, activeType, sortBy], () => { page.value = 1; });
|
|
55
|
+
|
|
56
|
+
const searchQuery = computed(() => ({
|
|
57
|
+
q: query.value || undefined,
|
|
58
|
+
type: activeType.value === 'all' ? undefined : activeType.value,
|
|
59
|
+
sort: sortBy.value,
|
|
60
|
+
limit: pageSize,
|
|
61
|
+
offset: (page.value - 1) * pageSize,
|
|
62
|
+
difficulty: diffFilters.value.length ? diffFilters.value.join(',') : undefined,
|
|
63
|
+
tags: activeTags.value.length ? activeTags.value.join(',') : undefined,
|
|
64
|
+
dateFrom: dateFrom.value || undefined,
|
|
65
|
+
dateTo: dateTo.value || undefined,
|
|
66
|
+
author: authorFilter.value || undefined,
|
|
67
|
+
community: communityFilter.value || undefined,
|
|
68
|
+
}));
|
|
69
|
+
|
|
70
|
+
const { data: results, status } = await useFetch<PaginatedResponse<Serialized<ContentListItem>>>('/api/search', {
|
|
71
|
+
query: searchQuery,
|
|
72
|
+
watch: [searchQuery],
|
|
73
|
+
lazy: true,
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
const resultCount = computed(() => results.value?.total ?? results.value?.items?.length ?? 0);
|
|
77
|
+
|
|
78
|
+
// Federated search
|
|
79
|
+
const fedResults = ref<any[]>([]);
|
|
80
|
+
const fedLoading = ref(false);
|
|
81
|
+
watch([query, activeType], async () => {
|
|
82
|
+
if (activeType.value !== 'fediverse' || !query.value) { fedResults.value = []; return; }
|
|
83
|
+
fedLoading.value = true;
|
|
84
|
+
try {
|
|
85
|
+
const data = await $fetch<{ items: any[]; total: number }>('/api/federation/timeline', {
|
|
86
|
+
params: { limit: 20 },
|
|
87
|
+
});
|
|
88
|
+
// Client-side filter by query since the timeline endpoint doesn't have search
|
|
89
|
+
const q = query.value.toLowerCase();
|
|
90
|
+
fedResults.value = data.items.filter((item: any) =>
|
|
91
|
+
(item.title?.toLowerCase().includes(q)) ||
|
|
92
|
+
(item.content?.toLowerCase().includes(q)) ||
|
|
93
|
+
(item.summary?.toLowerCase().includes(q))
|
|
94
|
+
);
|
|
95
|
+
} catch { fedResults.value = []; }
|
|
96
|
+
fedLoading.value = false;
|
|
97
|
+
}, { immediate: true });
|
|
98
|
+
|
|
99
|
+
const activeFilterCount = computed(() => {
|
|
100
|
+
let n = 0;
|
|
101
|
+
if (diffFilters.value.length) n += diffFilters.value.length;
|
|
102
|
+
if (activeTags.value.length) n += activeTags.value.length;
|
|
103
|
+
if (dateFrom.value || dateTo.value) n++;
|
|
104
|
+
if (authorFilter.value) n++;
|
|
105
|
+
if (communityFilter.value) n++;
|
|
106
|
+
return n;
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
function toggleSidebarTag(tag: string): void {
|
|
110
|
+
if (activeTags.value.includes(tag)) {
|
|
111
|
+
activeTags.value = activeTags.value.filter(t => t !== tag);
|
|
112
|
+
} else {
|
|
113
|
+
activeTags.value.push(tag);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
function clearAll(): void {
|
|
118
|
+
diffFilters.value = [];
|
|
119
|
+
activeTags.value = [];
|
|
120
|
+
dateFrom.value = '';
|
|
121
|
+
dateTo.value = '';
|
|
122
|
+
authorFilter.value = '';
|
|
123
|
+
communityFilter.value = '';
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// Suggested tags for sidebar
|
|
127
|
+
const suggestedTags = [
|
|
128
|
+
'edge-ai', 'tflite', 'tinyml', 'onnx', 'inference', 'quantization',
|
|
129
|
+
'jetson', 'rpi', 'npu', 'embedded-ml', 'microcontroller', 'vision-ai',
|
|
130
|
+
'llm-edge', 'tensorrt', 'arduino',
|
|
131
|
+
];
|
|
132
|
+
|
|
133
|
+
// Categories for sidebar
|
|
134
|
+
const categories = [
|
|
135
|
+
{ icon: 'fa-solid fa-robot', label: 'Machine Learning' },
|
|
136
|
+
{ icon: 'fa-solid fa-bolt', label: 'Embedded Systems' },
|
|
137
|
+
{ icon: 'fa-solid fa-satellite-dish', label: 'IoT & Wireless' },
|
|
138
|
+
{ icon: 'fa-solid fa-eye', label: 'Computer Vision' },
|
|
139
|
+
{ icon: 'fa-solid fa-volume-high', label: 'Audio & Speech' },
|
|
140
|
+
{ icon: 'fa-solid fa-battery-three-quarters', label: 'Power Systems' },
|
|
141
|
+
{ icon: 'fa-solid fa-gears', label: 'Robotics' },
|
|
142
|
+
{ icon: 'fa-solid fa-microscope', label: 'Research & Papers' },
|
|
143
|
+
];
|
|
144
|
+
|
|
145
|
+
// Trending searches for sidebar
|
|
146
|
+
const { data: trendingSearches } = await useFetch('/api/search/trending', {
|
|
147
|
+
default: () => [],
|
|
148
|
+
server: false,
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
const totalPages = computed(() => {
|
|
152
|
+
const total = results.value?.total ?? 0;
|
|
153
|
+
return Math.max(1, Math.ceil(total / pageSize));
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
const visiblePages = computed(() => {
|
|
157
|
+
const tp = totalPages.value;
|
|
158
|
+
const current = page.value;
|
|
159
|
+
const pages: number[] = [];
|
|
160
|
+
const start = Math.max(1, current - 2);
|
|
161
|
+
const end = Math.min(tp, current + 2);
|
|
162
|
+
for (let i = start; i <= end; i++) pages.push(i);
|
|
163
|
+
return pages;
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
function applyFilters(): void {
|
|
167
|
+
page.value = 1;
|
|
168
|
+
// searchQuery recomputes automatically since all refs are reactive
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
function setCategory(label: string): void {
|
|
172
|
+
query.value = label;
|
|
173
|
+
activeType.value = 'all';
|
|
174
|
+
page.value = 1;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
const { data: relatedCommunities } = await useFetch('/api/hubs', {
|
|
178
|
+
query: { limit: 3 },
|
|
179
|
+
default: () => ({ items: [] }),
|
|
180
|
+
immediate: hubsEnabled.value,
|
|
181
|
+
});
|
|
182
|
+
</script>
|
|
183
|
+
|
|
184
|
+
<template>
|
|
185
|
+
<div class="cpub-search-page">
|
|
186
|
+
<div class="cpub-page-shell">
|
|
187
|
+
<!-- ── MAIN COLUMN ── -->
|
|
188
|
+
<div class="cpub-main-col">
|
|
189
|
+
|
|
190
|
+
<!-- SEARCH HERO -->
|
|
191
|
+
<div class="cpub-search-hero" :class="{ 'panel-open': advOpen }">
|
|
192
|
+
<div class="cpub-hero-label">Search</div>
|
|
193
|
+
|
|
194
|
+
<div class="cpub-search-input-wrap">
|
|
195
|
+
<i class="fa-solid fa-magnifying-glass cpub-search-icon-main"></i>
|
|
196
|
+
<input
|
|
197
|
+
v-model="query"
|
|
198
|
+
class="cpub-search-input-main"
|
|
199
|
+
type="text"
|
|
200
|
+
placeholder="Search projects, articles, people, communities…"
|
|
201
|
+
aria-label="Search content"
|
|
202
|
+
/>
|
|
203
|
+
<span class="cpub-search-kbd">⌈K</span>
|
|
204
|
+
</div>
|
|
205
|
+
|
|
206
|
+
<div class="cpub-result-meta-row">
|
|
207
|
+
<span v-if="query" class="cpub-result-count">
|
|
208
|
+
<strong>{{ resultCount.toLocaleString() }}</strong> results
|
|
209
|
+
</span>
|
|
210
|
+
</div>
|
|
211
|
+
|
|
212
|
+
<!-- FILTER STRIP -->
|
|
213
|
+
<div class="cpub-filter-strip">
|
|
214
|
+
<button
|
|
215
|
+
v-for="pill in typePills"
|
|
216
|
+
:key="pill.value"
|
|
217
|
+
class="cpub-type-pill"
|
|
218
|
+
:class="{ active: activeType === pill.value }"
|
|
219
|
+
@click="activeType = pill.value"
|
|
220
|
+
>
|
|
221
|
+
<i v-if="pill.icon" :class="pill.icon" style="font-size: 10px"></i>
|
|
222
|
+
{{ pill.label }}
|
|
223
|
+
</button>
|
|
224
|
+
|
|
225
|
+
<div class="cpub-filter-right">
|
|
226
|
+
<SortSelect
|
|
227
|
+
v-model="sortBy"
|
|
228
|
+
:options="[
|
|
229
|
+
{ value: 'relevance', label: 'Relevance' },
|
|
230
|
+
{ value: 'recent', label: 'Latest' },
|
|
231
|
+
{ value: 'popular', label: 'Most Popular' },
|
|
232
|
+
{ value: 'likes', label: 'Most Liked' },
|
|
233
|
+
]"
|
|
234
|
+
/>
|
|
235
|
+
<button
|
|
236
|
+
class="cpub-adv-filter-btn"
|
|
237
|
+
:class="{ open: advOpen }"
|
|
238
|
+
@click="advOpen = !advOpen"
|
|
239
|
+
>
|
|
240
|
+
<i class="fa-solid fa-sliders"></i>
|
|
241
|
+
Filters
|
|
242
|
+
<span v-if="activeFilterCount > 0" class="cpub-active-filters-badge">{{ activeFilterCount }}</span>
|
|
243
|
+
<i class="fa-solid fa-chevron-down"></i>
|
|
244
|
+
</button>
|
|
245
|
+
</div>
|
|
246
|
+
</div>
|
|
247
|
+
</div>
|
|
248
|
+
|
|
249
|
+
<!-- ADVANCED FILTERS PANEL -->
|
|
250
|
+
<SearchFilters
|
|
251
|
+
v-if="advOpen"
|
|
252
|
+
v-model:diff-filters="diffFilters"
|
|
253
|
+
v-model:active-tags="activeTags"
|
|
254
|
+
v-model:date-from="dateFrom"
|
|
255
|
+
v-model:date-to="dateTo"
|
|
256
|
+
v-model:author-filter="authorFilter"
|
|
257
|
+
v-model:community-filter="communityFilter"
|
|
258
|
+
@apply="applyFilters"
|
|
259
|
+
@clear="clearAll"
|
|
260
|
+
/>
|
|
261
|
+
|
|
262
|
+
<!-- RESULTS HEADER -->
|
|
263
|
+
<div v-if="query" class="cpub-results-header">
|
|
264
|
+
<h2>Results for <span>"{{ query }}"</span></h2>
|
|
265
|
+
<div class="cpub-view-toggle">
|
|
266
|
+
<button
|
|
267
|
+
class="cpub-view-btn"
|
|
268
|
+
:class="{ active: viewMode === 'grid' }"
|
|
269
|
+
title="Grid view"
|
|
270
|
+
@click="viewMode = 'grid'"
|
|
271
|
+
>
|
|
272
|
+
<i class="fa-solid fa-grid-2"></i>
|
|
273
|
+
</button>
|
|
274
|
+
<button
|
|
275
|
+
class="cpub-view-btn"
|
|
276
|
+
:class="{ active: viewMode === 'list' }"
|
|
277
|
+
title="List view"
|
|
278
|
+
@click="viewMode = 'list'"
|
|
279
|
+
>
|
|
280
|
+
<i class="fa-solid fa-list"></i>
|
|
281
|
+
</button>
|
|
282
|
+
</div>
|
|
283
|
+
</div>
|
|
284
|
+
|
|
285
|
+
<!-- RESULTS -->
|
|
286
|
+
<div v-if="!query" class="cpub-empty-state">
|
|
287
|
+
<div class="cpub-empty-state-icon"><i class="fa-solid fa-magnifying-glass"></i></div>
|
|
288
|
+
<p class="cpub-empty-state-title">Search the community</p>
|
|
289
|
+
<p class="cpub-empty-state-desc">Enter a search term to find projects, articles, and more.</p>
|
|
290
|
+
</div>
|
|
291
|
+
|
|
292
|
+
<div v-else-if="status === 'pending'" class="cpub-empty-state">
|
|
293
|
+
<p class="cpub-empty-state-title">Searching…</p>
|
|
294
|
+
</div>
|
|
295
|
+
|
|
296
|
+
<!-- FEDIVERSE RESULTS -->
|
|
297
|
+
<template v-if="activeType === 'fediverse' && query">
|
|
298
|
+
<div v-if="fedLoading" class="cpub-empty-state"><p class="cpub-empty-state-title">Searching fediverse…</p></div>
|
|
299
|
+
<div v-else-if="fedResults.length === 0" class="cpub-empty-state">
|
|
300
|
+
<p class="cpub-empty-state-title">No federated results</p>
|
|
301
|
+
<p class="cpub-empty-state-desc">Try <NuxtLink to="/federation/search">searching for remote users</NuxtLink> to follow, then their content will appear here.</p>
|
|
302
|
+
</div>
|
|
303
|
+
<div v-else class="cpub-results-grid">
|
|
304
|
+
<FederatedContentCard
|
|
305
|
+
v-for="item in fedResults"
|
|
306
|
+
:key="item.id"
|
|
307
|
+
:content="item"
|
|
308
|
+
/>
|
|
309
|
+
</div>
|
|
310
|
+
</template>
|
|
311
|
+
|
|
312
|
+
<template v-else-if="activeType !== 'fediverse' && results?.items?.length">
|
|
313
|
+
<div
|
|
314
|
+
class="cpub-results-grid"
|
|
315
|
+
:class="{ 'list-view': viewMode === 'list' }"
|
|
316
|
+
>
|
|
317
|
+
<ContentCard v-for="item in results.items" :key="item.id" :item="item" />
|
|
318
|
+
</div>
|
|
319
|
+
|
|
320
|
+
<!-- PAGINATION -->
|
|
321
|
+
<div v-if="totalPages > 1" class="cpub-pagination">
|
|
322
|
+
<button
|
|
323
|
+
class="cpub-page-btn cpub-page-wide"
|
|
324
|
+
:disabled="page <= 1"
|
|
325
|
+
aria-label="Previous page"
|
|
326
|
+
@click="page = Math.max(1, page - 1)"
|
|
327
|
+
>
|
|
328
|
+
<i class="fa-solid fa-chevron-left" style="font-size: 10px"></i>
|
|
329
|
+
</button>
|
|
330
|
+
<template v-if="visiblePages[0] > 1">
|
|
331
|
+
<button class="cpub-page-btn" @click="page = 1">1</button>
|
|
332
|
+
<span v-if="visiblePages[0] > 2" class="cpub-page-ellipsis">…</span>
|
|
333
|
+
</template>
|
|
334
|
+
<button
|
|
335
|
+
v-for="p in visiblePages"
|
|
336
|
+
:key="p"
|
|
337
|
+
class="cpub-page-btn"
|
|
338
|
+
:class="{ active: page === p }"
|
|
339
|
+
@click="page = p"
|
|
340
|
+
>
|
|
341
|
+
{{ p }}
|
|
342
|
+
</button>
|
|
343
|
+
<template v-if="visiblePages[visiblePages.length - 1] < totalPages">
|
|
344
|
+
<span v-if="visiblePages[visiblePages.length - 1] < totalPages - 1" class="cpub-page-ellipsis">…</span>
|
|
345
|
+
<button class="cpub-page-btn" @click="page = totalPages">{{ totalPages }}</button>
|
|
346
|
+
</template>
|
|
347
|
+
<button
|
|
348
|
+
class="cpub-page-btn cpub-page-wide"
|
|
349
|
+
:disabled="page >= totalPages"
|
|
350
|
+
aria-label="Next page"
|
|
351
|
+
@click="page = Math.min(totalPages, page + 1)"
|
|
352
|
+
>
|
|
353
|
+
<i class="fa-solid fa-chevron-right" style="font-size: 10px"></i>
|
|
354
|
+
</button>
|
|
355
|
+
</div>
|
|
356
|
+
</template>
|
|
357
|
+
|
|
358
|
+
<div v-else class="cpub-empty-state">
|
|
359
|
+
<div class="cpub-empty-state-icon"><i class="fa-solid fa-inbox"></i></div>
|
|
360
|
+
<p class="cpub-empty-state-title">No results found</p>
|
|
361
|
+
<p class="cpub-empty-state-desc">Try adjusting your search or filters.</p>
|
|
362
|
+
</div>
|
|
363
|
+
</div>
|
|
364
|
+
|
|
365
|
+
<!-- ── SIDEBAR ── -->
|
|
366
|
+
<SearchSidebar
|
|
367
|
+
:active-tags="activeTags"
|
|
368
|
+
:suggested-tags="suggestedTags"
|
|
369
|
+
:categories="categories"
|
|
370
|
+
:trending-searches="trendingSearches"
|
|
371
|
+
:related-hubs="hubsEnabled ? (relatedCommunities?.items ?? []) : []"
|
|
372
|
+
@search="(q: string) => query = q"
|
|
373
|
+
@toggle-tag="toggleSidebarTag"
|
|
374
|
+
@set-category="setCategory"
|
|
375
|
+
/>
|
|
376
|
+
</div>
|
|
377
|
+
</div>
|
|
378
|
+
</template>
|
|
379
|
+
|
|
380
|
+
<style scoped>
|
|
381
|
+
/* ── PAGE SHELL ── */
|
|
382
|
+
.cpub-page-shell {
|
|
383
|
+
max-width: 1360px;
|
|
384
|
+
margin: 0 auto;
|
|
385
|
+
padding: 36px 24px 64px;
|
|
386
|
+
display: grid;
|
|
387
|
+
grid-template-columns: 1fr 280px;
|
|
388
|
+
gap: 36px;
|
|
389
|
+
align-items: start;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
.cpub-main-col { min-width: 0; }
|
|
393
|
+
.cpub-sidebar-col { min-width: 0; }
|
|
394
|
+
|
|
395
|
+
/* ── SEARCH HERO ── */
|
|
396
|
+
.cpub-search-hero {
|
|
397
|
+
background: var(--surface);
|
|
398
|
+
border: var(--border-width-default) solid var(--border);
|
|
399
|
+
border-radius: 0;
|
|
400
|
+
padding: 32px 32px 0;
|
|
401
|
+
box-shadow: var(--shadow-sm);
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
.cpub-search-hero.panel-open {
|
|
405
|
+
border-bottom: var(--border-width-default) solid var(--border);
|
|
406
|
+
border-bottom-left-radius: 0;
|
|
407
|
+
border-bottom-right-radius: 0;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
.cpub-hero-label {
|
|
411
|
+
font-family: var(--font-mono);
|
|
412
|
+
font-size: 10px;
|
|
413
|
+
color: var(--text-faint);
|
|
414
|
+
letter-spacing: 0.12em;
|
|
415
|
+
text-transform: uppercase;
|
|
416
|
+
margin-bottom: 14px;
|
|
417
|
+
display: flex;
|
|
418
|
+
align-items: center;
|
|
419
|
+
gap: 8px;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
.cpub-hero-label::after {
|
|
423
|
+
content: '';
|
|
424
|
+
flex: 1;
|
|
425
|
+
height: 2px;
|
|
426
|
+
background: var(--border);
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
.cpub-search-input-wrap {
|
|
430
|
+
position: relative;
|
|
431
|
+
margin-bottom: 18px;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
.cpub-search-icon-main {
|
|
435
|
+
position: absolute;
|
|
436
|
+
left: 16px;
|
|
437
|
+
top: 50%;
|
|
438
|
+
transform: translateY(-50%);
|
|
439
|
+
color: var(--text-dim);
|
|
440
|
+
font-size: 16px;
|
|
441
|
+
pointer-events: none;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
.cpub-search-input-main {
|
|
445
|
+
width: 100%;
|
|
446
|
+
background: var(--surface2);
|
|
447
|
+
border: var(--border-width-default) solid var(--border);
|
|
448
|
+
border-radius: 0;
|
|
449
|
+
padding: 12px 48px 12px 46px;
|
|
450
|
+
font-size: 15px;
|
|
451
|
+
font-weight: 500;
|
|
452
|
+
color: var(--text);
|
|
453
|
+
font-family: system-ui, -apple-system, sans-serif;
|
|
454
|
+
outline: none;
|
|
455
|
+
transition: border-color 0.15s, box-shadow 0.15s;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
.cpub-search-input-main:focus {
|
|
459
|
+
border-color: var(--accent);
|
|
460
|
+
box-shadow: var(--accent-focus-ring);
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
.cpub-search-input-main::placeholder { color: var(--text-faint); }
|
|
464
|
+
|
|
465
|
+
.cpub-search-kbd {
|
|
466
|
+
position: absolute;
|
|
467
|
+
right: 12px;
|
|
468
|
+
top: 50%;
|
|
469
|
+
transform: translateY(-50%);
|
|
470
|
+
font-family: var(--font-mono);
|
|
471
|
+
font-size: 10px;
|
|
472
|
+
color: var(--text-faint);
|
|
473
|
+
background: var(--surface3);
|
|
474
|
+
border: var(--border-width-default) solid var(--border);
|
|
475
|
+
border-radius: 0;
|
|
476
|
+
padding: 2px 6px;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
.cpub-result-meta-row {
|
|
480
|
+
display: flex;
|
|
481
|
+
align-items: center;
|
|
482
|
+
gap: 12px;
|
|
483
|
+
padding-bottom: 0;
|
|
484
|
+
margin-bottom: -1px;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
.cpub-result-count {
|
|
488
|
+
font-family: var(--font-mono);
|
|
489
|
+
font-size: 11px;
|
|
490
|
+
color: var(--text-dim);
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
.cpub-result-count strong {
|
|
494
|
+
color: var(--accent);
|
|
495
|
+
font-weight: 600;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
/* ── FILTER STRIP ── */
|
|
499
|
+
.cpub-filter-strip {
|
|
500
|
+
display: flex;
|
|
501
|
+
align-items: center;
|
|
502
|
+
gap: 0;
|
|
503
|
+
border-top: var(--border-width-default) solid var(--border);
|
|
504
|
+
margin-top: 14px;
|
|
505
|
+
padding-top: 0;
|
|
506
|
+
overflow-x: auto;
|
|
507
|
+
scrollbar-width: none;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
.cpub-filter-strip::-webkit-scrollbar { display: none; }
|
|
511
|
+
|
|
512
|
+
.cpub-type-pill {
|
|
513
|
+
font-size: 12px;
|
|
514
|
+
font-family: var(--font-mono);
|
|
515
|
+
padding: 10px 16px;
|
|
516
|
+
border-bottom: var(--border-width-default) solid transparent;
|
|
517
|
+
color: var(--text-dim);
|
|
518
|
+
cursor: pointer;
|
|
519
|
+
white-space: nowrap;
|
|
520
|
+
background: none;
|
|
521
|
+
border-left: none;
|
|
522
|
+
border-right: none;
|
|
523
|
+
border-top: none;
|
|
524
|
+
transition: color 0.15s, border-color 0.15s, background 0.15s;
|
|
525
|
+
display: flex;
|
|
526
|
+
align-items: center;
|
|
527
|
+
gap: 6px;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
.cpub-type-pill:hover { color: var(--text); }
|
|
531
|
+
|
|
532
|
+
.cpub-type-pill.active {
|
|
533
|
+
color: var(--accent);
|
|
534
|
+
border-bottom-color: var(--accent);
|
|
535
|
+
background: var(--accent-bg);
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
.cpub-filter-right {
|
|
539
|
+
margin-left: auto;
|
|
540
|
+
display: flex;
|
|
541
|
+
align-items: center;
|
|
542
|
+
gap: 8px;
|
|
543
|
+
padding: 8px 0 8px 16px;
|
|
544
|
+
flex-shrink: 0;
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
.cpub-sort-select {
|
|
548
|
+
background: var(--surface2);
|
|
549
|
+
border: var(--border-width-default) solid var(--border);
|
|
550
|
+
border-radius: 0;
|
|
551
|
+
color: var(--text-dim);
|
|
552
|
+
font-size: 11px;
|
|
553
|
+
font-family: var(--font-mono);
|
|
554
|
+
padding: 5px 24px 5px 10px;
|
|
555
|
+
cursor: pointer;
|
|
556
|
+
outline: none;
|
|
557
|
+
appearance: none;
|
|
558
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%231a1a1a' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
|
|
559
|
+
background-repeat: no-repeat;
|
|
560
|
+
background-position: right 8px center;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
.cpub-sort-select:focus { border-color: var(--accent); }
|
|
564
|
+
|
|
565
|
+
.cpub-adv-filter-btn {
|
|
566
|
+
font-size: 11px;
|
|
567
|
+
font-family: var(--font-mono);
|
|
568
|
+
padding: 5px 12px;
|
|
569
|
+
border: var(--border-width-default) solid var(--border);
|
|
570
|
+
border-radius: 0;
|
|
571
|
+
background: var(--surface2);
|
|
572
|
+
color: var(--text-dim);
|
|
573
|
+
cursor: pointer;
|
|
574
|
+
display: flex;
|
|
575
|
+
align-items: center;
|
|
576
|
+
gap: 6px;
|
|
577
|
+
transition: color 0.15s, border-color 0.15s, background 0.15s;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
.cpub-adv-filter-btn:hover,
|
|
581
|
+
.cpub-adv-filter-btn.open {
|
|
582
|
+
color: var(--text);
|
|
583
|
+
background: var(--surface3);
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
.cpub-adv-filter-btn .fa-chevron-down {
|
|
587
|
+
font-size: 9px;
|
|
588
|
+
transition: transform 0.2s;
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
.cpub-adv-filter-btn.open .fa-chevron-down { transform: rotate(180deg); }
|
|
592
|
+
|
|
593
|
+
.cpub-active-filters-badge {
|
|
594
|
+
width: 16px;
|
|
595
|
+
height: 16px;
|
|
596
|
+
border-radius: 50%;
|
|
597
|
+
background: var(--accent);
|
|
598
|
+
color: var(--color-text-inverse);
|
|
599
|
+
font-size: 9px;
|
|
600
|
+
display: flex;
|
|
601
|
+
align-items: center;
|
|
602
|
+
justify-content: center;
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
/* Advanced filter panel and sidebar styles moved to SearchFilters.vue and SearchSidebar.vue */
|
|
606
|
+
|
|
607
|
+
/* ── RESULTS HEADER ── */
|
|
608
|
+
.cpub-results-header {
|
|
609
|
+
display: flex;
|
|
610
|
+
align-items: center;
|
|
611
|
+
gap: 12px;
|
|
612
|
+
margin-bottom: 20px;
|
|
613
|
+
margin-top: 24px;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
.cpub-results-header h2 {
|
|
617
|
+
font-size: 12px;
|
|
618
|
+
font-weight: 600;
|
|
619
|
+
color: var(--text-dim);
|
|
620
|
+
font-family: var(--font-mono);
|
|
621
|
+
letter-spacing: 0.04em;
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
.cpub-results-header h2 span { color: var(--text); }
|
|
625
|
+
|
|
626
|
+
.cpub-view-toggle {
|
|
627
|
+
margin-left: auto;
|
|
628
|
+
display: flex;
|
|
629
|
+
border: var(--border-width-default) solid var(--border);
|
|
630
|
+
border-radius: 0;
|
|
631
|
+
overflow: hidden;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
.cpub-view-btn {
|
|
635
|
+
padding: 5px 10px;
|
|
636
|
+
background: none;
|
|
637
|
+
border: none;
|
|
638
|
+
color: var(--text-faint);
|
|
639
|
+
cursor: pointer;
|
|
640
|
+
font-size: 12px;
|
|
641
|
+
border-right: var(--border-width-default) solid var(--border);
|
|
642
|
+
transition: color 0.15s, background 0.15s;
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
.cpub-view-btn:last-child { border-right: none; }
|
|
646
|
+
.cpub-view-btn:hover { color: var(--text-dim); background: var(--surface2); }
|
|
647
|
+
.cpub-view-btn.active { color: var(--accent); background: var(--accent-bg); }
|
|
648
|
+
|
|
649
|
+
/* ── RESULTS GRID ── */
|
|
650
|
+
.cpub-results-grid {
|
|
651
|
+
display: grid;
|
|
652
|
+
grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
|
|
653
|
+
gap: 20px;
|
|
654
|
+
margin-bottom: 32px;
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
.cpub-results-grid.list-view {
|
|
658
|
+
grid-template-columns: 1fr;
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
/* ── PAGINATION (page-specific override) ── */
|
|
662
|
+
.cpub-page-wide { width: auto; padding: 0 12px; }
|
|
663
|
+
|
|
664
|
+
|
|
665
|
+
/* ── RESPONSIVE ── */
|
|
666
|
+
@media (max-width: 1024px) {
|
|
667
|
+
.cpub-page-shell {
|
|
668
|
+
grid-template-columns: 1fr;
|
|
669
|
+
}
|
|
670
|
+
.cpub-adv-grid {
|
|
671
|
+
grid-template-columns: repeat(2, 1fr);
|
|
672
|
+
}
|
|
673
|
+
.cpub-results-grid {
|
|
674
|
+
grid-template-columns: repeat(2, 1fr);
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
@media (max-width: 640px) {
|
|
679
|
+
.cpub-page-shell {
|
|
680
|
+
padding: 16px;
|
|
681
|
+
}
|
|
682
|
+
.cpub-search-hero {
|
|
683
|
+
padding: 20px 16px 0;
|
|
684
|
+
}
|
|
685
|
+
.cpub-adv-grid {
|
|
686
|
+
grid-template-columns: 1fr;
|
|
687
|
+
}
|
|
688
|
+
.cpub-results-grid {
|
|
689
|
+
grid-template-columns: 1fr;
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
</style>
|