Skip to content

Commit

Permalink
[C] Fix missing types, fix code block colors
Browse files Browse the repository at this point in the history
  • Loading branch information
jen-castiron committed Oct 21, 2024
1 parent 9c04912 commit 9cd9e0d
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 36 deletions.
9 changes: 5 additions & 4 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,11 @@ const config: Config = {
],
},
...(algolia.appId ? { algolia } : {}),
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
// https://docusaurus.io/docs/markdown-features/code-blocks#theming
// prism: {
// theme: prismThemes.github,
// darkTheme: prismThemes.dracula,
// },
} satisfies Preset.ThemeConfig,
customFields: {
data,
Expand Down
3 changes: 0 additions & 3 deletions src/components/typography/index.js

This file was deleted.

5 changes: 4 additions & 1 deletion src/styles/base/_root.css
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,14 @@
--ifm-color-content-inverse: var(--neutral05);
--ifm-color-content-secondary: var(--neutral75);
--ifm-font-family-base: sofia-pro, system-ui, sans-serif;
--ifm-code-font-size: 95%;
--ifm-h1-font-size: 2.125rem;
--ifm-line-height-base: 1.5;
--ifm-link-color: var(--ifm-color-primary-darker);
--ifm-heading-font-weight: var(--font-weight-medium);

/* Code blocks */
--ifm-code-font-size: 95%;
--ifm-code-padding-horizontal: 0.3rem;

/* Tabs */
--ifm-tabs-color-active: var(--ifm-color-content);
Expand Down
1 change: 1 addition & 0 deletions src/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
@import "modules/_admonition.css";
@import "modules/_blog-wrapper.css";
@import "modules/_breadcrumbs.css";
@import "modules/_doc-footer.css";
@import "modules/_hero.css";
@import "modules/_highlight-code-line.css";
@import "modules/_main-wrapper.css";
Expand Down
7 changes: 7 additions & 0 deletions src/styles/modules/_admonition.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
--ifm-color-location: #affadd;
--ifm-color-note: var(--neutral10);
--ifm-alert-border-left-width: 1px;
--ifm-code-background: rgb(246, 247, 248);

border: var(--ifm-alert-border-left-width) solid;
margin-bottom: var(--padding-sm);
Expand All @@ -30,6 +31,12 @@
--ifm-color-warning: #ffbd61;
--ifm-color-danger: #ffb3b3;
--ifm-color-location: var(--green);
--ifm-code-background: rgb(51, 52, 55);
--ifm-code-color: rgb(245, 246, 247);
}

code {
color: var(--ifm-code-color);
}

[class^="admonitionIcon"] {
Expand Down
4 changes: 4 additions & 0 deletions src/styles/modules/_pagination.css
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,8 @@ html[data-theme="dark"] {
color: var(--pagination-color);
opacity: 0.7;
}

&.docusaurus-mt-lg {
margin-block-start: 5rem;
}
}
3 changes: 2 additions & 1 deletion src/theme/BlogListPaginator/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
*/
import React from "react";
import PaginationLink from "../PaginationLink";
import type {Props} from '@theme/BlogListPaginator';

function BlogListPaginator(props: any) {
function BlogListPaginator(props: Props) {
const { metadata } = props;
const {
previousPage,
Expand Down
3 changes: 2 additions & 1 deletion src/theme/BlogPostPaginator/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
*/
import React from "react";
import PaginationLink from "../PaginationLink";
import type {Props} from '@theme/BlogPostPaginator';

function BlogPostPaginator(props: any) {
function BlogPostPaginator(props: Props) {
const { nextItem, prevItem } = props;

return (
Expand Down
4 changes: 3 additions & 1 deletion src/theme/BlogSidebar/original.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import React from "react";
import clsx from "clsx";
import Link from "@docusaurus/Link";
import styles from "./styles.module.css";
export default function BlogSidebar({ sidebar }: any) {
import type {Props} from '@theme/BlogSidebar';

export default function BlogSidebar({ sidebar }: Props) {
if (sidebar.items.length === 0) {
return null;
}
Expand Down
25 changes: 0 additions & 25 deletions src/theme/Navbar/index.js

This file was deleted.

0 comments on commit 9cd9e0d

Please sign in to comment.