Skip to content

Commit 2863d47

Browse files
authored
Fix alignment/zoom for avatars on courses page (#139)
1 parent 2cbaa02 commit 2863d47

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

docusaurus.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ const config = {
249249
contextualSearch: true,
250250
}
251251
: undefined,
252-
zoomSelector: ".markdown img",
252+
zoomSelector: ".markdown :not(em) > img:not(.no-zoom)",
253253
posthog: enablePosthog
254254
? {
255255
apiKey: posthogConfig.apiKey,

src/components/Course.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const Course: React.FunctionComponent<CourseProps> = ({
2828
<Card title={title} icon={icon} href={href}>
2929
<p>{description}</p>
3030
<p className={styles.author}>
31-
<img src={authorImg} />
31+
<img src={authorImg} className="no-zoom" />
3232
<span>{author}</span>
3333
</p>
3434
<p>

src/css/custom.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,12 @@ main {
7171

7272
/* IMAGES & CAPTIONS */
7373

74-
p > img {
74+
p > img:not(.no-zoom) {
7575
display: block;
7676
margin: auto;
7777
}
7878

79-
p > img + em {
79+
p > img:not(.no-zoom) + em {
8080
color: gray;
8181
font-size: 0.9rem;
8282
display: block;

0 commit comments

Comments
 (0)