-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(starlight): add
ContentPanel
override, update stoplight elements
- Loading branch information
Showing
5 changed files
with
51 additions
and
18 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,12 @@ | ||
<script src="/lucero/stoplight-elements/js/web-component.min.js"></script> | ||
<link | ||
rel="stylesheet" | ||
href="/lucero/stoplight-elements/css/styles.min.css" | ||
/> | ||
|
||
<div class="not-content"> | ||
<elements-api | ||
apiDescriptionUrl="https://raw.githubusercontent.com/PokeAPI/pokeapi/master/openapi.yml" | ||
router="hash" | ||
/> | ||
</div> |
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,22 @@ | ||
--- | ||
import type { Props } from '@astrojs/starlight/props' | ||
import Default from '@astrojs/starlight/components/ContentPanel.astro' | ||
const pageSlug = Astro.props.slug | ||
--- | ||
{ | ||
pageSlug === 'rapidoc/pokeapi' || pageSlug === 'stoplight-elements/pokeapi' ? ( | ||
<section> | ||
<slot /> | ||
</section> | ||
) : ( | ||
<Default {...Astro.props}> | ||
<slot /> | ||
</Default> | ||
) | ||
} | ||
|
||
<style> | ||
section:first-child { | ||
display: none; | ||
} | ||
</style> |
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,12 @@ | ||
--- | ||
title: PokeAPI (Stoplight Elements) | ||
template: splash | ||
prev: true | ||
next: true | ||
attrs: | ||
target: _blank | ||
--- | ||
|
||
import Poke from "../../../components/StoplightElementsPokeapi.html"; | ||
|
||
<Poke/> |
This file was deleted.
Oops, something went wrong.