Commit bc9a12a0fc
Unsigned
Layout: unified · split
web/src/pages/api/index.astro +16 −5
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | --- |
| 2 | 2 | import Layout from '@layouts/Layout.astro'; |
| 3 | import Buton from '@components/form/Button.astro'; | |
| 3 | import Button from '@components/form/Button.astro'; | |
| 4 | 4 | |
| 5 | 5 | import MainCard from '@components/scafold/MainCard.astro'; |
| 6 | 6 | |
| @@ -9,14 +9,17 @@ import MainCard from '@components/scafold/MainCard.astro'; | ||
| 9 | 9 | <Layout title="API Docs | Awesome Privacy"> |
| 10 | 10 | |
| 11 | 11 | <MainCard> |
| 12 | <div id="swagger-ui"></div> | |
| 13 | </MainCard> | |
| 12 | <div id="swagger-ui"></div> | |
| 13 | <div class="go"> | |
| 14 | <Button url="https://api.awesome-privacy.xyz" text="Try it Out" /> | |
| 15 | </div> | |
| 16 | </MainCard> | |
| 14 | 17 | |
| 15 | 18 | </Layout> |
| 16 | 19 | |
| 17 | <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/4.1.3/swagger-ui.css" > | |
| 20 | <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/4.1.3/swagger-ui.css"> | |
| 18 | 21 | <script is:inline src="https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/4.1.3/swagger-ui-bundle.js"></script> |
| 19 | <script> | |
| 22 | <script type="module" is:inline> | |
| 20 | 23 | window.onload = () => { |
| 21 | 24 | SwaggerUIBundle({ |
| 22 | 25 | url: 'https://raw.githubusercontent.com/Lissy93/awesome-privacy/main/api/open-api-spec.yml', |
| @@ -32,3 +35,11 @@ import MainCard from '@components/scafold/MainCard.astro'; | ||
| 32 | 35 | }); |
| 33 | 36 | } |
| 34 | 37 | </script> |
| 38 | ||
| 39 | <style lang="scss"> | |
| 40 | .go { | |
| 41 | display: flex; | |
| 42 | justify-content: center; | |
| 43 | margin-top: 1rem; | |
| 44 | } | |
| 45 | </style> | |