Skip to content

Commit cc803a0

Browse files
Fix author name visibility in dark mode with professional horizontal layout
- Redesigned author layout from vertical circular to horizontal card style - Fixed author name visibility issues in dark mode - Added circular avatar on left with name beside it - Implemented social links row below author name - Added delightful hover effects and animations - Ensured perfect contrast in both light and dark themes - Made layout responsive for mobile devices - Updated styling across blog carousel and main blog pages Fixes author name display issues for better UX in Hacktoberfest 2025
1 parent f60f26b commit cc803a0

4 files changed

Lines changed: 773 additions & 78 deletions

File tree

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
"typecheck": "tsc"
1616
},
1717
"dependencies": {
18-
"@docusaurus/core": "^3.8.1",
19-
"@docusaurus/plugin-content-docs": "3.8.1",
20-
"@docusaurus/plugin-google-analytics": "^3.8.1",
21-
"@docusaurus/plugin-ideal-image": "3.8.1",
22-
"@docusaurus/preset-classic": "^3.8.1",
23-
"@docusaurus/theme-classic": "^3.8.1",
24-
"@docusaurus/theme-mermaid": "3.8.1",
25-
"@docusaurus/theme-search-algolia": "3.8.1",
18+
"@docusaurus/core": "3.9.1",
19+
"@docusaurus/plugin-content-docs": "3.9.1",
20+
"@docusaurus/plugin-google-analytics": "3.9.1",
21+
"@docusaurus/plugin-ideal-image": "3.9.1",
22+
"@docusaurus/preset-classic": "3.9.1",
23+
"@docusaurus/theme-classic": "3.9.1",
24+
"@docusaurus/theme-mermaid": "3.9.1",
25+
"@docusaurus/theme-search-algolia": "3.9.1",
2626
"@floating-ui/react": "^0.27.8",
2727
"@giscus/react": "^3.1.0",
2828
"@mdx-js/react": "^3.0.0",
@@ -57,9 +57,9 @@
5757
"vanilla-tilt": "^1.8.1"
5858
},
5959
"devDependencies": {
60-
"@docusaurus/module-type-aliases": "^3.8.1",
61-
"@docusaurus/tsconfig": "^3.8.1",
62-
"@docusaurus/types": "^3.8.1",
60+
"@docusaurus/module-type-aliases": "3.9.1",
61+
"@docusaurus/tsconfig": "3.9.1",
62+
"@docusaurus/types": "3.9.1",
6363
"@tailwindcss/postcss": "^4.1.4",
6464
"@types/canvas-confetti": "^1.9.0",
6565
"@types/react": "^19.1.9",

src/components/blogCarousel/blogCarousel.css

Lines changed: 122 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -207,53 +207,144 @@
207207

208208
.card-author {
209209
display: flex;
210-
align-items: center;
210+
flex-direction: column;
211+
align-items: flex-start;
212+
justify-content: center;
211213
gap: 8px;
212214
flex: 1;
213215
min-width: 0;
216+
max-width: 300px;
217+
position: relative;
218+
padding: 12px;
219+
text-align: left;
220+
transition: all 0.3s ease;
221+
}
222+
223+
[data-theme='dark'] .card-author {
224+
background: linear-gradient(135deg,
225+
rgba(15, 23, 42, 0.4) 0%,
226+
rgba(30, 41, 59, 0.3) 100%);
227+
border: 1px solid rgba(99, 102, 241, 0.2);
228+
backdrop-filter: blur(8px);
229+
}
230+
231+
[data-theme='dark'] .card-author:hover {
232+
background: linear-gradient(135deg,
233+
rgba(15, 23, 42, 0.6) 0%,
234+
rgba(30, 41, 59, 0.5) 100%);
235+
border-color: rgba(99, 102, 241, 0.4);
236+
transform: translateY(-2px);
237+
box-shadow: 0 4px 16px rgba(79, 70, 229, 0.2);
238+
}
239+
240+
.card-author {
241+
background: linear-gradient(135deg,
242+
rgba(255, 255, 255, 0.9) 0%,
243+
rgba(248, 250, 252, 0.8) 100%);
244+
border: 1px solid rgba(99, 102, 241, 0.15);
245+
}
246+
247+
.card-author:hover {
248+
background: linear-gradient(135deg,
249+
rgba(255, 255, 255, 0.95) 0%,
250+
rgba(248, 250, 252, 0.9) 100%);
251+
border-color: rgba(99, 102, 241, 0.3);
252+
transform: translateY(-2px);
253+
box-shadow: 0 4px 16px rgba(99, 102, 241, 0.15);
214254
}
215255

256+
/* 🎯 Horizontal Author Layout for Blog Carousel */
216257
.author-avatar {
217-
width: 28px;
218-
height: 28px;
219-
border-radius: 50%;
220-
background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
221-
display: flex;
222-
align-items: center;
223-
justify-content: center;
224-
font-size: 14px;
225-
color: white;
226-
font-weight: 600;
227-
box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
228-
flex-shrink: 0;
229-
transition: all 0.3s ease;
258+
display: flex !important;
259+
flex-direction: row !important;
260+
align-items: flex-start !important;
261+
width: auto !important;
262+
height: auto !important;
263+
border-radius: 16px !important;
264+
background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%) !important;
265+
border: 2px solid #e2e8f0 !important;
266+
padding: 16px !important;
267+
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
268+
text-align: left !important;
269+
transition: all 0.3s ease !important;
270+
max-width: 280px !important;
271+
}
272+
273+
[data-theme='dark'] .author-avatar {
274+
background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
275+
border-color: #374151 !important;
276+
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
277+
}
278+
279+
.author-avatar img {
280+
width: 50px !important;
281+
height: 50px !important;
282+
border-radius: 50% !important;
283+
border: 3px solid #6366f1 !important;
284+
object-fit: cover !important;
285+
margin: 0 12px 0 0 !important;
286+
flex-shrink: 0 !important;
287+
}
288+
289+
[data-theme='dark'] .author-avatar img {
290+
border-color: #8b5cf6 !important;
291+
}
292+
293+
/* Professional glow effect for blog carousel avatars */
294+
.author-avatar::before {
295+
content: '';
296+
position: absolute;
297+
top: -50%;
298+
left: -50%;
299+
width: 200%;
300+
height: 200%;
301+
background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.3) 50%, transparent 70%);
302+
transform: rotate(45deg);
303+
transition: all 0.6s ease;
304+
opacity: 0;
230305
}
231306

