Skip to content

Commit

Permalink
fix search overlay styles on mobile (#718)
Browse files Browse the repository at this point in the history
* refactor toc, fix toc's styles on rtl, use `ref.current` instead `document.getElementsByClassName`

* group both `mask-image`

* fix search overlay styles on mobile

* fix

* split css to `hamburger`/`scrollbar`/`typesetting-article` css files (#719)

* split css to `hamburger`/`scrollbar`/`typesetting-article` css files

* fix edit on github button for cases when filename named as `index` (#720)

* fix edit on github button for cases when filename named as `index`

* fix typecheck

* [docs] ❗️BREAKING ❗️ various theme config options was renamed (#721)

* rename `meta.json` to `_meta.json` (#722)

* BREAKING! various theme config options was renamed

* add new options `toc.component` to override toc component #564

* rename editLink to editLinkText

* add helpful console warnings

* Update packages/nextra-theme-docs/src/contexts/config.tsx

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

* fix project.link behaviour

* small fix

* fix

* rename `meta.json` to `_meta.json`

* update snapshots

* rename `PageOpts.meta` to `PageOpts.frontMatter` (#723)

* BREAKING! various theme config options was renamed

* add new options `toc.component` to override toc component #564

* rename editLink to editLinkText

* add helpful console warnings

* Update packages/nextra-theme-docs/src/contexts/config.tsx

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

* fix project.link behaviour

* small fix

* fix

* rename `meta.json` to `_meta.json`

* update snapshots

* rename `PageOpts.meta` to `PageOpts.frontMatter`

* fix swr build

* small fix

* clicking on folder should navigate to first children if `index` page doesn't exist (#724)

* BREAKING! various theme config options was renamed

* add new options `toc.component` to override toc component #564

* rename editLink to editLinkText

* add helpful console warnings

* Update packages/nextra-theme-docs/src/contexts/config.tsx

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

* fix project.link behaviour

* small fix

* fix

* rename `meta.json` to `_meta.json`

* update snapshots

* rename `PageOpts.meta` to `PageOpts.frontMatter`

* fix swr build

* small fix

* clicking on folder should navigate to first children if `index` page doesn't exist

* apply review changes

* rebase fixes

* adjust active breadcrumb color (#725)

* move `withLayout` logic directly in nextra loader (#726)

* adjust active breadcrumb color

* move `withLayout` logic directly in nextra loader

* better loader types, add `MetaJsonFile`, `MdxFile`, `Folder` types, add tests for `next/context` (#731)

* fix ci

* fix callout shrinking from children content (#746)

* Version Packages (beta) (#728)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* fix typecheck

* fix typecheck

* simplify

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
3 people committed Aug 28, 2022
1 parent e3fa974 commit e6771ca
Show file tree
Hide file tree
Showing 142 changed files with 4,935 additions and 1,433 deletions.
5 changes: 5 additions & 0 deletions .changeset/angry-dancers-juggle.md
@@ -0,0 +1,5 @@
---
'nextra-theme-docs': patch
---

fix search overlay styles on mobile
5 changes: 5 additions & 0 deletions .changeset/brave-snails-remember.md
@@ -0,0 +1,5 @@
---
'nextra-theme-docs': patch
---

split css to `hamburger`/`scrollbar`/`typesetting-article` css files
6 changes: 6 additions & 0 deletions .changeset/chatty-beans-bake.md
@@ -0,0 +1,6 @@
---
'nextra': patch
'nextra-theme-docs': patch
---

fix edit on github button for cases when filename named as `index`
5 changes: 5 additions & 0 deletions .changeset/cuddly-insects-scream.md
@@ -0,0 +1,5 @@
---
'nextra': patch
---

fix `ReferenceError` when trying to access `__nextra_pageOpts__` inside MDX file
5 changes: 5 additions & 0 deletions .changeset/curvy-tomatoes-worry.md
@@ -0,0 +1,5 @@
---
'nextra-theme-docs': patch
---

BREAKING! various theme config options was renamed, take a look of renamed options [here](https://github.com/shuding/nextra/blob/core/packages/nextra-theme-docs/src/constants.tsx)
7 changes: 7 additions & 0 deletions .changeset/happy-crabs-hope.md
@@ -0,0 +1,7 @@
---
'nextra': patch
'nextra-theme-blog': patch
'nextra-theme-docs': patch
---

[Blog/Docs] Add copy to clipboard button for code-blocks. Add `NextraConfig.unstable_defaultShowCopyCode` option to show button by default, add `copy` and `copy=false` options for code-blocks
5 changes: 5 additions & 0 deletions .changeset/olive-brooms-behave.md
@@ -0,0 +1,5 @@
---
'nextra-theme-docs': patch
---

hide search input in navbar on mobile
5 changes: 5 additions & 0 deletions .changeset/orange-bugs-sell.md
@@ -0,0 +1,5 @@
---
'nextra-theme-docs': patch
---

fix empty space in navbar when theme option `search.component: null`
5 changes: 5 additions & 0 deletions .changeset/pink-chicken-exist.md
@@ -0,0 +1,5 @@
---
'nextra-theme-docs': patch
---

add `editLink.component`
6 changes: 6 additions & 0 deletions .changeset/poor-rivers-develop.md
@@ -0,0 +1,6 @@
---
'nextra': patch
'nextra-theme-docs': patch
---

rename `meta.json` to `_meta.json`
5 changes: 5 additions & 0 deletions .changeset/proud-phones-dress.md
@@ -0,0 +1,5 @@
---
'nextra-theme-docs': patch
---

clicking on folder should navigate to first children if `index` page doesn't exist
5 changes: 5 additions & 0 deletions .changeset/silly-apricots-help.md
@@ -0,0 +1,5 @@
---
'nextra': patch
---

better loader types, add `MetaJsonFile`, `MdxFile`, `Folder` types
5 changes: 5 additions & 0 deletions .changeset/swift-drinks-relax.md
@@ -0,0 +1,5 @@
---
'nextra-theme-docs': patch
---

fix callout shrinking from children content
7 changes: 7 additions & 0 deletions .changeset/tall-cows-whisper.md
@@ -0,0 +1,7 @@
---
'nextra': patch
'nextra-theme-blog': patch
'nextra-theme-docs': patch
---

rename `PageOpts.meta` to `PageOpts.frontMatter`
7 changes: 7 additions & 0 deletions .changeset/tough-turtles-scream.md
@@ -0,0 +1,7 @@
---
'nextra': patch
'nextra-theme-blog': patch
'nextra-theme-docs': patch
---

move `withLayout` logic directly in nextra loader
5 changes: 5 additions & 0 deletions .changeset/violet-pianos-know.md
@@ -0,0 +1,5 @@
---
'nextra-theme-docs': patch
---

adjust active breadcrumb color
5 changes: 5 additions & 0 deletions .changeset/young-cows-serve.md
@@ -0,0 +1,5 @@
---
'nextra-theme-docs': patch
---

fix search input `ESC` icon vertical alignment
1 change: 1 addition & 0 deletions .eslintrc.cjs
Expand Up @@ -10,6 +10,7 @@ module.exports = {
{
// TODO: enable for `nextra-theme-blog` also
files: 'packages/nextra-theme-docs/**/*.{js,jsx,mjs,cjs,ts,tsx,mts,cts}',
plugins: ['typescript-sort-keys'],
rules: {
'no-restricted-imports': [
'error',
Expand Down
3 changes: 2 additions & 1 deletion examples/blog/next.config.mjs
Expand Up @@ -3,7 +3,8 @@ import nextra from 'nextra'
const withNextra = nextra({
theme: 'nextra-theme-blog',
themeConfig: './theme.config.jsx',
unstable_staticImage: true
unstable_staticImage: true,
unstable_defaultShowCopyCode: true
})

export default withNextra({
Expand Down
3 changes: 2 additions & 1 deletion examples/blog/theme.config.jsx
@@ -1,4 +1,6 @@
/* eslint sort-keys: error */
export default {
darkMode: true,
footer: (
<small style={{ display: 'block', marginTop: '8rem' }}>
<abbr
Expand All @@ -22,5 +24,4 @@ export default {
`}</style>
</small>
),
darkMode: true
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 2 additions & 3 deletions examples/docs/src/pages/themes/docs/bleed.mdx
Expand Up @@ -27,10 +27,9 @@ For example you can put text, image, video or any component inside:
<iframe
width="100%"
height="430"
src="https://www.youtube.com/embed/3hccXiXI0u8"
frameBorder="0"
src="https://youtube.com/embed/3hccXiXI0u8"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowFullscreen
allowFullScreen
/>
</Bleed>

Expand Down
33 changes: 12 additions & 21 deletions examples/docs/src/theme.config.js
@@ -1,19 +1,16 @@
/* eslint sort-keys: error */
/**
* @type {import('nextra-theme-docs').DocsThemeConfig}
*/
export default {
projectLink: 'https://github.com/shuding/nextra',
docsRepositoryBase: 'https://github.com/shuding/nextra/blob/master',
projectChatLink: 'https://discord.gg/hEM84NMkRv', // Next.js discord server,
titleSuffix: ' – Nextra',
logo: (
<>
<span className="mr-2 font-extrabold hidden md:inline">Nextra</span>
<span className="text-gray-600 font-normal hidden md:inline">
The Next.js Static Site Generator
</span>
</>
),
banner: {
key: 'Nextra 2',
text: 'Nextra 2 Alpha',
},
docsRepositoryBase: 'https://github.com/shuding/nextra/blob/core/examples/docs',
editLink: {
text: 'Edit this page on GitHub'
},
head: () => (
<>
<meta name="msapplication-TileColor" content="#ffffff" />
Expand Down Expand Up @@ -61,14 +58,8 @@ export default {
<meta name="msapplication-TileImage" content="/ms-icon-144x144.png" />
</>
),
search: true,
projectChat: {
link: 'https://discord.gg/hEM84NMkRv', // Next.js discord server,
},
unstable_faviconGlyph: '✦',
prevLinks: true,
nextLinks: true,
footer: true,
footerEditLink: 'Edit this page on GitHub',
footerText: `MIT ${new Date().getFullYear()} © Nextra.`,
darkMode: true,
bannerKey: 'Nextra 2',
banner: 'Nextra 2 Alpha'
}
1 change: 1 addition & 0 deletions examples/swr-site/next.config.js
Expand Up @@ -5,6 +5,7 @@ const withNextra = require("nextra")({
codeblocks: true,
},
unstable_staticImage: true,
unstable_defaultShowCopyCode: true
});

module.exports = withNextra({
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit e6771ca

Please sign in to comment.