summaryrefslogtreecommitdiff
path: root/src/pages/blobs/index.astro
blob: 00288b0b2afb4366365228c1ff3d4772790d4af2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
---
import Layout from '../../layouts/Layout.astro';
import Markdown from '../../components/Markdown.astro';
import ShapeEditor from './_components/ShapeEditor.tsx';
import { uploadDisabled } from '../../utils';
import ContextAlert from '../../components/ContextAlert.astro';

const explainer = `
[Netlify Blobs](https://docs.netlify.com/blobs/overview/) provides an object store for any kind of data, be it JSON, binary, 
or [really](https://mk.gg/projects/chalkstream) anything else ([really!](https://mk.gg/projects/turbofan)). In this example, the blob store is used to **hold the data of user-generated random blobby shapes**.

Below is an Astro island with a React component for editing, uploading and viewing blobs to the blob store 🙂.
`;

const uploadDisabledText = `
User uploads are disabled in this site. To run your own and try it out: 
<a href="https://app.netlify.com/start/deploy?repository=https://github.com/netlify-templates/astro-platform-starter">
<img src="https://www.netlify.com/img/deploy/button.svg" style="display: inline;" alt="Deploy to Netlify" />
</a>
`;
---

<Layout title="Blobs">
    <ContextAlert
        addedChecksFunction={() => {
            return uploadDisabled ? uploadDisabledText : null;
        }}
        class="mb-8"
    />
    <h1 class="mb-10">Blobs x Blobs</h1>
    <Markdown content={explainer} class="mb-12" />
    <ShapeEditor client:load />
</Layout>