Skip to content

Commit f5d3c19

Browse files
committed
Merge branch 'main' of https://github.com/recodehive/recode-website into blog/google-icon-doc
2 parents fd22dfa + 32b0c2e commit f5d3c19

3 files changed

Lines changed: 102 additions & 8 deletions

File tree

src/css/custom.css

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2094,16 +2094,22 @@ html[data-theme="dark"] {
20942094
max-width: 280px !important;
20952095
padding-left: 0 !important;
20962096
padding-right: 0.5rem !important;
2097-
border-left: 2px solid var(--ifm-toc-border-color) !important;
20982097
align-self: stretch !important;
20992098
}
21002099

2101-
/* TOC inner wrapper — sticky */
2100+
/* TOC inner wrapper — sticky; border-left here so the vertical line
2101+
only spans the height of the TOC content, not the full page */
21022102
.blog-wrapper .col.col--2 > div {
21032103
position: sticky !important;
21042104
top: calc(var(--ifm-navbar-height, 60px) + 1rem) !important;
21052105
max-height: calc(100vh - var(--ifm-navbar-height, 60px) - 2rem) !important;
21062106
overflow-y: auto !important;
2107+
border-left: 2px solid var(--ifm-toc-border-color) !important;
2108+
scrollbar-width: none !important;
2109+
}
2110+
2111+
.blog-wrapper .col.col--2 > div::-webkit-scrollbar {
2112+
display: none !important;
21072113
}
21082114

21092115
/* TOC list — vertical left border track */
@@ -2160,6 +2166,20 @@ html[data-theme="dark"] .blog-post-page .markdown {
21602166
margin-bottom: 0.5rem !important;
21612167
}
21622168

2169+
.blog-post-page .markdown h1,
2170+
.blog-post-page .markdown h2,
2171+
.blog-post-page .markdown h3,
2172+
.blog-post-page .markdown h4 {
2173+
color: #1F2937 !important;
2174+
}
2175+
2176+
html[data-theme="dark"] .blog-post-page .markdown h1,
2177+
html[data-theme="dark"] .blog-post-page .markdown h2,
2178+
html[data-theme="dark"] .blog-post-page .markdown h3,
2179+
html[data-theme="dark"] .blog-post-page .markdown h4 {
2180+
color: #D1D5DB !important;
2181+
}
2182+
21632183
/* ── Large desktop (≥1400px) — wider content ── */
21642184
@media (min-width: 1400px) {
21652185
.blog-wrapper .container>.row>.col.col--3 {

src/theme/BlogPostItem/Footer/index.tsx

Lines changed: 55 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,7 @@ export default function BlogPostItemFooterWrapper(props: Props): JSX.Element {
8989
month: "short",
9090
day: "numeric",
9191
}).format(new Date(metadata.date));
92-
const metaItems = [authorHandle, blogDate, readTimeText]
93-
.filter(Boolean)
94-
.join(META_SEPARATOR);
92+
const metaDateAndTime = [blogDate, readTimeText].filter(Boolean).join(META_SEPARATOR);
9593

9694
const showAuthorCard = Boolean(isBlogPostPage && primaryAuthor && authorName);
9795

@@ -111,7 +109,28 @@ export default function BlogPostItemFooterWrapper(props: Props): JSX.Element {
111109
<section ref={authorCardRef} className={styles.authorCard} aria-label="Post author details">
112110
<div className={styles.authorBody}>
113111
<div className={styles.authorAvatarWrapper}>
114-
{authorAvatar ? (
112+
{githubUrl ? (
113+
<Link
114+
to={githubUrl}
115+
className={styles.authorAvatarLink}
116+
target="_blank"
117+
rel="noopener noreferrer"
118+
aria-label={`${authorName} on GitHub`}
119+
>
120+
{authorAvatar ? (
121+
<img
122+
className={styles.authorAvatar}
123+
src={authorAvatar}
124+
alt={`${authorName} profile picture`}
125+
loading="lazy"
126+
/>
127+
) : (
128+
<div className={styles.authorAvatarFallback} aria-hidden="true">
129+
{authorName?.charAt(0).toUpperCase()}
130+
</div>
131+
)}
132+
</Link>
133+
) : authorAvatar ? (
115134
<img
116135
className={styles.authorAvatar}
117136
src={authorAvatar}
@@ -137,10 +156,40 @@ export default function BlogPostItemFooterWrapper(props: Props): JSX.Element {
137156
</div>
138157
<div className={styles.authorIdentity}>
139158
<div className={styles.authorNameRow}>
140-
<p className={styles.authorName}>{authorName}</p>
159+
{githubUrl ? (
160+
<Link
161+
to={githubUrl}
162+
className={styles.authorName}
163+
target="_blank"
164+
rel="noopener noreferrer"
165+
>
166+
{authorName}
167+
</Link>
168+
) : (
169+
<p className={styles.authorName}>{authorName}</p>
170+
)}
141171
<span className={styles.authorBadge}>Author</span>
142172
</div>
143-
{metaItems ? <p className={styles.authorMeta}>{metaItems}</p> : null}
173+
{(authorHandle || metaDateAndTime) ? (
174+
<p className={styles.authorMeta}>
175+
{authorHandle && (
176+
githubUrl ? (
177+
<Link
178+
to={githubUrl}
179+
className={styles.authorHandleLink}
180+
target="_blank"
181+
rel="noopener noreferrer"
182+
>
183+
{authorHandle}
184+
</Link>
185+
) : (
186+
authorHandle
187+
)
188+
)}
189+
{authorHandle && metaDateAndTime ? META_SEPARATOR : null}
190+
{metaDateAndTime}
191+
</p>
192+
) : null}
144193
{authorSummary ? (
145194
<p className={styles.authorSummary}>{authorSummary}</p>
146195
) : null}

src/theme/BlogPostItem/Footer/styles.module.css

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,16 @@
3434
justify-content: center;
3535
}
3636

37+
.authorAvatarLink {
38+
display: block;
39+
line-height: 0;
40+
border-radius: 50%;
41+
}
42+
43+
.authorAvatarLink:hover {
44+
opacity: 0.85;
45+
}
46+
3747
.authorAvatar,
3848
.authorAvatarFallback {
3949
width: 64px;
@@ -64,6 +74,21 @@
6474
font-size: 1.75rem;
6575
font-weight: 800;
6676
line-height: 1.2;
77+
color: var(--ifm-font-color-base);
78+
text-decoration: none;
79+
}
80+
81+
.authorName:hover {
82+
text-decoration: underline;
83+
}
84+
85+
.authorHandleLink {
86+
color: inherit;
87+
text-decoration: none;
88+
}
89+
90+
.authorHandleLink:hover {
91+
text-decoration: underline;
6792
}
6893

6994
.authorNameRow {

0 commit comments

Comments
 (0)