-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(dark mode): add dark mode for books and about page
issue #799
- Loading branch information
1 parent
76b58f4
commit 85c6b25
Showing
25 changed files
with
129 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
import type { AnchorLinkProps, AnchorProps } from 'antd'; | ||
import { Anchor as AntAnchor } from 'antd'; | ||
|
||
interface AProps extends AnchorProps {} | ||
interface LProps extends AnchorLinkProps {} | ||
interface Props extends AnchorProps {} | ||
|
||
const Anchor = (props: AProps): JSX.Element => <AntAnchor {...props} />; | ||
const Link = (props: LProps): JSX.Element => <AntAnchor.Link {...props} />; | ||
interface LinkProps extends AnchorLinkProps {} | ||
|
||
const Anchor = (props: Props): JSX.Element => <AntAnchor {...props} />; | ||
|
||
const Link = (props: LinkProps): JSX.Element => <AntAnchor.Link {...props} />; | ||
|
||
export { Anchor, Link }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* Remove arrow icon from GFM task list item */ | ||
li.task-list-item > span { | ||
@apply hidden; | ||
} | ||
|
||
li.task-list-item > div { | ||
@apply ml-0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* Add dark mode support for ant design card */ | ||
.ant-card-meta-title { | ||
@apply dark:text-light; | ||
} | ||
|
||
.ant-card-meta-description { | ||
@apply dark:text-gray-50/50; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { classNames } from '@components/utils'; | ||
import { Card as AntCard } from 'antd'; | ||
import type { CardMetaProps, CardProps } from 'antd/lib/card'; | ||
|
||
interface Props extends CardProps {} | ||
|
||
interface MetaProps extends CardMetaProps {} | ||
|
||
const Card = ({ className, ...props }: Props): JSX.Element => ( | ||
<AntCard {...props} className={classNames(className, 'card')} /> | ||
); | ||
|
||
const Meta = (props: MetaProps): JSX.Element => <AntCard.Meta {...props} />; | ||
|
||
export { Card, Meta }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export { Card as default } from 'antd'; | ||
export { Card, Meta } from './Card'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/* Remove border radius for sandpack editor */ | ||
.sp-wrapper .sp-layout { | ||
@apply rounded-none; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.