Skip to content

Commit

Permalink
Fixing bug (issue widgetbot-io#20): Corrected Navigation Links for Ne…
Browse files Browse the repository at this point in the history
…xt and Previous Section Buttons
  • Loading branch information
SerpentSociety committed Dec 10, 2023
1 parent 6fe80c0 commit cfba795
Show file tree
Hide file tree
Showing 14 changed files with 2,065 additions and 7 deletions.
11 changes: 7 additions & 4 deletions .vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,15 @@ export default defineConfig({
link: '/embed/crate/',
items: [
{ text: 'Intro', link: '/embed/crate/' },
{ text: 'Tutorial', link: 'embed/crate/tutorial' },
{ text: 'Options', link: 'embed/crate/options' },
{ text: 'API', link: 'embed/crate/api' },
{ text: 'Examples', link: 'embed/crate/examples' }
{ text: 'Tutorial', link: '/embed/crate/tutorial' },
{ text: 'Options', link: '/embed/crate/options' },
{ text: 'API', link: '/embed/crate/api' },
{ text: 'Examples', link: '/embed/crate/examples' }
]
},



{
text: 'html-embed',
link: '/embed/html-embed/',
Expand Down
12 changes: 11 additions & 1 deletion embed/crate/index.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
---
next:
text: 'tutorial'
link: '/embed/crate/tutorial'
---

# Crate


![Demo](https://i.imgur.com/oq4W4Rk.gif)

---

::: tip Crate (recommended)
[`@widgetbot/crate`](/embed/crate/tutorial) provides a little chat button in the corner of your website. It shows message notifications from your server and provides an extensive API.
:::



```html
<script src="https://cdn.jsdelivr.net/npm/@widgetbot/crate@3" async defer>
new Crate({
Expand All @@ -15,3 +24,4 @@
})
</script>
```

1 change: 1 addition & 0 deletions embed/crate/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@ You can use Crate's API to do things such as changing options, showing notificat

### Examples
You can see tons of Crate examples [here](/embed/crate/examples).

9 changes: 9 additions & 0 deletions embed/embed-api/commands.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
---
prev:
text: 'Intro'
link: '/embed/embed-api/'
next:
text: 'Events'
link: '/embed/embed-api/events'
---

# Commands

`embed-api` commands (client events) are used to control the state of the embed.
Expand Down
9 changes: 9 additions & 0 deletions embed/embed-api/events.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
---
prev:
text: 'Commands'
link: '/embed/embed-api/commands'
next:
text: 'Moderation'
link: '/bot/moderation'
---

# Events

`embed-api` events (server events) are used to listen to actions that occur in the embed.
Expand Down
9 changes: 9 additions & 0 deletions embed/embed-api/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
---
prev:
text: 'API'
link: '/embed/react-embed/api'
next:
text: 'Commands'
link: '/embed/embed-api/commands'
---

# embed-api

`embed-api` lets you interface with WidgetBot from your website's JavaScript. It provides [commands](commands) to control the embed and [events](events) to listen to actions. You can use `embed-api` with all of our client libraries: Crate, html-embed, and react-embed.
9 changes: 9 additions & 0 deletions embed/html-embed/api.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
---
prev:
text: 'Attributes'
link: '/embed/html-embed/attributes'
next:
text: 'Intro'
link: '/embed/react-embed/'
---

# html-embed API

Once you've created a new WidgetBot element, the `html-embed` script adds the API methods onto the Elements prototype.
Expand Down
9 changes: 9 additions & 0 deletions embed/html-embed/attributes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
---
prev:
text: 'Tutorial'
link: '/embed/html-embed/tutorial'
next:
text: 'API'
link: '/embed/html-embed/api'
---

# html-embed Attributes

You can pass custom attributes to the `<widgetbot>` element, to change the options when initializing it, for example:
Expand Down
6 changes: 6 additions & 0 deletions embed/html-embed/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
next:
text: 'Tutorial'
link: '/embed/html-embed/tutorial'
---

# html-embed

![Demo](https://i.imgur.com/Dgd7dKI.png)
Expand Down
9 changes: 9 additions & 0 deletions embed/react-embed/api.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
---
prev:
text: 'Props'
link: '/embed/react-embed/props'
next:
text: 'Intro'
link: '/embed/embed-api/'
---

# react-embed API

You can access [embed-api](/embed/embed-api/) by passing a function to the `onAPI` prop.
Expand Down
6 changes: 6 additions & 0 deletions embed/react-embed/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
next:
text: 'Props'
link: '/embed/react-embed/props'
---

# react-embed

![Demo](https://i.imgur.com/b2SirC2.png)
Expand Down
9 changes: 9 additions & 0 deletions embed/react-embed/props.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
---
prev:
text: 'Intro'
link: '/embed/react-embed/'
next:
text: 'API'
link: '/embed/react-embed/api'
---

The WidgetBot component accepts the following props

## Props
Expand Down
Loading

0 comments on commit cfba795

Please sign in to comment.