feat(blog): enhance content styling and add new blog post with sharing capabilities

- Refine blog typography with optimized font sizes and line heights for better readability
- Adjust heading margins and sizes (h1-h4) for improved visual hierarchy
- Implement custom bullet styling with primary color indicators for lists
- Add highlighted key phrases styling with left border accent for emphasized content
- Create new BlogShare component for social sharing functionality
- Add Callout and PullQuote content components for enhanced blog formatting
- Introduce resume-button.css for improved button styling
- Update blog post template with slug-based routing support
- Add new blog post "Career Change: From Huawei to Frontend" in English and Persian
- Enhance portfolio components (Hero, Skills, AIStack, etc.) with refined styling
- Improve RTL language support with better spacing and alignment for Persian content
- Add blog hero image asset (big-career-change.webp)
- Update i18n translations for new blog content and UI improvements
- Optimize code block and inline code styling with CSS variables for consistency
- Refine blockquote styling with better contrast and spacing
This commit is contained in:
mahdiarghyani
2025-12-13 18:05:39 +03:30
parent eb6a4adef3
commit 13031465e3
21 changed files with 1339 additions and 327 deletions
+136 -70
View File
@@ -2,11 +2,11 @@
/* Base typography */
.blog-content {
font-size: 1.125rem; /* 18px */
line-height: 2; /* خط‌فاصله بیشتر */
font-size: 1.0625rem; /* 17px - کمی کوچک‌تر */
line-height: 1.75; /* خط‌فاصله متعادل‌تر */
letter-spacing: 0.01em;
color: rgb(55, 65, 81);
max-width: 75ch;
max-width: 70ch; /* کمی باریک‌تر برای خوانایی بهتر */
overflow-wrap: break-word;
word-wrap: break-word;
word-break: break-word;
@@ -18,8 +18,9 @@
/* RTL-specific improvements */
.blog-content-rtl {
line-height: 2.2 !important; /* فارسی نیاز به فاصله بیشتری داره */
letter-spacing: 0.02em !important;
line-height: 1.9 !important; /* فارسی نیاز به فاصله بیشتری داره ولی نه خیلی زیاد */
letter-spacing: 0.015em !important;
font-size: 1.0625rem;
}
/* Force LTR for code blocks in RTL */
@@ -38,11 +39,11 @@
}
.blog-content h1 {
margin-top: 3rem;
margin-bottom: 2rem;
line-height: 1.4;
margin-top: 2.5rem;
margin-bottom: 1.5rem;
line-height: 1.3;
font-weight: 700;
font-size: 2.25em;
font-size: 2em;
color: rgb(17, 24, 39);
}
@@ -51,11 +52,11 @@
}
.blog-content h2 {
margin-top: 3rem;
margin-bottom: 1.75rem;
line-height: 1.5;
margin-top: 2.5rem;
margin-bottom: 1.25rem;
line-height: 1.4;
font-weight: 700;
font-size: 1.875em;
font-size: 1.75em;
color: rgb(17, 24, 39);
}
@@ -64,11 +65,11 @@
}
.blog-content h3 {
margin-top: 2.5rem;
margin-bottom: 1.5rem;
line-height: 1.6;
margin-top: 2rem;
margin-bottom: 1rem;
line-height: 1.5;
font-weight: 600;
font-size: 1.5em;
font-size: 1.375em;
color: rgb(17, 24, 39);
}
@@ -77,11 +78,11 @@
}
.blog-content h4 {
margin-top: 2rem;
margin-bottom: 1.25rem;
line-height: 1.6;
margin-top: 1.75rem;
margin-bottom: 0.875rem;
line-height: 1.5;
font-weight: 600;
font-size: 1.25em;
font-size: 1.125em;
color: rgb(17, 24, 39);
}
@@ -89,10 +90,10 @@
color: rgb(243, 244, 246);
}
/* Paragraphs - فاصله زیاد برای خوانایی بهتر */
/* Paragraphs - فاصله متعادل */
.blog-content p {
margin-top: 2rem;
margin-bottom: 2rem;
margin-top: 1.5rem;
margin-bottom: 1.5rem;
line-height: inherit;
}
@@ -101,14 +102,14 @@
.blog-content h2 + p,
.blog-content h3 + p,
.blog-content h4 + p {
margin-top: 1.25rem;
margin-top: 1rem;
}
/* Lists */
.blog-content ul,
.blog-content ol {
margin-top: 2.25rem;
margin-bottom: 2.25rem;
margin-top: 1.5rem;
margin-bottom: 1.5rem;
padding-left: 2rem;
}
@@ -118,14 +119,48 @@
padding-right: 2rem;
}
/* Better bullet styling with custom bullets */
.blog-content ul {
list-style: none;
}
.blog-content ul > li {
position: relative;
padding-left: 1.75rem;
}
.blog-content ul > li::before {
content: "●";
position: absolute;
left: 0.25rem;
color: var(--ui-color-primary-500);
font-size: 1.1em;
font-weight: bold;
line-height: 1.75;
}
.dark .blog-content ul > li::before {
color: var(--ui-color-primary-400);
}
.blog-content-rtl ul > li {
padding-left: 0;
padding-right: 1.75rem;
}
.blog-content-rtl ul > li::before {
left: auto;
right: 0.25rem;
}
.blog-content li {
margin-top: 1rem;
margin-bottom: 1rem;
line-height: 2;
margin-top: 0.75rem;
margin-bottom: 0.75rem;
line-height: 1.75;
}
.blog-content-rtl li {
line-height: 2.2;
line-height: 1.9;
}
.blog-content li p {
@@ -152,12 +187,41 @@
color: rgb(243, 244, 246);
}
/* Highlighted key phrases - for emphasized sentences */
.blog-content em strong,
.blog-content strong em {
background-color: var(--ui-color-primary-50);
border-left: 3px solid var(--ui-color-primary-500);
padding: 0.25rem 0.75rem;
border-radius: 0.375rem;
display: inline-block;
margin: 0.125rem 0;
font-style: normal;
}
.dark .blog-content em strong,
.dark .blog-content strong em {
background-color: color-mix(in srgb, var(--ui-color-primary-950) 30%, transparent);
border-left-color: var(--ui-color-primary-400);
}
.blog-content-rtl em strong,
.blog-content-rtl strong em {
border-left: none;
border-right: 3px solid var(--ui-color-primary-500);
}
.dark .blog-content-rtl em strong,
.dark .blog-content-rtl strong em {
border-right-color: var(--ui-color-primary-400);
}
/* Code blocks */
.blog-content pre {
margin-top: 3rem;
margin-bottom: 3rem;
line-height: 1.7;
font-size: 0.9375rem;
margin-top: 2rem;
margin-bottom: 2rem;
line-height: 1.6;
font-size: 0.875rem;
overflow-x: auto;
max-width: 100%;
}
@@ -171,42 +235,42 @@
/* Inline code */
.blog-content code:not(pre code) {
padding: 0.25em 0.5em;
background-color: rgba(99, 102, 241, 0.1);
background-color: var(--ui-color-primary-100);
color: var(--ui-color-primary-700);
border-radius: 0.375rem;
font-size: 0.9em;
font-weight: 500;
color: rgb(79, 70, 229);
}
.dark .blog-content code:not(pre code) {
background-color: rgba(99, 102, 241, 0.2);
color: rgb(165, 180, 252);
background-color: color-mix(in srgb, var(--ui-color-primary-950) 40%, transparent);
color: var(--ui-color-primary-300);
}
/* Blockquotes */
.blog-content blockquote {
margin-top: 3rem;
margin-bottom: 3rem;
padding: 1.75rem;
border-left: 4px solid rgb(99, 102, 241);
background-color: rgba(99, 102, 241, 0.05);
margin-top: 2rem;
margin-bottom: 2rem;
padding: 1.5rem;
border-left: 4px solid var(--ui-color-primary-500);
background-color: var(--ui-color-primary-50);
border-radius: 0.75rem;
font-style: italic;
line-height: 2;
line-height: 1.75;
}
.dark .blog-content blockquote {
border-left-color: var(--ui-color-primary-400);
background-color: color-mix(in srgb, var(--ui-color-primary-950) 20%, transparent);
}
.blog-content-rtl blockquote {
border-left: none;
border-right: 4px solid rgb(99, 102, 241);
}
.dark .blog-content blockquote {
background-color: rgba(99, 102, 241, 0.1);
border-left-color: rgb(129, 140, 248);
border-right: 4px solid var(--ui-color-primary-500);
}
.dark .blog-content-rtl blockquote {
border-right-color: rgb(129, 140, 248);
border-right-color: var(--ui-color-primary-400);
}
.blog-content blockquote p {
@@ -216,31 +280,33 @@
/* Links */
.blog-content a {
color: rgb(99, 102, 241);
color: var(--ui-color-primary-600);
text-decoration: underline;
text-decoration-color: rgba(99, 102, 241, 0.3);
text-decoration-color: var(--ui-color-primary-300);
text-underline-offset: 0.25em;
font-weight: 500;
transition: all 0.2s ease;
}
.blog-content a:hover {
color: rgb(79, 70, 229);
text-decoration-color: rgba(99, 102, 241, 0.8);
.dark .blog-content a {
color: var(--ui-color-primary-400);
text-decoration-color: var(--ui-color-primary-600);
}
.dark .blog-content a {
color: rgb(129, 140, 248);
.blog-content a:hover {
color: var(--ui-color-primary-700);
text-decoration-color: var(--ui-color-primary-500);
}
.dark .blog-content a:hover {
color: rgb(165, 180, 252);
color: var(--ui-color-primary-300);
text-decoration-color: var(--ui-color-primary-400);
}
/* Horizontal rule */
.blog-content hr {
margin-top: 3.5rem;
margin-bottom: 3.5rem;
margin-top: 2.5rem;
margin-bottom: 2.5rem;
border-color: rgba(148, 163, 184, 0.3);
}
@@ -250,19 +316,19 @@
/* Images */
.blog-content img {
margin-top: 3rem;
margin-bottom: 3rem;
margin-top: 2rem;
margin-bottom: 2rem;
border-radius: 0.75rem;
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
/* Tables */
.blog-content table {
margin-top: 3rem;
margin-bottom: 3rem;
margin-top: 2rem;
margin-bottom: 2rem;
width: 100%;
border-collapse: collapse;
font-size: 0.9375rem;
font-size: 0.875rem;
display: block;
overflow-x: auto;
max-width: 100%;
@@ -282,13 +348,13 @@
}
.blog-content th {
background-color: rgba(99, 102, 241, 0.1);
font-weight: 600;
background-color: var(--ui-color-primary-100);
color: rgb(17, 24, 39);
font-weight: 600;
}
.dark .blog-content th {
background-color: rgba(99, 102, 241, 0.15);
background-color: color-mix(in srgb, var(--ui-color-primary-950) 30%, transparent);
color: rgb(243, 244, 246);
}
+96 -12
View File
@@ -5,6 +5,7 @@
@import "./transitions.css";
@import "./prose.css";
@import "./blog-content.css";
@import "./resume-button.css";
@source "../../components/**/*.{vue,js,ts}";
@source "../../layouts/**/*.vue";
@@ -146,15 +147,15 @@
}
:root {
--scrollbar-track: color-mix(in oklch, #e0e7ff 35%, transparent);
--scrollbar-thumb: color-mix(in oklch, #7c3aed 65%, #6d28d9 35%);
--scrollbar-thumb-hover: color-mix(in oklch, #7c3aed 80%, #a855f7 20%);
--scrollbar-track: color-mix(in srgb, var(--ui-color-primary-100) 35%, transparent);
--scrollbar-thumb: color-mix(in srgb, var(--ui-color-primary-500) 65%, var(--ui-color-primary-600) 35%);
--scrollbar-thumb-hover: color-mix(in srgb, var(--ui-color-primary-500) 80%, var(--ui-color-primary-400) 20%);
}
:root.dark {
--scrollbar-track: color-mix(in oklch, #0b1020 80%, #7c3aed 20%);
--scrollbar-thumb: color-mix(in oklch, #a855f7 65%, #7c3aed 35%);
--scrollbar-thumb-hover: color-mix(in oklch, #c084fc 75%, #8b5cf6 25%);
--scrollbar-track: color-mix(in srgb, #0b1020 80%, var(--ui-color-primary-500) 20%);
--scrollbar-thumb: color-mix(in srgb, var(--ui-color-primary-400) 65%, var(--ui-color-primary-500) 35%);
--scrollbar-thumb-hover: color-mix(in srgb, var(--ui-color-primary-300) 75%, var(--ui-color-primary-400) 25%);
}
/* Global scrollbar styling */
@@ -297,16 +298,51 @@
}
.glass-card:hover {
@apply shadow-2xl shadow-violet-500/10 dark:shadow-violet-500/20 translate-y-[-2px];
@apply translate-y-[-2px];
box-shadow:
0 25px 50px -12px color-mix(in srgb, var(--ui-color-primary-500) 10%, transparent);
}
.dark .glass-card:hover {
box-shadow:
0 25px 50px -12px color-mix(in srgb, var(--ui-color-primary-500) 20%, transparent);
}
/* Global hover utilities for consistent interactions */
/* Global hover utilities for consistent interactions - using dynamic theme colors */
.hover-ring-tint {
@apply transition-all duration-300 ease-out ring-0 hover:ring-2 hover:ring-violet-500 dark:hover:ring-violet-400 hover:bg-violet-50/60 dark:hover:bg-violet-400/10 focus-visible:ring-2 focus-visible:ring-violet-500 dark:focus-visible:ring-violet-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white dark:focus-visible:ring-offset-zinc-900;
@apply transition-all duration-300 ease-out focus-visible:ring-offset-2 focus-visible:ring-offset-white dark:focus-visible:ring-offset-zinc-900;
}
.hover-ring-tint:hover {
box-shadow: 0 0 0 2px var(--ui-color-primary-500);
background-color: color-mix(in srgb, var(--ui-color-primary-50) 60%, transparent);
}
.dark .hover-ring-tint:hover {
box-shadow: 0 0 0 2px var(--ui-color-primary-400);
background-color: color-mix(in srgb, var(--ui-color-primary-400) 10%, transparent);
}
.hover-ring-tint:focus-visible {
box-shadow: 0 0 0 2px var(--ui-color-primary-500);
}
.dark .hover-ring-tint:focus-visible {
box-shadow: 0 0 0 2px var(--ui-color-primary-400);
}
.link-hover-clean {
@apply transition-all duration-300 hover:text-violet-600 dark:hover:text-violet-400 hover:underline underline-offset-4 decoration-violet-500/60 dark:decoration-violet-400/60;
@apply transition-all duration-300 hover:underline underline-offset-4;
}
.link-hover-clean:hover {
color: var(--ui-color-primary-600);
text-decoration-color: color-mix(in srgb, var(--ui-color-primary-500) 60%, transparent);
}
.dark .link-hover-clean:hover {
color: var(--ui-color-primary-400);
text-decoration-color: color-mix(in srgb, var(--ui-color-primary-400) 60%, transparent);
}
}
@@ -314,7 +350,12 @@
/* Minimal hover: subtle bg tint, slight shadow, no ring/border change */
.hover-minimal {
@apply transition-all duration-300 ease-out hover:bg-violet-50/50 dark:hover:bg-white/5 hover:shadow-lg hover:shadow-violet-500/5;
@apply transition-all duration-300 ease-out dark:hover:bg-white/5 hover:shadow-lg;
}
.hover-minimal:hover {
background-color: color-mix(in srgb, var(--ui-color-primary-50) 50%, transparent);
box-shadow: 0 10px 15px -3px color-mix(in srgb, var(--ui-color-primary-500) 5%, transparent);
}
/* Modern button with gradient */
@@ -335,7 +376,50 @@
/* Chip-style icon button inspired by SkillGrid: subtle ring, soft bg, minimal hover */
.chip-button {
@apply inline-flex items-center justify-center h-12 w-12 rounded-2xl ring-1 ring-violet-200/70 dark:ring-violet-800/50 bg-gradient-to-br from-white/90 to-violet-50/50 dark:from-white/10 dark:to-violet-950/30 text-violet-700 dark:text-violet-200 shadow-lg shadow-violet-500/10 backdrop-blur-md transition-all duration-300 ease-out hover:scale-110 hover:shadow-xl hover:shadow-violet-500/20 hover:from-violet-50 hover:to-violet-100 dark:hover:from-white/15 dark:hover:to-violet-900/40;
@apply inline-flex items-center justify-center h-12 w-12 rounded-2xl ring-1 backdrop-blur-md transition-all duration-300 ease-out hover:scale-110;
/* Dynamic theme colors using CSS variables */
ring-color: color-mix(in srgb, var(--ui-color-primary-200) 70%, transparent);
background: linear-gradient(to bottom right,
color-mix(in srgb, white 90%, transparent),
color-mix(in srgb, var(--ui-color-primary-50) 50%, transparent)
);
color: var(--ui-color-primary-700);
box-shadow:
0 10px 15px -3px color-mix(in srgb, var(--ui-color-primary-500) 10%, transparent),
0 4px 6px -4px color-mix(in srgb, var(--ui-color-primary-500) 10%, transparent);
}
.chip-button:hover {
background: linear-gradient(to bottom right,
color-mix(in srgb, var(--ui-color-primary-50) 100%, transparent),
color-mix(in srgb, var(--ui-color-primary-100) 100%, transparent)
);
box-shadow:
0 20px 25px -5px color-mix(in srgb, var(--ui-color-primary-500) 20%, transparent),
0 8px 10px -6px color-mix(in srgb, var(--ui-color-primary-500) 20%, transparent);
}
.dark .chip-button {
ring-color: color-mix(in srgb, var(--ui-color-primary-800) 50%, transparent);
background: linear-gradient(to bottom right,
color-mix(in srgb, white 10%, transparent),
color-mix(in srgb, var(--ui-color-primary-950) 30%, transparent)
);
color: var(--ui-color-primary-200);
box-shadow:
0 10px 15px -3px color-mix(in srgb, var(--ui-color-primary-500) 5%, transparent),
0 4px 6px -4px color-mix(in srgb, var(--ui-color-primary-500) 5%, transparent);
}
.dark .chip-button:hover {
background: linear-gradient(to bottom right,
color-mix(in srgb, white 15%, transparent),
color-mix(in srgb, var(--ui-color-primary-900) 40%, transparent)
);
box-shadow:
0 20px 25px -5px color-mix(in srgb, var(--ui-color-primary-500) 10%, transparent),
0 8px 10px -6px color-mix(in srgb, var(--ui-color-primary-500) 10%, transparent);
}
/* GitHub Activity Contribution Graph - Dynamic Primary Color */
+82
View File
@@ -0,0 +1,82 @@
/* Resume Button with Dynamic Gradient */
.resume-gradient-button {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
padding: 0.875rem 1.75rem;
font-size: 1.125rem;
font-weight: 700;
color: white;
border-radius: 9999px;
position: relative;
overflow: hidden;
transition: all 0.3s ease;
/* Dynamic gradient using theme colors */
background: linear-gradient(
135deg,
var(--ui-color-primary-600) 0%,
var(--ui-color-primary-500) 50%,
color-mix(in srgb, var(--ui-color-primary-500) 80%, #ec4899 20%) 100%
);
/* Glow effect */
box-shadow:
0 0 30px color-mix(in srgb, var(--ui-color-primary-500) 40%, transparent),
0 10px 25px color-mix(in srgb, var(--ui-color-primary-600) 30%, transparent),
0 4px 12px rgba(0, 0, 0, 0.15);
}
.resume-gradient-button:hover {
transform: scale(1.05);
box-shadow:
0 0 40px color-mix(in srgb, var(--ui-color-primary-500) 60%, transparent),
0 0 60px color-mix(in srgb, var(--ui-color-primary-400) 40%, transparent),
0 15px 35px color-mix(in srgb, var(--ui-color-primary-600) 40%, transparent),
0 6px 20px rgba(0, 0, 0, 0.2);
}
/* Shine effect on hover */
.resume-gradient-button::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(
90deg,
transparent,
rgba(255, 255, 255, 0.3),
transparent
);
transition: left 0.5s ease;
}
.resume-gradient-button:hover::before {
left: 100%;
}
/* Dark mode adjustments */
.dark .resume-gradient-button {
background: linear-gradient(
135deg,
var(--ui-color-primary-500) 0%,
var(--ui-color-primary-600) 50%,
color-mix(in srgb, var(--ui-color-primary-600) 80%, #ec4899 20%) 100%
);
box-shadow:
0 0 35px color-mix(in srgb, var(--ui-color-primary-400) 50%, transparent),
0 10px 30px color-mix(in srgb, var(--ui-color-primary-500) 40%, transparent),
0 4px 12px rgba(0, 0, 0, 0.3);
}
.dark .resume-gradient-button:hover {
box-shadow:
0 0 50px color-mix(in srgb, var(--ui-color-primary-400) 70%, transparent),
0 0 80px color-mix(in srgb, var(--ui-color-primary-300) 50%, transparent),
0 15px 40px color-mix(in srgb, var(--ui-color-primary-500) 50%, transparent),
0 6px 20px rgba(0, 0, 0, 0.4);
}