diff --git a/.changeset/few-avocados-rescue.md b/.changeset/few-avocados-rescue.md new file mode 100644 index 0000000000..2970ee1a6b --- /dev/null +++ b/.changeset/few-avocados-rescue.md @@ -0,0 +1,7 @@ +--- +'nextra': patch +'nextra-theme-blog': patch +'nextra-theme-docs': patch +--- + +improve docs for 2.0 diff --git a/docs/components/card/index.tsx b/docs/components/card/index.tsx index 41d2a992d5..bad6c4fe1f 100644 --- a/docs/components/card/index.tsx +++ b/docs/components/card/index.tsx @@ -66,8 +66,8 @@ export function Card({ {icon} diff --git a/docs/components/features/index.tsx b/docs/components/features/index.tsx index bddb42d0d6..bc312a9d3f 100644 --- a/docs/components/features/index.tsx +++ b/docs/components/features/index.tsx @@ -16,7 +16,7 @@ export function Feature({ initial={{ opacity: 0 }} whileInView={{ opacity: 1 }} viewport={{ once: true, margin: '-20px' }} - transition={{ duration: 0.5, delay: 0.1 }} + transition={{ duration: 0.4, delay: 0.1 }} className={cn( styles.feature, large && styles.large, diff --git a/docs/components/features/style.module.css b/docs/components/features/style.module.css index e9ae1d7d6b..3d96af4cef 100644 --- a/docs/components/features/style.module.css +++ b/docs/components/features/style.module.css @@ -1,10 +1,65 @@ .feature { position: relative; padding: 1.5rem 1.75rem; - border-radius: 1em; color: #000; background-color: white; overflow: hidden; + border-radius: 0.8em; + clip-path: polygon( + 1.389012em 0em, + calc(100% - 1.389012em) 0em, + calc(100% - 1.194572em) 0.001596em, + calc(100% - 1.000425em) 0.011608em, + calc(100% - 0.807927em) 0.03823em, + calc(100% - 0.620879em) 0.090424em, + calc(100% - 0.445587em) 0.173591em, + calc(100% - 0.292642em) 0.292642em, + calc(100% - 0.173591em) 0.445587em, + calc(100% - 0.090424em) 0.620879em, + calc(100% - 0.03823em) 0.807927em, + calc(100% - 0.011608em) 1.000425em, + calc(100% - 0.001596em) 1.194572em, + 100% 1.389012em, + 100% calc(100% - 1.389012em), + calc(100% - 0.001596em) calc(100% - 1.194572em), + calc(100% - 0.011608em) calc(100% - 1.000425em), + calc(100% - 0.03823em) calc(100% - 0.807927em), + calc(100% - 0.090424em) calc(100% - 0.620879em), + calc(100% - 0.173591em) calc(100% - 0.445587em), + calc(100% - 0.292642em) calc(100% - 0.292642em), + calc(100% - 0.445587em) calc(100% - 0.173591em), + calc(100% - 0.620879em) calc(100% - 0.090424em), + calc(100% - 0.807927em) calc(100% - 0.03823em), + calc(100% - 1.000425em) calc(100% - 0.011608em), + calc(100% - 1.194572em) calc(100% - 0.001596em), + calc(100% - 1.389012em) 100%, + 1.389012em 100%, + 1.194572em calc(100% - 0.001596em), + 1.000425em calc(100% - 0.011608em), + 0.807927em calc(100% - 0.03823em), + 0.620879em calc(100% - 0.090424em), + 0.445587em calc(100% - 0.173591em), + 0.292642em calc(100% - 0.292642em), + 0.173591em calc(100% - 0.445587em), + 0.090424em calc(100% - 0.620879em), + 0.03823em calc(100% - 0.807927em), + 0.011608em calc(100% - 1.000425em), + 0.001596em calc(100% - 1.194572em), + 0em calc(100% - 1.389012em), + 0em 1.389012em, + 0.001596em 1.194572em, + 0.011608em 1.000425em, + 0.03823em 0.807927em, + 0.090424em 0.620879em, + 0.173591em 0.445587em, + 0.292642em 0.292642em, + 0.445587em 0.173591em, + 0.620879em 0.090424em, + 0.807927em 0.03823em, + 1.000425em 0.011608em, + 1.194572em 0.001596em, + 1.389012em 0em + ); } .feature.large { grid-column: span 2; diff --git a/docs/pages/_meta.json b/docs/pages/_meta.json index 92352f2806..e082ffd5b9 100644 --- a/docs/pages/_meta.json +++ b/docs/pages/_meta.json @@ -13,7 +13,8 @@ }, "showcase": { "title": "Showcase", - "type": "page" + "type": "page", + "display": "hidden" }, "about": { "title": "About", diff --git a/docs/pages/docs/docs-theme/theme-configuration.mdx b/docs/pages/docs/docs-theme/theme-configuration.mdx index cba1393fdf..752db4f929 100644 --- a/docs/pages/docs/docs-theme/theme-configuration.mdx +++ b/docs/pages/docs/docs-theme/theme-configuration.mdx @@ -122,11 +122,13 @@ You can adjust the theme color of the website by setting a primary hue value to ['primaryHue', 'number | { dark: number; light: number }', 'The hue of the primary theme color.'], ]}/> -
Try it out for this website: { - const hue = e.target.value + 'deg' - document.documentElement.style.setProperty('--nextra-primary-hue', hue) +Try it out for this website: + +
{ + const hue = e.target.value + document.documentElement.style.setProperty('--nextra-primary-hue', hue + 'deg') document.getElementById('test-theme-hue').innerText = hue -}} />
+}} />
## Navbar diff --git a/docs/pages/index.mdx b/docs/pages/index.mdx index 6ed761fc99..09dd344b83 100644 --- a/docs/pages/index.mdx +++ b/docs/pages/index.mdx @@ -40,17 +40,17 @@ export function I18n() {
- setActive('en')}>English - setActive('de')}>Deutsch - setActive('ja')}>日本語 + setActive('en')}>English + setActive('de')}>Deutsch + setActive('ja')}>日本語
}/> }
-

