Skip to content

Commit bd9e54b

Browse files
authored
Merge branch 'recodehive:main' into Adez017/broken-blogs
2 parents 9989ab5 + 502c745 commit bd9e54b

File tree

8 files changed

+231
-37
lines changed

8 files changed

+231
-37
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/* THIS CSS IS ONLY FOR " OUR PROJECT " as the width available for embeded page is extremly small */
2+
3+
/* Responsive overrides for embedded preview on small screens */
4+
5+
/* For widths below 768px: give the card extra height and reduce chrome */
6+
@media (max-width: 767px) {
7+
.ourprojects-embed-container {
8+
min-height: 82vh !important;
9+
}
10+
.ourprojects-embed-card {
11+
height: 82vh !important;
12+
border-radius: 1.25rem !important; /* smaller radius to fit */
13+
}
14+
.ourprojects-iframe {
15+
height: 220% !important; /* more scrollable viewport */
16+
}
17+
/* Improve readability on dark previews */
18+
.ourprojects-overlay {
19+
background: linear-gradient(to top, rgba(0,0,0,0.35), transparent 50%, transparent) !important;
20+
}
21+
.ourprojects-live-indicator {
22+
display: none !important; /* avoid overlapping text, see red arrow in screenshot */
23+
}
24+
}
25+
26+
/* For ultra small widths below 360px (covers 320px phones) */
27+
@media (max-width: 360px) {
28+
.ourprojects-embed-container {
29+
min-height: 88vh !important;
30+
}
31+
.ourprojects-embed-card {
32+
height: 88vh !important;
33+
}
34+
.ourprojects-iframe {
35+
height: 250% !important;
36+
}
37+
.ourprojects-live-indicator { display: none !important; }
38+
}
39+
40+
/* Safety for <320px specifically if needed */
41+
@media (max-width: 320px) {
42+
.ourprojects-embed-container {
43+
min-height: 92vh !important;
44+
}
45+
.ourprojects-embed-card {
46+
height: 92vh !important;
47+
}
48+
.ourprojects-iframe {
49+
height: 280% !important;
50+
}
51+
.ourprojects-live-indicator { display: none !important; }
52+
}
53+
54+
/* Subtle text shadow to enhance contrast for any headings rendered inside iframe snapshot area
55+
Note: This only affects overlay/indicators we own, not cross-origin iframe content */
56+
.ourprojects-embed-card .text-shadow-soft {
57+
text-shadow: 0 1px 2px rgba(0,0,0,0.35);
58+
}

src/components/ourProjects.tsx

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import { useState } from "react";
55
import { motion } from "framer-motion";
66
import React from "react";
77
import { useColorMode } from "@docusaurus/theme-common";
8+
// Mobile-specific overrides for very small screens (<768px and <320px)
9+
import "./ourProjects.mobile.css";
810

911
export interface OurProjectsData {
1012
tag: string;
@@ -160,7 +162,7 @@ const SelectComponent = ({
160162
))}
161163
</div>
162164

