Skip to content

Commit

Permalink
better focus ui, use ring color as theme hue color (#798)
Browse files Browse the repository at this point in the history
* better focus ui, use ring color as theme hue color

* Update packages/nextra-theme-docs/src/components/sidebar.tsx

* Update packages/nextra-theme-docs/src/mdx-components.tsx

* fix covered select options (#803)

* fix covered select options

* remove popper.tsx (was created for test purposes)

* merge fixes

* rebase fixes

* works

* fixes
  • Loading branch information
dimaMachina committed Sep 13, 2022
1 parent d7e7f5b commit 21009c7
Show file tree
Hide file tree
Showing 52 changed files with 762 additions and 809 deletions.
5 changes: 5 additions & 0 deletions .changeset/angry-worms-punch.md
@@ -0,0 +1,5 @@
---
'nextra-theme-docs': patch
---

fix covered select options
6 changes: 6 additions & 0 deletions .changeset/strange-clocks-teach.md
@@ -0,0 +1,6 @@
---
'nextra': patch
'nextra-theme-docs': patch
---

better focus ui, use ring color as theme hue color
5 changes: 3 additions & 2 deletions examples/swr-site/pages/_meta.en-US.json
Expand Up @@ -58,14 +58,15 @@
"404": {
"type": "page",
"theme": {
"timestamp": false
"timestamp": false,
"typesetting": "article"
}
},
"500": {
"type": "page",
"theme": {
"timestamp": false,
"layout": "full"
"typesetting": "article"
}
}
}
2 changes: 1 addition & 1 deletion examples/swr-site/theme.config.tsx
Expand Up @@ -113,7 +113,7 @@ const config: DocsThemeConfig = {
<a
rel="noopener"
target="_blank"
className="inline-flex items-center font-semibold gap-2"
className="flex items-center font-semibold gap-2"
href={FOOTER_LINK[locale]}
>
{FOOTER_LINK_TEXT[locale]}
Expand Down
2 changes: 1 addition & 1 deletion packages/nextra-theme-blog/src/article-layout.tsx
@@ -1,6 +1,6 @@
import React, { ReactNode } from 'react'
import Meta from './meta'
import MDXTheme from './mdx-theme'
import { MDXTheme } from './mdx-theme'
import { useBlogContext } from './blog-context'
import { BasicLayout } from './basic-layout'

Expand Down
5 changes: 2 additions & 3 deletions packages/nextra-theme-blog/src/index.tsx
@@ -1,7 +1,6 @@
import React, { ReactElement, ReactNode, FC } from 'react'
import React, { ReactElement, ReactNode } from 'react'
import { ThemeProvider } from 'next-themes'
import type { PageOpts } from 'nextra'
import type { LayoutProps, NextraBlogTheme } from './types'
import type { LayoutProps } from './types'
import { BlogProvider } from './blog-context'
import { ArticleLayout } from './article-layout'
import { PostsLayout } from './posts-layout'
Expand Down
8 changes: 5 additions & 3 deletions packages/nextra-theme-blog/src/mdx-theme.tsx
Expand Up @@ -82,8 +82,10 @@ const components = {
code: Code
}

const MDXTheme = ({ children }: { children: ReactNode }): ReactElement => {
export const MDXTheme = ({
children
}: {
children: ReactNode
}): ReactElement => {
return <MDXProvider components={components}>{children}</MDXProvider>
}

export default MDXTheme
2 changes: 1 addition & 1 deletion packages/nextra-theme-blog/src/page-layout.tsx
@@ -1,6 +1,6 @@
import React, { ReactNode } from 'react'
import { BasicLayout } from './basic-layout'
import MDXTheme from './mdx-theme'
import { MDXTheme } from './mdx-theme'
import Nav from './nav'

export const PageLayout = ({ children }: { children: ReactNode }) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/nextra-theme-blog/src/posts-layout.tsx
Expand Up @@ -3,7 +3,7 @@ import { useRouter } from 'next/router'
import React, { ReactNode } from 'react'
import { useBlogContext } from './blog-context'
import { BasicLayout } from './basic-layout'
import MDXTheme from './mdx-theme'
import { MDXTheme } from './mdx-theme'
import Nav from './nav'
import { collectPostsAndNavs } from './utils/collect'
import getTags from './utils/get-tags'
Expand Down
18 changes: 8 additions & 10 deletions packages/nextra-theme-docs/css/hamburger.css
@@ -1,36 +1,34 @@
.nextra-hamburger svg {
g {
transform-origin: center;
transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1);
@apply origin-center;
transition: transform 0.2s cubic-bezier(.25, 1, .5, 1);
}
path {
opacity: 1;
transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1) 0.2s,
opacity 0.2s ease 0.2s;
transition: transform 0.2s cubic-bezier(.25, 1, .5, 1) 0.2s, opacity .2s ease .2s;
}

&.open {
path {
transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1),
opacity 0s ease 0.2s;
transition: transform 0.2s cubic-bezier(.25, 1, .5, 1), opacity 0s ease .2s;
}
g {
transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1) 0.2s;
transition: transform 0.2s cubic-bezier(.25, 1, .5, 1) .2s;
}
}

&.open > {
path {
opacity: 0;
@apply opacity-0
}
g:nth-of-type(1) {
transform: rotate(45deg);
@apply rotate-45;
path {
transform: translate3d(0, 6px, 0);
}
}
g:nth-of-type(2) {
transform: rotate(-45deg);
@apply -rotate-45;
path {
transform: translate3d(0, -6px, 0);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/nextra-theme-docs/css/scrollbar.css
Expand Up @@ -7,7 +7,7 @@
@apply w-1.5 h-1.5;
}
&::-webkit-scrollbar-track {
@apply bg-transparent my-5;
@apply bg-transparent;
}
&::-webkit-scrollbar-thumb {
@apply rounded-[20px];
Expand Down

0 comments on commit 21009c7

Please sign in to comment.