Make beautiful websites
with Next.js & MDX.

-

Simple, powerful and flexible site generation framework
with everything you love from Next.js.

+

Make beautiful websites
with
Next.js & MDX.

+

Simple, powerful and flexible site generation framework
with everything you love from Next.js.

Start →

@@ -136,6 +136,9 @@ export function I18n() { font-size: 4vw; font-size: min(48px, max(4vw, 30px)); } + .headline { + letter-spacing: -.08rem; + } } `} @@ -160,8 +163,7 @@ export function I18n() {

I18n as easy as creating new files.

-

Name your page files with locales suffixed, Nextra and Next.js will do the rest for you.

-
+

Name your page files with locales suffixed, Nextra and Next.js will do the rest for you.

Organize pages intuitively,
with file-system routing from Next.js.

- +

Links and images are always optimized.

-

Nextra converts Markdown links and images to [next/link](https://nextjs.org/docs/routing/introduction#linking-between-pages) and [next/image](https://nextjs.org/docs/basic-features/image-optimization#local-images), keeping your website the best experience.

+

Nextra converts Markdown link and image to [Next.js Link](https://nextjs.org/docs/routing/introduction#linking-between-pages) and [Next.js Image](https://nextjs.org/docs/basic-features/image-optimization#local-images), keeping your website the best user experience possible.

+
-
- {`[Learn more](/more)`} +
+ {`[Learn more](/more)`}
- {`![Hero](/hero.png)`} + {`![Hero](/hero.png)`}
+
+ + + +
-
- {``} +
+ {``}
- {``} + {``}
@@ -293,7 +301,7 @@ export function I18n() {

And more...

-

Nextra has [next-seo](https://github.com/garmeeh/next-seo) built in.

+

SEO built-in via [next-seo](https://github.com/garmeeh/next-seo).

Start Using Nextra →

diff --git a/docs/pages/index.module.css b/docs/pages/index.module.css index cb2423e3f0..fcdbc1eb91 100644 --- a/docs/pages/index.module.css +++ b/docs/pages/index.module.css @@ -25,7 +25,8 @@ .optimization { display: flex; - margin: 1rem 0; + justify-content: center; + margin: 1rem 0 0.25rem; padding: 1rem; background: #0e1116; color: white;