-
-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: make 404 follow theme and add a return home page * feat: sanitise translations when using v-html * chore: Add native API docs to website * chore: remove try it button from api docs --------- Co-authored-by: tonyaellie <[email protected]>
- Loading branch information
1 parent
56316ca
commit b995665
Showing
5 changed files
with
46 additions
and
7 deletions.
There are no files selected for viewing
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
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,37 @@ | ||
--- | ||
layout: page | ||
sidebar: false | ||
--- | ||
|
||
<script setup lang="ts"> | ||
import { useData } from 'vitepress'; | ||
|
||
const elementScript = document.createElement('script'); | ||
elementScript.src = 'https://unpkg.com/@stoplight/elements/web-components.min.js'; | ||
document.head.appendChild(elementScript); | ||
|
||
const elementStyle = document.createElement('link'); | ||
elementStyle.rel = 'stylesheet'; | ||
elementStyle.href = 'https://unpkg.com/@stoplight/elements/styles.min.css'; | ||
document.head.appendChild(elementStyle); | ||
|
||
const { isDark } = useData(); | ||
let theme = 'light'; | ||
if (isDark.value) { | ||
theme = 'dark'; | ||
} | ||
</script> | ||
|
||
<style> | ||
.TryItPanel { | ||
display: none; | ||
} | ||
</style> | ||
|
||
<elements-api | ||
apiDescriptionUrl="https://cdn.jsdelivr.net/gh/sysadminsmedia/homebox@main/docs/docs/api/openapi-2.0.json" | ||
router="hash" | ||
layout="responsive" | ||
hideSchemas="true" | ||
:data-theme="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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<template> | ||
<main class="grid min-h-screen w-full place-items-center bg-blue-100"> | ||
<main class="grid min-h-screen w-full place-items-center"> | ||
<slot></slot> | ||
</main> | ||
</template> |
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
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