docs & readme: fix demo

This commit is contained in:
dswbx
2025-08-30 16:21:46 +02:00
parent ce773007f0
commit dc08d12ce6
3 changed files with 67 additions and 69 deletions

View File

@@ -3,7 +3,7 @@
![bknd](https://raw.githubusercontent.com/bknd-io/bknd/refs/heads/main/docs/public/assets/poster.png) ![bknd](https://raw.githubusercontent.com/bknd-io/bknd/refs/heads/main/docs/public/assets/poster.png)
<p align="center" width="100%"> <p align="center" width="100%">
<a href="https://stackblitz.com/github/bknd-io/bknd-examples?hideExplorer=1&embed=1&view=preview&startScript=example-admin-rich&initialPath=%2Fdata%2Fschema" target="_blank"> <a href="https://stackblitz.com/github/bknd-io/bknd-demo?hideExplorer=1&embed=1&view=preview&initialPath=%2Fdata%2Fschema" target="_blank">
<strong>⭐ Live Demo</strong> <strong>⭐ Live Demo</strong>
</a> </a>
</p> </p>

View File

@@ -6,8 +6,8 @@ export const examples = {
adminRich: { adminRich: {
path: "github/bknd-io/bknd-examples", path: "github/bknd-io/bknd-examples",
startScript: "example-admin-rich", startScript: "example-admin-rich",
initialPath: "/data/schema" initialPath: "/data/schema",
} },
}; };
export const StackBlitz = ({ export const StackBlitz = ({
@@ -30,12 +30,10 @@ export const StackBlitz = ({
embed: "1", embed: "1",
view: "preview", view: "preview",
...(selected || {}), ...(selected || {}),
...props ...props,
}); });
const url = new URL( const url = new URL(`https://stackblitz.com/${finalPath}?${params.toString()}`);
`https://stackblitz.com/${finalPath}?${params.toString()}`
);
return ( return (
<> <>
@@ -44,7 +42,7 @@ export const StackBlitz = ({
position: "relative", position: "relative",
overflow: "hidden", overflow: "hidden",
width: "100%", width: "100%",
paddingTop: `${ratio * 100}%` paddingTop: `${ratio * 100}%`,
}} }}
> >
<iframe <iframe
@@ -57,7 +55,7 @@ export const StackBlitz = ({
left: 0, left: 0,
bottom: 0, bottom: 0,
right: 0, right: 0,
border: "none" border: "none",
}} }}
/> />
</div> </div>
@@ -67,7 +65,7 @@ export const StackBlitz = ({
opacity: 0.7, opacity: 0.7,
marginTop: "0.2rem", marginTop: "0.2rem",
marginBottom: "1rem", marginBottom: "1rem",
textAlign: "center" textAlign: "center",
}} }}
> >
If you&rsquo;re having issues viewing it inline,{" "} If you&rsquo;re having issues viewing it inline,{" "}

View File

@@ -19,7 +19,7 @@ Glad you're here! **bknd** is a lightweight, infrastructure agnostic and feature
Here is a preview of **bknd** in StackBlitz: Here is a preview of **bknd** in StackBlitz:
<StackBlitz {...examples.adminRich} /> <StackBlitz path="github/bknd-io/bknd-demo" initialPath="/" />
<Accordions> <Accordions>
<Accordion title="What's going on?"> <Accordion title="What's going on?">