Skip to content
This repository was archived by the owner on Jan 19, 2025. It is now read-only.

Commit d8b8fd2

Browse files
committed
Fix dark/light themes 🚀
1 parent 648e47c commit d8b8fd2

File tree

17 files changed

+112
-4183
lines changed

17 files changed

+112
-4183
lines changed

graphql-types.ts

Lines changed: 0 additions & 4100 deletions
Large diffs are not rendered by default.

src/components/design-system/atoms/call-to-action-style.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { css } from "styled-components";
33
export const callToActionStyle = css`
44
font-size: ${(props) => props.theme.fontSizes[3]};
55
background-color: ${(props) => props.theme.light.accentColor};
6-
color: ${(props) => props.theme.light.primaryColorText};
6+
color: ${(props) => props.theme.light.textAbovePrimaryColor};
77
padding: ${(props) => props.theme.spacing[2]};
88
border: none;
99
border-radius: 4px;
@@ -13,18 +13,18 @@ export const callToActionStyle = css`
1313
1414
@media (prefers-color-scheme: dark) {
1515
background-color: ${(props) => props.theme.dark.accentColor};
16-
color: ${(props) => props.theme.dark.primaryColorText};
16+
color: ${(props) => props.theme.dark.textAbovePrimaryColor};
1717
}
1818
19-
color: ${(props) => props.theme.light.primaryColorText};
19+
color: ${(props) => props.theme.light.textAbovePrimaryColor};
2020
text-decoration: none;
2121
2222
&:hover {
23-
color: ${(props) => props.theme.light.primaryColorText};
23+
color: ${(props) => props.theme.light.textAbovePrimaryColor};
2424
text-decoration: none;
2525
2626
@media (prefers-color-scheme: dark) {
27-
color: ${(props) => props.theme.dark.primaryColorText};
27+
color: ${(props) => props.theme.dark.textAbovePrimaryColor};
2828
}
2929
}
3030
`;

src/components/design-system/atoms/heading-style.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { css } from "styled-components";
22

33
export const headingStyle = css`
4-
line-height: ${(props) => props.theme.lineHeight};
4+
line-height: 1.4;
55
color: ${(props) => props.theme.light.primaryTextColor};
66
margin: ${(props) => props.theme.spacing[0]};
77
font-weight: normal;

src/components/design-system/atoms/icon.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ import { StyledIconBase } from "@styled-icons/styled-icon";
33

44
export const Icon = styled.div`
55
${StyledIconBase} {
6-
color: ${(props) => props.theme.light.primaryColorText};
6+
color: ${(props) => props.theme.light.textAbovePrimaryColor};
77
}
88
`;

src/components/design-system/atoms/list.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ import styled from "styled-components";
22

33
export const List = styled.ul`
44
font-size: ${(props) => props.theme.fontSizes[2]};
5-
color: ${(props) => props.theme.light.primaryColorText};
5+
color: ${(props) => props.theme.light.primaryTextColor};
66
line-height: ${(props) => props.theme.lineHeight};
77
88
@media (prefers-color-scheme: dark) {
9-
color: ${(props) => props.theme.dark.primaryColorText};
9+
color: ${(props) => props.theme.dark.primaryTextColor};
1010
}
1111
`;

src/components/design-system/atoms/paragraph.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ import styled from "styled-components";
22

33
export const Paragraph = styled.p`
44
font-size: ${(props) => props.theme.fontSizes[2]};
5-
color: ${(props) => props.theme.light.primaryColorText};
5+
color: ${(props) => props.theme.light.primaryTextColor};
66
margin: ${(props) => props.theme.spacing[0]};
77
line-height: ${(props) => props.theme.lineHeight};
88
99
@media (prefers-color-scheme: dark) {
10-
color: ${(props) => props.theme.dark.primaryColorText};
10+
color: ${(props) => props.theme.dark.primaryTextColor};
1111
}
1212
`;

