diff --git a/src/pages/community/community.css b/src/pages/community/community.css index 0b8cea4e..8b77e35f 100644 --- a/src/pages/community/community.css +++ b/src/pages/community/community.css @@ -1236,4 +1236,295 @@ .item-arrow.rotate { transform: rotate(90deg); -} \ No newline at end of file +} + +/* Community Feed Section */ +.community-feed-section { + padding: 3rem 0; +} + +.community-feed-layout { + display: grid; + grid-template-columns: 2fr 1fr; + gap: 2rem; + align-items: start; +} + +@media (max-width: 900px) { + .community-feed-layout { + grid-template-columns: 1fr; + } +} + +.community-feed-main { + display: flex; + flex-direction: column; + gap: 1rem; +} + +.feed-tabs { + display: flex; + gap: 0.5rem; + border-bottom: 1px solid var(--ifm-color-emphasis-300); + margin-bottom: 0.5rem; +} + +.feed-tab { + display: flex; + align-items: center; + gap: 0.4rem; + padding: 0.6rem 1rem; + background: none; + border: none; + border-bottom: 2px solid transparent; + font-weight: 600; + font-size: 0.9rem; + color: var(--ifm-color-emphasis-600); + cursor: pointer; + transition: color 0.2s ease, border-color 0.2s ease; +} + +.feed-tab:hover { + color: var(--ifm-color-primary); +} + +.feed-tab.active { + color: var(--ifm-color-primary); + border-bottom-color: var(--ifm-color-primary); +} + +.feed-posts { + display: flex; + flex-direction: column; + gap: 1rem; +} + +.feed-post-card { + padding: 1.25rem; + border-radius: 12px; + border: 1px solid var(--ifm-color-emphasis-200); + background: var(--ifm-background-surface-color); + transition: box-shadow 0.2s ease, transform 0.2s ease; +} + +.feed-post-card:hover { + box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08); + transform: translateY(-2px); +} + +.feed-post-header { + display: flex; + align-items: center; + gap: 0.6rem; + margin-bottom: 0.6rem; +} + +.feed-post-avatar { + font-size: 1.5rem; +} + +.feed-post-meta { + display: flex; + flex-direction: column; +} + +.feed-post-author { + font-weight: 600; + font-size: 0.9rem; +} + +.feed-post-time { + font-size: 0.75rem; + color: var(--ifm-color-emphasis-600); +} + +.feed-post-title { + font-size: 1rem; + font-weight: 700; + margin-bottom: 0.4rem; +} + +.feed-post-excerpt { + font-size: 0.875rem; + color: var(--ifm-color-emphasis-700); + line-height: 1.5; + margin-bottom: 0.6rem; +} + +.feed-post-footer { + display: flex; + gap: 1rem; + font-size: 0.8rem; + color: var(--ifm-color-emphasis-600); +} + +.feed-social-links { + display: flex; + gap: 0.75rem; + margin-top: 0.5rem; + flex-wrap: wrap; +} + +.feed-social-link { + display: flex; + align-items: center; + gap: 0.5rem; + padding: 0.6rem 1rem; + border-radius: 8px; + background: var(--ifm-color-emphasis-100); + color: var(--ifm-font-color-base); + font-weight: 600; + font-size: 0.85rem; + text-decoration: none; + transition: background 0.2s ease; +} + +.feed-social-link:hover { + background: var(--ifm-color-emphasis-200); + text-decoration: none; + color: var(--ifm-color-primary); +} + +/* Sidebar */ +.community-feed-sidebar { + display: flex; + flex-direction: column; + gap: 1.25rem; +} + +.feed-sidebar-card { + border-radius: 12px; + border: 1px solid var(--ifm-color-emphasis-200); + background: var(--ifm-background-surface-color); + padding: 1.25rem; +} + +.feed-sidebar-header { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 0.9rem; +} + +.feed-sidebar-header h4 { + margin: 0; + font-size: 0.95rem; +} + +.feed-sidebar-see-all { + display: flex; + align-items: center; + gap: 0.3rem; + font-size: 0.75rem; + color: var(--ifm-color-primary); + text-decoration: none; +} + +.feed-news-item { + display: flex; + gap: 0.75rem; + align-items: flex-start; + padding: 0.6rem 0; + border-bottom: 1px solid var(--ifm-color-emphasis-200); +} + +.feed-news-item:last-child { + border-bottom: none; + padding-bottom: 0; +} + +.feed-news-thumb { + font-size: 1.5rem; + line-height: 1; +} + +.feed-news-title { + font-size: 0.85rem; + font-weight: 600; + margin: 0 0 0.2rem; + line-height: 1.3; +} + +.feed-news-meta { + font-size: 0.72rem; + color: var(--ifm-color-emphasis-600); +} + +.feed-event-item { + display: flex; + gap: 0.75rem; + align-items: center; + padding: 0.6rem 0; + border-bottom: 1px solid var(--ifm-color-emphasis-200); +} + +.feed-event-item:last-child { + border-bottom: none; + padding-bottom: 0; +} + +.feed-event-date { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + width: 44px; + height: 44px; + border-radius: 8px; + color: #fff; + font-weight: 700; + flex-shrink: 0; +} + +.feed-event-date span { + font-size: 1rem; + line-height: 1; +} + +.feed-event-date small { + font-size: 0.6rem; + letter-spacing: 0.05em; +} + +.feed-event-title { + font-size: 0.85rem; + font-weight: 600; + margin: 0 0 0.2rem; +} + +.feed-event-time { + font-size: 0.72rem; + color: var(--ifm-color-emphasis-600); +} + +.feed-guidelines-card { + display: flex; + align-items: center; + gap: 0.9rem; + text-decoration: none; + color: var(--ifm-font-color-base); + transition: border-color 0.2s ease; +} + +.feed-guidelines-card:hover { + border-color: var(--ifm-color-primary); + text-decoration: none; + color: var(--ifm-font-color-base); +} + +.feed-guidelines-icon { + font-size: 1.4rem; + color: var(--ifm-color-primary); + flex-shrink: 0; +} + +.feed-guidelines-title { + font-size: 0.9rem; + font-weight: 700; + margin: 0 0 0.2rem; +} + +.feed-guidelines-sub { + font-size: 0.78rem; + color: var(--ifm-color-emphasis-600); +} diff --git a/src/pages/community/index.tsx b/src/pages/community/index.tsx index e57c3f98..17573318 100644 --- a/src/pages/community/index.tsx +++ b/src/pages/community/index.tsx @@ -7,11 +7,42 @@ import { MdLocalFlorist } from "react-icons/md"; import ScrollBottomToTop from "@site/src/components/scroll/bottom-to-top"; import "./community.css"; import { HiOutlineChatAlt2 } from "react-icons/hi"; +import { FaFire, FaClock, FaTwitter, FaLinkedin, FaBook, FaArrowRight } from "react-icons/fa"; import { CommunityStatsProvider, useCommunityStatsContext, } from "@site/src/lib/statsProvider"; +interface CommunityPost { + id: string; + author: string; + avatar: string; + timeAgo: string; + category: string; + title: string; + excerpt: string; + likes: number; + comments: number; + type: "top" | "newest"; +} + +interface NewsItem { + id: string; + title: string; + date: string; + type: string; + thumbnail: string; +} + +interface UpcomingEvent { + id: string; + date: string; + month: string; + title: string; + time: string; + color: string; +} + interface ContributionSection { id: string; title: string; @@ -125,6 +156,125 @@ const tableOfContents = [ { id: "get-started", title: "Get Started", icon: "๐Ÿš€" }, ]; +const communityPosts: CommunityPost[] = [ + { + id: "1", + author: "Aditya Sharma", + avatar: "๐Ÿ", + timeAgo: "2h", + category: "General", + title: "Monthly Challenge: Build with Docusaurus", + excerpt: + "This month, put your skills to the test by building a custom Docusaurus plugin. Share your progress and get feedback from the hive!", + likes: 24, + comments: 8, + type: "top", + }, + { + id: "2", + author: "Priya Nair", + avatar: "๐ŸŒป", + timeAgo: "5h", + category: "Show & Tell", + title: "My first open source PR merged!", + excerpt: + "Just got my first PR merged into recode hive. Huge thanks to the reviewers for the guidance โ€” onward to the next issue.", + likes: 41, + comments: 15, + type: "top", + }, + { + id: "3", + author: "Rahul Verma", + avatar: "๐Ÿš€", + timeAgo: "1d", + category: "Resources", + title: "Curated list of beginner-friendly issues", + excerpt: + "Compiled a list of good-first-issues across our repos, sorted by difficulty. Great starting point for new contributors.", + likes: 33, + comments: 6, + type: "top", + }, + { + id: "4", + author: "Sneha Iyer", + avatar: "โœจ", + timeAgo: "10m", + category: "General", + title: "Weekend hack session โ€” who's in?", + excerpt: + "Planning an informal weekend hack session over Discord. Drop a comment if you'd like to join, all skill levels welcome.", + likes: 5, + comments: 3, + type: "newest", + }, + { + id: "5", + author: "Karan Mehta", + avatar: "๐Ÿ", + timeAgo: "45m", + category: "Show & Tell", + title: "Redesigned my portfolio using recode hive docs", + excerpt: + "Used a bunch of tips from our documentation section to rebuild my portfolio site. Sharing the repo in case it helps anyone.", + likes: 12, + comments: 4, + type: "newest", + }, +]; + +const communityNews: NewsItem[] = [ + { + id: "1", + title: "Creative Coding with p5.js", + date: "Jul 24th", + type: "Video", + thumbnail: "๐ŸŽจ", + }, + { + id: "2", + title: "13 Things to Do if You Were Ghosted by a Recruiter", + date: "Jul 18th", + type: "Video", + thumbnail: "๐ŸŒŸ", + }, + { + id: "3", + title: "12 Cool Open Source Project Ideas", + date: "Jun 18th", + type: "Blog", + thumbnail: "๐Ÿ’ก", + }, +]; + +const upcomingEvents: UpcomingEvent[] = [ + { + id: "1", + date: "12", + month: "AUG", + title: "recode hive Community AMA", + time: "Tue Aug 12th @ 3:00pm ET", + color: "#8b5cf6", + }, + { + id: "2", + date: "12", + month: "AUG", + title: "Open Source Office Hours", + time: "Tue Aug 12th @ 1:30pm ET", + color: "#10b981", + }, + { + id: "3", + date: "13", + month: "AUG", + title: "Resume Review Workshop", + time: "Wed Aug 13th @ 2:00pm ET", + color: "#f59e0b", + }, +]; + const thankYouIcons = [ { emoji: "๐Ÿ’š", label: "A little hive hug for you" }, { emoji: "๐ŸŽ‰", label: "Yay, you're part of the celebration" }, @@ -144,6 +294,7 @@ function CommunityPageContent(): React.ReactElement { const [activeSections, setActiveSections] = useState([ "how-you-can-contribute", ]); + const [activeFeedTab, setActiveFeedTab] = useState<"top" | "newest">("top"); const [selectedSection, setSelectedSection] = useState(null); const [openDropdowns, setOpenDropdowns] = useState([]); @@ -284,6 +435,138 @@ function CommunityPageContent(): React.ReactElement { + {/* Community Feed Section */} +
+
+
+
+
+ + +
+ +
+ {communityPosts + .filter((post) => post.type === activeFeedTab) + .map((post, index) => ( + +
+ {post.avatar} +
+ {post.author} + + {post.timeAgo} ยท #{post.category} + +
+
+

{post.title}

+

{post.excerpt}

+
+ โค๏ธ {post.likes} + ๐Ÿ’ฌ {post.comments} +
+
+ ))} +
+ + +
+ +
+
+
+

recode hive News

+ + See all + +
+ {communityNews.map((item) => ( +
+ {item.thumbnail} +
+

{item.title}

+ + {item.date} | {item.type} + +
+
+ ))} +
+ +
+
+

Upcoming Events

+
+ {upcomingEvents.map((event) => ( +
+
+ {event.date} + {event.month} +
+
+

{event.title}

+ {event.time} +
+
+ ))} +
+ + +
+

Community Guidelines

+ + Review our Code of Conduct + +
+ +
+
+
+
+
+ {/* How You Can Contribute Header */}