163-
<div className={`col-span-1 md:col-span-8 p-4 md:p-8 relative overflow-hidden min-h-[70vh]`}>
165+
<div className={`col-span-1 md:col-span-8 p-4 md:p-8 relative overflow-hidden min-h-[80vh] md:min-h-[70vh] ourprojects-embed-container`}>
164166
{/* Animated Mesh Background */}
165167
<div className="absolute inset-0 bg-gradient-to-br from-purple-600/30 via-blue-600/30 via-cyan-500/30 to-emerald-500/30 rounded-3xl">
166168
<div className="absolute inset-0 bg-[radial-gradient(circle_at_50%_50%,rgba(120,119,198,0.3),transparent_50%)] animate-pulse"></div>
@@ -196,7 +198,7 @@ const SelectComponent = ({
196198
<motion.div
197199
animate={{ y: [-10, 10, -10], rotate: [0, 5, 0] }}
198200
transition={{ duration: 4, repeat: Infinity }}
199-
className="absolute top-8 right-8 w-16 h-16 bg-gradient-to-br from-purple-500 via-blue-500 to-cyan-500 rounded-2xl flex items-center justify-center shadow-2xl backdrop-blur-sm border border-white/20"
201+
className="hidden md:flex absolute top-8 right-8 w-16 h-16 bg-gradient-to-br from-purple-500 via-blue-500 to-cyan-500 rounded-2xl items-center justify-center shadow-2xl backdrop-blur-sm border border-white/20"
200202
>
201203
<svg className="w-8 h-8 text-white" fill="currentColor" viewBox="0 0 24 24">
202204
<path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/>
@@ -207,15 +209,15 @@ const SelectComponent = ({
207209
<motion.div
208210
animate={{ x: [-5, 5, -5], rotate: [0, -10, 0] }}
209211
transition={{ duration: 3, repeat: Infinity }}
210-
className="absolute top-20 left-8 w-12 h-12 bg-gradient-to-br from-emerald-400 via-blue-500 to-purple-600 rounded-xl shadow-xl backdrop-blur-sm border border-white/20 flex items-center justify-center"
212+
className="hidden md:flex absolute top-20 left-8 w-12 h-12 bg-gradient-to-br from-emerald-400 via-blue-500 to-purple-600 rounded-xl shadow-xl backdrop-blur-sm border border-white/20 items-center justify-center"
211213
>
212214
<span className="text-white text-xl"></span>
213215
</motion.div>
214216

215217
<motion.div
216218
animate={{ scale: [1, 1.2, 1], opacity: [0.7, 1, 0.7] }}
217219
transition={{ duration: 2, repeat: Infinity }}
218-
className="absolute bottom-20 right-16 w-10 h-10 bg-gradient-to-r from-pink-400 via-purple-500 to-indigo-600 rounded-full shadow-lg backdrop-blur-sm border border-white/30 flex items-center justify-center"
220+
className="hidden md:flex absolute bottom-20 right-16 w-10 h-10 bg-gradient-to-r from-pink-400 via-purple-500 to-indigo-600 rounded-full shadow-lg backdrop-blur-sm border border-white/30 items-center justify-center"
219221
>
220222
<span className="text-white text-sm">🚀</span>
221223
</motion.div>
@@ -228,14 +230,14 @@ const SelectComponent = ({
228230
transition={{ duration: 0.8, ease: "easeOut" }}
229231
className="relative z-10 perspective-1000"
230232
>
231-
<div className={`h-[35vh] md:h-[65vh] rounded-3xl overflow-hidden shadow-2xl backdrop-blur-md border-2 transform hover:scale-105 hover:rotateY-5 transition-all duration-700 group ${
233+
<div className={`h-[78vh] sm:h-[80vh] md:h-[65vh] rounded-2xl sm:rounded-3xl overflow-hidden shadow-2xl backdrop-blur-md border-2 transform hover:scale-105 md:hover:rotateY-5 transition-all duration-700 group ourprojects-embed-card ${
232234
isDark ? 'bg-gray-900/95 border-purple-500/50 shadow-purple-500/25' : 'bg-white/95 border-blue-400/50 shadow-blue-500/25'
233235
}`}>
234236
{/* Holographic Border Effect */}
235237
<div className="absolute -inset-0.5 bg-gradient-to-r from-purple-500 via-blue-500 to-cyan-500 rounded-3xl blur opacity-20 group-hover:opacity-40 transition-opacity duration-500"></div>
236238

237239
{/* Premium Browser Header */}
238-
<div className={`relative flex items-center px-6 py-4 border-b backdrop-blur-xl ${
240+
<div className={`relative flex items-center px-3 py-2 sm:px-6 sm:py-4 border-b backdrop-blur-xl ${
239241
isDark ? 'bg-gray-800/90 border-gray-600/50' : 'bg-gray-50/90 border-gray-300/50'
240242
}`}>
241243
<div className="flex space-x-3 mr-6">
@@ -259,7 +261,7 @@ const SelectComponent = ({
259261
</motion.div>
260262
</div>
261263

262-
<div className={`flex-1 px-4 py-3 rounded-2xl text-sm font-mono flex items-center backdrop-blur-sm relative overflow-hidden ${
264+
<div className={`flex-1 px-2 py-2 sm:px-4 sm:py-3 rounded-2xl text-xs sm:text-sm font-mono flex items-center backdrop-blur-sm relative overflow-hidden ${
263265
isDark ? 'bg-gray-700/70 text-gray-200 border border-gray-500/50' : 'bg-white/80 text-gray-700 border border-gray-300/50 shadow-inner'
264266
}`}>
265267
<div className="absolute inset-0 bg-gradient-to-r from-transparent via-white/5 to-transparent animate-pulse"></div>
@@ -285,7 +287,7 @@ const SelectComponent = ({
285287
<motion.div
286288
animate={{ scale: [1, 1.05, 1] }}
287289
transition={{ duration: 2, repeat: Infinity }}
288-
className={`ml-4 px-4 py-2 rounded-xl text-xs font-bold flex items-center backdrop-blur-sm ${
290+
className={`ml-2 sm:ml-4 px-2 py-1 sm:px-4 sm:py-2 rounded-xl text-[10px] sm:text-xs font-bold flex items-center backdrop-blur-sm ${
289291
isDark ? 'bg-gradient-to-r from-emerald-600 to-green-600 text-white shadow-lg' : 'bg-gradient-to-r from-emerald-100 to-green-100 text-emerald-700 shadow-md'
290292
}`}
291293
>
@@ -306,7 +308,7 @@ const SelectComponent = ({
306308
transition={{ duration: 1, ease: "easeOut" }}
307309
className="relative h-full overflow-hidden group"
308310
>
309-
{(items[activeItem].title === "Awesome GitHub Profile" || items[activeItem].title === "Machine Learning Repository") ? (
311+
{(items[activeItem].title === "Awesome GitHub Profile" || items[activeItem].title === "Machine Learning Repository") ? (
310312
/* Auto-scrolling Website Iframe */
311313
<motion.div
312314
className="relative w-full h-full overflow-hidden cursor-pointer"
@@ -315,7 +317,7 @@ const SelectComponent = ({
315317
<motion.iframe
316318
key={activeItem}
317319
src={PROJECT_URLS[items[activeItem].title] || "about:blank"}
318-
className="w-full h-[200%] border-0 origin-top pointer-events-none"
320+
className="w-full h-[220%] sm:h-[200%] border-0 origin-top pointer-events-none ourprojects-iframe"
319321
initial={{ opacity: 0, y: 0 }}
320322
animate={{
321323
opacity: 1,
@@ -360,7 +362,7 @@ const SelectComponent = ({
360362

361363
{/* Dynamic Indicator */}
362364
<motion.div
363-
className={`absolute bottom-4 right-4 backdrop-blur-sm rounded-full px-3 py-2 text-white text-xs font-medium flex items-center ${
365+
className={`ourprojects-live-indicator absolute bottom-4 right-4 backdrop-blur-sm rounded-full px-3 py-2 text-white text-xs font-medium flex items-center ${
364366
(items[activeItem].title === "Awesome GitHub Profile" || items[activeItem].title === "Machine Learning Repository")
365367
? "bg-green-600/90"
366368
: "bg-blue-600/90"
@@ -379,7 +381,7 @@ const SelectComponent = ({
379381
</motion.div>
380382

381383
{/* Holographic Overlay */}
382-
<div className="absolute inset-0 bg-gradient-to-t from-black/30 via-transparent to-transparent pointer-events-none">
384+
<div className="ourprojects-overlay absolute inset-0 bg-gradient-to-t from-black/30 via-transparent to-transparent pointer-events-none">
383385
<div className="absolute inset-0 bg-gradient-to-br from-purple-500/10 via-transparent to-cyan-500/10"></div>
384386
</div>
385387

@@ -390,7 +392,7 @@ const SelectComponent = ({
390392
</motion.div>
391393

392394
{/* 3D Floating Background Mockups */}
393-
<div className="absolute inset-0 pointer-events-none">
395+
<div className="hidden md:block absolute inset-0 pointer-events-none">
394396
{items.map((item, index) => {
395397
if (index === activeItem) return null;
396398
const positions = [

src/components/topmate/TopMateCard.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ const TopMateCard: React.FC<TopMateCardProps> = ({
7474
<p className={`${isDark ? 'text-gray-300' : 'text-gray-600'} mb-6`}>{description}</p>
7575

7676
{/* Profile Section */}
77-
<div className="flex items-center justify-between">
78-
<div className="flex items-center gap-3">
77+
<div className="flex items-center justify-between flex-wrap md:flex-nowrap gap-y-3">
78+
<div className="flex items-center gap-3 min-w-0">
7979
<img
8080
src={profileImage}
8181
alt="Profile"
@@ -89,14 +89,14 @@ const TopMateCard: React.FC<TopMateCardProps> = ({
8989
href={`https://topmate.io/${username}`}
9090
target="_blank"
9191
rel="noopener noreferrer"
92-
className="text-purple-500 font-semibold hover:text-purple-600 transition-colors flex items-center gap-1"
92+
className="text-purple-500 font-semibold hover:text-purple-600 transition-colors flex items-center gap-1 truncate"
9393
>
94-
topmate.io/{username}
94+
<span className="truncate">topmate.io/{username}</span>
9595
<ArrowUpRight size={16} />
9696
</a>
9797
</div>
9898
</div>
99-
<div className="flex items-center gap-2">
99+
<div className="flex items-center gap-2 shrink-0">
100100
{/* Show only the circular icon part of the Topmate logo */}
101101
<div className="h-4 w-4 overflow-hidden flex-shrink-0 rounded-sm">
102102
<img
@@ -106,7 +106,7 @@ const TopMateCard: React.FC<TopMateCardProps> = ({
106106
/>
107107
</div>
108108
{/* Theme-aware text to ensure readability on dark backgrounds */}
109-
<span className={`text-sm font-semibold ${isDark ? 'text-gray-200' : 'text-gray-700'}`}>topmate</span>
109+
<span className={`text-sm font-semibold shrink-0 ${isDark ? 'text-gray-200' : 'text-gray-700'}`}>topmate</span>
110110
</div>
111111
</div>
112112
</div>

src/css/custom.css

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,6 +1029,77 @@ html {
10291029
}
10301030
}
10311031

1032+
/* Mobile-only visibility & spacing fixes for Tutorials icons (320–768px) */
1033+
@media screen and (max-width: 768px) {
1034+
/* Ensure the label + icons row inside Docs dropdown uses the full width */
1035+
.navbar-sidebar .grid,
1036+
.navbar-sidebar .dropdown__menu .grid,
1037+
.navbar-sidebar .dropdown-content .grid {
1038+
width: 100% !important;
1039+
column-gap: 0.5rem !important;
1040+
row-gap: 0.6rem !important;
1041+
align-items: center !important; /* align titles with icons vertically */
1042+
}
1043+
1044+
/* So the icon column doesn't get clipped in the 3-col layout */
1045+
.navbar-sidebar .grid > .col-span-2 {
1046+
min-width: 0 !important;
1047+
}
1048+
1049+
/* Tighten label space and drop the border on very small screens */
1050+
.navbar-sidebar .grid > .border-r.col-span-1 {
1051+
border-right: 0 !important;
1052+
padding-right: 0.25rem !important;
1053+
font-weight: 600;
1054+
display: flex !important; /* center the title block */
1055+
align-items: center !important; /* vertically center with icons */
1056+
line-height: 1.1 !important; /* avoid baseline drift */
1057+
}
1058+
1059+
/* The inner icon group for Tutorials/Courses only (have grid-cols-4) */
1060+
.navbar-sidebar .grid .grid.grid-cols-4,
1061+
.navbar-sidebar .dropdown__menu .grid .grid.grid-cols-4,
1062+
.navbar-sidebar .dropdown-content .grid .grid.grid-cols-4 {
1063+
display: grid !important;
1064+
grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
1065+
column-gap: 0.5rem !important; /* keep columns tight */
1066+
row-gap: 1.5rem !important;
1067+
overflow: visible !important;
1068+
}
1069+
1070+
/* Make each Tutorial/Course icon compact while readable */
1071+
.navbar-sidebar .grid .grid.grid-cols-4 .nav__icons {
1072+
padding: 0 !important;
1073+
margin: 0.4rem 0 !important; /* even more vertical breathing room */
1074+
}
1075+
.navbar-sidebar .grid .grid.grid-cols-4 .nav__icons img {
1076+
width: 30px !important;
1077+
height: 30px !important;
1078+
}
1079+
1080+
/* Keep Interview Prep text links comfortable and not cramped */
1081+
.navbar-sidebar .grid .grid.grid-cols-1 .nav__icons {
1082+
display: inline-flex !important;
1083+
align-items: center !important;
1084+
padding: 0.25rem 0.1rem !important;
1085+
font-size: 0.95rem !important;
1086+
}
1087+
1088+
/* Add vertical space between Tutorials, Courses, Interview Prep blocks */
1089+
.navbar-sidebar .dropdown__menu > .grid {
1090+
padding: 1rem 0 !important;
1091+
margin: 1rem 0 !important;
1092+
}
1093+
1094+
/* Dark mode: ensure GitHub/Next.js icons are visible in Tutorials on mobile */
1095+
[data-theme="dark"] .navbar-sidebar .nav__icons img[alt="GitHub"],
1096+
[data-theme="dark"] .navbar-sidebar .nav__icons img[alt="Nextjs"],
1097+
[data-theme="dark"] .navbar-sidebar img[src$="/icons/github.svg"],
1098+
[data-theme="dark"] .navbar-sidebar img[src$="/icons/nextjs.svg"] {
1099+
filter: invert(1) brightness(1.1) contrast(1.05) !important;
1100+
}
1101+
}
1102+
10321103
/* STAR section border fixes for dark mode */
10331104
[data-theme="dark"] .star-border-red {
10341105
border-color: #ef4444 !important;

src/pages/community/index.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const contributionSections: ContributionSection[] = [
2828
],
2929
links: [
3030
{ text: 'GitHub', url: 'https://github.com/recodehive' },
31-
{ text: 'GitLab', url: '/community' }
31+
{ text: 'GitLab', url: 'https://gitlab.com' }
3232
],
3333
color: '#8b5cf6'
3434
},
@@ -74,8 +74,8 @@ const contributionSections: ContributionSection[] = [
7474
'Share knowledge and insights'
7575
],
7676
links: [
77-
{ text: 'Discord', url: '/community' },
78-
{ text: 'Slack', url: '/community' }
77+
{ text: 'Discord', url: 'https://discord.gg/Yxv9RA3r' },
78+
{ text: 'Slack', url: 'https://slack.com' }
7979
],
8080
color: '#10b981'
8181
},
@@ -90,8 +90,8 @@ const contributionSections: ContributionSection[] = [
9090
'Pick a task or area you\'re excited about!'
9191
],
9292
links: [
93-
{ text: 'Discord', url: '/community' },
94-
{ text: 'Slack', url: '/community' },
93+
{ text: 'Discord', url: 'https://discord.gg/Yxv9RA3r' },
94+
{ text: 'Slack', url: 'https://slack.com' },
9595
{ text: 'GitHub', url: 'https://github.com/recodehive' }
9696
],
9797
color: '#6366f1'
@@ -108,7 +108,7 @@ const tableOfContents = [
108108
{ id: 'thank-you', title: 'Thank You', icon: '💚' }
109109
];
110110

111-
export default function CommunityPage(): JSX.Element {
111+
export default function CommunityPage(): React.ReactElement {
112112
const [activeSections, setActiveSections] = useState<string[]>(['how-you-can-contribute']);
113113
const [selectedSection, setSelectedSection] = useState<string | null>(null);
114114

0 commit comments

Comments
 (0)