src/components/design-system/molecules/comments.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ interface CommentsProps {
99

1010
const CommentsContainer = styled.div`
1111
margin-bottom: ${(props) => props.theme.spacing[7]};
12+
13+
#thread__container {
14+
font-family: "Open Sans", Arial, sans-serif;
15+
}
1216
`;
1317

1418
export const Comments: React.FC<CommentsProps> = ({ url, title }) => (

src/components/design-system/molecules/menu-item.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@ interface MenuItemProps {
88
export const MenuItem = styled(Link)<MenuItemProps>`
99
color: ${(props) =>
1010
props.selected
11-
? props.theme.light.primaryColorText
11+
? props.theme.light.textAbovePrimaryColor
1212
: props.theme.light.primaryColorLight};
1313
font-weight: 500;
1414
text-decoration: none;
1515
line-height: ${(props) => props.theme.lineHeight};
1616
1717
&:hover,
1818
&:focus {
19-
color: ${(props) => props.theme.light.primaryColorText};
19+
color: ${(props) => props.theme.light.textAbovePrimaryColor};
2020
text-decoration: none;
2121
}
2222
2323
@media (prefers-color-scheme: dark) {
2424
color: ${(props) =>
2525
props.selected
26-
? props.theme.dark.primaryColorText
26+
? props.theme.dark.textAbovePrimaryColor
2727
: props.theme.dark.primaryColorLight};
2828
}
2929
`;

src/components/design-system/molecules/post-authors.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import styled from "styled-components";
77
import { ContainerFluid } from "../atoms/container-fluid";
88
import { GatsbyImage } from "gatsby-plugin-image";
99
import { Paragraph } from "../atoms/paragraph";
10-
import { StandardInternalLink } from "../atoms/standard-internal-link";
10+
import { StandardExternalLink } from "../atoms/standard-external-link";
1111

1212
const PostAuthorsContainer = styled(ContainerFluid)`
1313
padding: 0;
@@ -82,18 +82,19 @@ export const PostAuthors: React.FC<PostAuthorsProps> = ({
8282
/>
8383
<Paragraph>
8484
{enableUrl && (
85-
<StandardInternalLink
85+
<StandardExternalLink
8686
onClick={() =>
8787
track(
8888
tracking.action.open_blog_author,
8989
trackingCategory,
9090
trackingLabel
9191
)
9292
}
93-
to={blogAuthor.url}
93+
href={blogAuthor.url}
94+
target={"_blank"}
9495
>
9596
{blogAuthor.name}
96-
</StandardInternalLink>
97+
</StandardExternalLink>
9798
)}
9899
{!enableUrl && blogAuthor.name}
99100
</Paragraph>

src/components/design-system/organism/profile-presentation.tsx

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,22 @@ import styled from "styled-components";
77
import { CallToActionInternal } from "../atoms/call-to-action-internal";
88
import { Heading2 } from "../atoms/heading2";
99

10+
const Author = styled(Heading2)`
11+
color: ${(props) => props.theme.light.textAbovePrimaryColor};
12+
13+
@media (prefers-color-scheme: dark) {
14+
color: ${(props) => props.theme.dark.textAbovePrimaryColor};
15+
}
16+
`;
17+
18+
const Job = styled(Heading5)`
19+
color: ${(props) => props.theme.light.textAbovePrimaryColor};
20+
21+
@media (prefers-color-scheme: dark) {
22+
color: ${(props) => props.theme.dark.textAbovePrimaryColor};
23+
}
24+
`;
25+
1026
const SocialContactsContainer = styled.div`
1127
display: flex;
1228
justify-content: center;
@@ -59,8 +75,8 @@ export const ProfilePresentation: React.FC<ProfilePresentationProps> = ({
5975
src={"../../../images/authors/fabrizio-duroni.jpg"}
6076
alt={author}
6177
/>
62-
<Heading2>{author}</Heading2>
63-
<Heading5>Software Developer</Heading5>
78+
<Author>{author}</Author>
79+
<Job>Software Developer</Job>
6480
<SocialContactsContainer>
6581
<SocialContacts
6682
trackingCategory={tracking.category.home}

0 commit comments

Comments
 (0)