mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
29 lines
681 B
Plaintext
29 lines
681 B
Plaintext
---
|
|
import type { Schema } from "@/util/schema_utils";
|
|
import { SchemaTools } from "@/util/schema_utils";
|
|
|
|
export interface Props {
|
|
schema: Schema;
|
|
onlyDefs?: boolean;
|
|
}
|
|
|
|
const { schema, onlyDefs } = Astro.props;
|
|
---
|
|
|
|
<div>
|
|
<a href={`/schemas/${schema.rootSlug}`}
|
|
>{onlyDefs ? SchemaTools.getTitle(schema) : schema.rootTitle}</a
|
|
>
|
|
/ <a href={`/schemas/${schema.rootSlug}/defs`}>Definitions</a>
|
|
{!(onlyDefs ?? false) && <> / {schema.slug}</>}
|
|
</div>
|
|
|
|
<style>
|
|
div {
|
|
padding: 1rem;
|
|
background-color: hsla(var(--color-gray-10), 1);
|
|
border: solid 2px hsla(var(--color-gray-20), 1);
|
|
border-radius: 1rem;
|
|
}
|
|
</style>
|