-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
364 additions
and
0 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
website/versioned_docs/version-2.1.0/components/Admonition.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Admonition | ||
|
||
import Admonition from "@theme/Admonition"; | ||
import BrowserWindow from "@site/src/components/BrowserWindow"; | ||
|
||
```tsx | ||
import Admonition from "@theme/Admonition"; | ||
|
||
<Admonition type="info" title="Title"> | ||
content | ||
</Admonition>; | ||
``` | ||
|
||
<BrowserWindow> | ||
<Admonition type="info" title="Title"> | ||
content | ||
</Admonition> | ||
</BrowserWindow> |
20 changes: 20 additions & 0 deletions
20
website/versioned_docs/version-2.1.0/components/AnnouncementBar.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Announcement | ||
|
||
import AnnouncementBar from "@theme/AnnouncementBar"; | ||
import BrowserWindow from "@site/src/components/BrowserWindow"; | ||
|
||
## AnnouncementBar | ||
|
||
```tsx | ||
import AnnouncementBar from "@theme/AnnouncementBar"; | ||
|
||
<AnnouncementBar />; | ||
``` | ||
|
||
<BrowserWindow> | ||
<AnnouncementBar /> | ||
</BrowserWindow> | ||
|
||
## AnnouncementBar/Content | ||
|
||
## AnnouncementBar/CloseButton |
7 changes: 7 additions & 0 deletions
7
website/versioned_docs/version-2.1.0/components/BackToTopButton.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# BackToTopButton | ||
|
||
```tsx | ||
import BackToTopButton from "@theme/BackToTopButton"; | ||
|
||
<BackToTopButton />; | ||
``` |
28 changes: 28 additions & 0 deletions
28
website/versioned_docs/version-2.1.0/components/CodeBlock.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# CodeBlock | ||
|
||
import CodeBlock from "@theme/CodeBlock"; | ||
import BrowserWindow from "@site/src/components/BrowserWindow"; | ||
|
||
```tsx | ||
import CodeBlock from "@theme/CodeBlock"; | ||
|
||
<CodeBlock language="jsx" title="Code" showLineNumbers> | ||
{[ | ||
"function HelloCodeTitle(props) {", | ||
" // highlight-next-line", | ||
" return <h1>Hello, {props.name}</h1>;", | ||
"}", | ||
].join("\n")} | ||
</CodeBlock>; | ||
``` | ||
|
||
<BrowserWindow> | ||
<CodeBlock language="jsx" title="Code" showLineNumbers> | ||
{[ | ||
"function HelloCodeTitle(props) {", | ||
" // highlight-next-line", | ||
" return <h1>Hello, {props.name}</h1>;", | ||
"}", | ||
].join("\n")} | ||
</CodeBlock> | ||
</BrowserWindow> |
14 changes: 14 additions & 0 deletions
14
website/versioned_docs/version-2.1.0/components/ColorModeToggle.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# ColorModeToggle | ||
|
||
import ColorModeToggle from "@theme/ColorModeToggle"; | ||
import BrowserWindow from "@site/src/components/BrowserWindow"; | ||
|
||
```tsx | ||
import ColorModeToggle from "@theme/ColorModeToggle"; | ||
|
||
<ColorModeToggle value="dark" onChange={onChange} />; | ||
``` | ||
|
||
<BrowserWindow> | ||
<ColorModeToggle value="dark" onChange={console.log} /> | ||
</BrowserWindow> |
33 changes: 33 additions & 0 deletions
33
website/versioned_docs/version-2.1.0/components/Details.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Details | ||
|
||
import BrowserWindow from "@site/src/components/BrowserWindow"; | ||
|
||
```markdown | ||
<details> | ||
<summary>Toggle me!</summary> | ||
<div> | ||
<div>This is the detailed content</div> | ||
<br /> | ||
<details> | ||
<summary>Nested toggle! Some surprise inside...</summary> | ||
<div>😲😲😲😲😲</div> | ||
</details> | ||
</div> | ||
</details> | ||
``` | ||
|
||
<BrowserWindow> | ||
|
||
<details> | ||
<summary>Toggle me!</summary> | ||
<div> | ||
<div>This is the detailed content</div> | ||
<br /> | ||
<details> | ||
<summary>Nested toggle! Some surprise inside...</summary> | ||
<div>😲😲😲😲😲</div> | ||
</details> | ||
</div> | ||
</details> | ||
|
||
</BrowserWindow> |
14 changes: 14 additions & 0 deletions
14
website/versioned_docs/version-2.1.0/components/DocBreadcrumbs.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# DocBreadcrumbs | ||
|
||
import DocBreadcrumbs from "@theme/DocBreadcrumbs"; | ||
import BrowserWindow from "@site/src/components/BrowserWindow"; | ||
|
||
```tsx | ||
import DocBreadcrumbs from "@theme/DocBreadcrumbs"; | ||
|
||
<DocBreadcrumbs />; | ||
``` | ||
|
||
<BrowserWindow> | ||
<DocBreadcrumbs /> | ||
</BrowserWindow> |
14 changes: 14 additions & 0 deletions
14
website/versioned_docs/version-2.1.0/components/DocCard.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# DocCard | ||
|
||
import DocCard from "@theme/DocCard"; | ||
import BrowserWindow from "@site/src/components/BrowserWindow"; | ||
|
||
```tsx | ||
import DocCard from "@theme/DocCard"; | ||
|
||
<DocCard item={{ type: "link", href: "/" }} />; | ||
``` | ||
|
||
<BrowserWindow> | ||
<DocCard item={{ type: "link", href: "/" }} /> | ||
</BrowserWindow> |
14 changes: 14 additions & 0 deletions
14
website/versioned_docs/version-2.1.0/components/DocCardList.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# DocCardList | ||
|
||
import DocCardList from "@theme/DocCardList"; | ||
import BrowserWindow from "@site/src/components/BrowserWindow"; | ||
|
||
```tsx | ||
import DocCardList from "@theme/DocCardList"; | ||
|
||
<DocCardList items={[{ type: "link", href: "/" }]} />; | ||
``` | ||
|
||
<BrowserWindow> | ||
<DocCardList items={[{ type: "link", href: "/" }]} /> | ||
</BrowserWindow> |
6 changes: 6 additions & 0 deletions
6
website/versioned_docs/version-2.1.0/components/_category_.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"position": 10, | ||
"label": "Components", | ||
"collapsible": true, | ||
"collapsed": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"position": 1, | ||
"label": "Guide", | ||
"collapsible": true, | ||
"collapsed": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
--- | ||
sidebar_position: 2 | ||
description: Config your Nonepress theme | ||
tags: | ||
- guide | ||
|
||
options: | ||
menu: | ||
- category: guide | ||
weight: 20 | ||
--- | ||
|
||
# Theme Config | ||
|
||
Custom NonePress theme config in `docusaurus.config.js`. | ||
|
||
<details> | ||
<summary>Full Example:</summary> | ||
|
||
```js title="docusaurus.config.js" showLineNumbers | ||
module.exports = { | ||
themeConfig: | ||
/** @type {import('@nullbot/docusaurus-preset-nonepress').ThemeConfig} */ | ||
({ | ||
colorMode: { | ||
respectPrefersColorScheme: true, | ||
}, | ||
announcementBar: { | ||
id: "support-us", | ||
content: | ||
'⭐️ If you like NonePress, give it a star on <a target="_blank" rel="noopener noreferrer" href="https://github.com/nonebot/docusaurus-theme-nonepress">GitHub</a>! ⭐️', | ||
isCloseable: true, | ||
}, | ||
}), | ||
}; | ||
``` | ||
|
||
</details> | ||
|
||
## Theme Config Type | ||
|
||
```js title="docusaurus.config.js" showLineNumbers | ||
module.exports = { | ||
themeConfig: | ||
// highlight-next-line | ||
/** @type {import('@nullbot/docusaurus-preset-nonepress').ThemeConfig} */ | ||
( | ||
{ | ||
// theme config | ||
} | ||
), | ||
}; | ||
``` | ||
|
||
## Color Mode | ||
|
||
```js title="docusaurus.config.js" | ||
{ | ||
colorMode: { | ||
defaultMode: "light", | ||
disableSwitch: false, | ||
respectPrefersColorScheme: true, | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
--- | ||
sidebar_position: 1 | ||
description: Introduction to Nonepress | ||
tags: | ||
- guide | ||
- introduction | ||
|
||
options: | ||
menu: | ||
- category: guide | ||
weight: 10 | ||
--- | ||
|
||
import Tabs from "@theme/Tabs"; | ||
import TabItem from "@theme/TabItem"; | ||
|
||
# Docusaurus Theme Nonepress | ||
|
||
## Installation | ||
|
||
<Tabs> | ||
<TabItem value="yarn" default> | ||
|
||
```bash | ||
yarn add @nullbot/docusaurus-preset-nonepress | ||
``` | ||
|
||
</TabItem> | ||
<TabItem value="npm" default> | ||
|
||
```bash | ||
npm i @nullbot/docusaurus-preset-nonepress | ||
``` | ||
|
||
</TabItem> | ||
</Tabs> | ||
|
||
## Usage | ||
|
||
```js title="docusaurus.config.js" showLineNumbers | ||
presets: [ | ||
[ | ||
"@nullbot/docusaurus-preset-nonepress", | ||
/** @type {import('@nullbot/docusaurus-preset-nonepress').Options} */ | ||
({ | ||
// options | ||
docs: { | ||
sidebarPath: require.resolve("./sidebars.js"), | ||
}, | ||
}), | ||
], | ||
]; | ||
``` | ||
|
||
## TODO | ||
|
||
- [x] NonePress Theme Components | ||
- [x] NonePress Theme Preset | ||
- [x] Plugins useful to NonePress Theme | ||
- [x] DocsMenu | ||
- [x] SideBar Keeper | ||
- [ ] Documentation | ||
- [x] Introduction | ||
- [ ] Config | ||
- [ ] Components | ||
- [ ] Plugins | ||
- [ ] Preset | ||
- [ ] Custom Theme |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"main": [ | ||
{ | ||
"type": "category", | ||
"label": "Guide", | ||
"link": { | ||
"type": "generated-index", | ||
"title": "Guide", | ||
"description": "Start using NonePress", | ||
"slug": "/guide/" | ||
}, | ||
"items": [ | ||
{ | ||
"type": "autogenerated", | ||
"dirName": "guide" | ||
} | ||
] | ||
} | ||
], | ||
"examples": [ | ||
{ | ||
"type": "category", | ||
"label": "Components", | ||
"link": { | ||
"type": "generated-index", | ||
"title": "Components", | ||
"description": "Examples of components", | ||
"slug": "/components/" | ||
}, | ||
"items": [ | ||
{ | ||
"type": "autogenerated", | ||
"dirName": "components" | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "category", | ||
"label": "Page", | ||
"items": [ | ||
{ | ||
"type": "link", | ||
"label": "Page", | ||
"href": "/page-example" | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "link", | ||
"label": "NoneBot", | ||
"href": "https://nonebot.dev" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[ | ||
"2.1.0" | ||
] |