diff --git a/postcss.config.js b/postcss.config.js index d2a4d6ebd..b196fc93c 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -5,4 +5,4 @@ module.exports = { tailwindcss: {}, autoprefixer: {}, }, -}; \ No newline at end of file +} diff --git a/src/css/custom.css b/src/css/custom.css index 6df52ce64..7fa0a2da5 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -26,9 +26,60 @@ .breadcrumbs__link { @apply !text-light-neutral-1 dark:!text-dark-neutral-1 !bg-transparent !p-0 !body-3; } -.breadcrumbs__item:first-child, .breadcrumbs__item:first-child:after { +.breadcrumbs__item:first-child, +.breadcrumbs__item:first-child:after { @apply !hidden; } .breadcrumbs__item:not(:last-child):after { - @apply !text-light-neutral-1 dark:!text-dark-neutral-1; -} \ No newline at end of file + background: url('/img/chevron.svg') center !important; + @apply text-light-neutral-1 dark:text-dark-neutral-1 !h-4 !opacity-100; +} +.docMainContainer_src-theme-DocPage-Layout-Main-styles-module { + @apply !mt-nav-h; +} +.breadcrumbs__item { + @apply inline-flex flex-row items-center; +} +.Toc__title { + @apply !body-3 text-light-neutral-1 dark:text-dark-neutral-1; +} +.theme-edit-this-page { + all: initial; +} +.theme-edit-this-page { + @apply text-light-neutral-3 dark:text-dark-neutral-3 !body-3; + svg { + @apply !hidden; + } +} +.theme-doc-toc-desktop { + @apply !relative !top-auto; +} +.Toc__container { + @apply max-h-[calc(100vh-(theme(spacing.nav-h)+2rem))] overflow-y-auto sticky top-[calc(theme(spacing.nav-h)+1rem)]; +} +.table-of-contents__link { + @apply !text-light-neutral-2 dark:!text-dark-neutral-2 hover:underline !body-3; +} +.table-of-contents__left-border { + @apply !border-0; + li { + @apply !ml-0; + } + ul { + @apply border-y-0 border-r-0 border-l-2 border-solid border-l-light-surface-3 dark:border-l-dark-surface-3 !pl-4; + } +} +.pagination-nav__link { + @apply !flex !flex-col !space-y-1 bg-light-accent-2 dark:bg-dark-accent-2 text-light-accent-1 dark:text-dark-accent-1 !rounded-lg !p-4 !border-0 !min-h-fit !h-auto; +} +.pagination-nav__sublabel { + @apply text-light-accent-1 dark:text-dark-accent-1 !body-4; +} +.pagination-nav__label { + @apply !subheading-2; +} +.pagination-nav__label::before, +.pagination-nav__label::after { + @apply !content-none; +} diff --git a/src/css/infima-overrides.css b/src/css/infima-overrides.css index c2f86f093..dfd290631 100644 --- a/src/css/infima-overrides.css +++ b/src/css/infima-overrides.css @@ -102,3 +102,7 @@ select { scroll-behavior: auto !important; } } + +.navbar { + all: initial; +} diff --git a/src/theme/DocBreadcrumbs.tsx b/src/theme/DocBreadcrumbs.tsx index 2180d20b4..ea2e501b0 100644 --- a/src/theme/DocBreadcrumbs.tsx +++ b/src/theme/DocBreadcrumbs.tsx @@ -1,16 +1,10 @@ import OriginalDocBreadcrumbs from '@theme-original/DocBreadcrumbs' -import { DocsSentimentSection } from '@uniswap/analytics-events' import React from 'react' -import SentimentTracking from '../components/SentimentTracking' - export default function DocBreadcrumbs(props) { return (
-
- -
) } diff --git a/src/theme/DocItem/Content/index.js b/src/theme/DocItem/Content/index.js index 9f5d8ca9a..c165e1444 100644 --- a/src/theme/DocItem/Content/index.js +++ b/src/theme/DocItem/Content/index.js @@ -1,9 +1,9 @@ -import React from 'react'; -import clsx from 'clsx'; -import {ThemeClassNames} from '@docusaurus/theme-common'; -import {useDoc} from '@docusaurus/theme-common/internal'; -import Heading from '@theme/Heading'; -import MDXContent from '@theme/MDXContent'; +import React from 'react' +import clsx from 'clsx' +import { ThemeClassNames } from '@docusaurus/theme-common' +import { useDoc } from '@docusaurus/theme-common/internal' +import Heading from '@theme/Heading' +import MDXContent from '@theme/MDXContent' /** Title can be declared inside md content or declared through front matter and added manually. To make both cases consistent, @@ -15,16 +15,15 @@ import MDXContent from '@theme/MDXContent'; - the markdown content does not already contain a top-level h1 heading */ function useSyntheticTitle() { - const {metadata, frontMatter, contentTitle} = useDoc(); - const shouldRender = - !frontMatter.hide_title && typeof contentTitle === 'undefined'; + const { metadata, frontMatter, contentTitle } = useDoc() + const shouldRender = !frontMatter.hide_title && typeof contentTitle === 'undefined' if (!shouldRender) { - return null; + return null } - return metadata.title; + return metadata.title } -export default function DocItemContent({children}) { - const syntheticTitle = useSyntheticTitle(); +export default function DocItemContent({ children }) { + const syntheticTitle = useSyntheticTitle() return (
{syntheticTitle && ( @@ -34,5 +33,5 @@ export default function DocItemContent({children}) { )} {children}
- ); + ) } diff --git a/src/theme/DocItem/Footer/index.js b/src/theme/DocItem/Footer/index.js index 7e12433b8..a183d620d 100644 --- a/src/theme/DocItem/Footer/index.js +++ b/src/theme/DocItem/Footer/index.js @@ -1,34 +1,22 @@ -import React from 'react'; -import clsx from 'clsx'; -import {ThemeClassNames} from '@docusaurus/theme-common'; -import {useDoc} from '@docusaurus/theme-common/internal'; -import LastUpdated from '@theme/LastUpdated'; -import EditThisPage from '@theme/EditThisPage'; -import TagsListInline from '@theme/TagsListInline'; -import styles from './styles.module.css'; +import React from 'react' +import clsx from 'clsx' +import { ThemeClassNames } from '@docusaurus/theme-common' +import { useDoc } from '@docusaurus/theme-common/internal' +import LastUpdated from '@theme/LastUpdated' +import TagsListInline from '@theme/TagsListInline' +import styles from './styles.module.css' function TagsRow(props) { return ( -
+
- ); + ) } -function EditMetaRow({ - editUrl, - lastUpdatedAt, - lastUpdatedBy, - formattedLastUpdatedAt, -}) { +function EditMetaRow({ editUrl, lastUpdatedAt, lastUpdatedBy, formattedLastUpdatedAt }) { return (
-
{editUrl && }
-
{(lastUpdatedAt || lastUpdatedBy) && (
- ); + ) } export default function DocItemFooter() { - const {metadata} = useDoc(); - const {editUrl, lastUpdatedAt, formattedLastUpdatedAt, lastUpdatedBy, tags} = - metadata; - const canDisplayTagsRow = tags.length > 0; - const canDisplayEditMetaRow = !!(editUrl || lastUpdatedAt || lastUpdatedBy); - const canDisplayFooter = canDisplayTagsRow || canDisplayEditMetaRow; + const { metadata } = useDoc() + const { editUrl, lastUpdatedAt, formattedLastUpdatedAt, lastUpdatedBy, tags } = metadata + const canDisplayTagsRow = tags.length > 0 + const canDisplayEditMetaRow = !!(editUrl || lastUpdatedAt || lastUpdatedBy) + const canDisplayFooter = canDisplayTagsRow || canDisplayEditMetaRow if (!canDisplayFooter) { - return null; + return null } return ( -