232-
.author-avatar:hover {
233-
transform: scale(1.1);
234-
box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
307+
.author-avatar:hover::before {
308+
opacity: 1;
309+
animation: shimmer 1.2s ease-in-out;
235310
}
236311

237-
.author-name {
238-
font-size: 12px;
239-
color: #475569;
240-
font-weight: 600;
241-
white-space: nowrap;
242-
overflow: hidden;
243-
text-overflow: ellipsis;
244-
transition: color 0.2s ease;
312+
[data-theme='dark'] .author-avatar {
313+
background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #ec4899 100%);
314+
box-shadow:
315+
0 6px 20px rgba(79, 70, 229, 0.4),
316+
0 3px 10px rgba(124, 58, 237, 0.3);
317+
border: 2px solid rgba(99, 102, 241, 0.3);
245318
}
246319

247-
.author-name:hover {
248-
color: #6366f1;
320+
.author-avatar:hover {
321+
transform: scale(1.15) translateY(-2px);
322+
box-shadow:
323+
0 8px 25px rgba(99, 102, 241, 0.5),
324+
0 4px 15px rgba(139, 92, 246, 0.4);
249325
}
250326

251-
[data-theme='dark'] .author-name {
252-
color: #cbd5e1;
327+
/* 🎯 Author Name Beside Avatar */
328+
.author-name {
329+
color: #1e293b !important;
330+
font-weight: 700 !important;
331+
font-size: 14px !important;
332+
text-align: left !important;
333+
margin: 0 !important;
334+
line-height: 1.3 !important;
335+
flex: 1 !important;
336+
letter-spacing: 0.3px !important;
337+
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8) !important;
338+
-webkit-text-fill-color: #1e293b !important;
339+
background: none !important;
340+
visibility: visible !important;
341+
opacity: 1 !important;
253342
}
254343

255-
[data-theme='dark'] .author-name:hover {
256-
color: #a78bfa;
344+
[data-theme='dark'] .author-name {
345+
color: #ffffff !important;
346+
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7) !important;
347+
-webkit-text-fill-color: #ffffff !important;
257348
}
258349

259350
.card-read-time {

0 commit comments

Comments
 (0)