Skip to content

Commit 1fbdc77

Browse files
committed
fix link hover icon
1 parent 22e8f92 commit 1fbdc77

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

src/App.jsx

+30-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ const NamespaceDashboard = (props) => {
105105
const SchemaList = (props) => {
106106
const listItems = Object.values(props.schemas).map(schema => {
107107
return <li key={schema.schema}>
108-
<a className="a" onClick={() => props.selectSchema(schema.schema)}>{schema.schema}</a> -- {schema.description} <a href={schema.url}>Download</a>
108+
<a href={`/?namespace=${schema.namespace}&schema=${schema.schema}`} className="a" onClick={(e) => { e.preventDefault(); props.selectSchema(schema.schema); } }>{schema.schema}</a> -- {schema.description} <a href={schema.url}>Download</a>
109109
</li>
110110
})
111111
console.log(props.schemas)
@@ -144,7 +144,36 @@ const SchemaSelector = (props) => {
144144
return (
145145
<>
146146
<h2>Select namespace</h2>
147+
147148
<Select options={namespaceList} onChange={selectNamespace} />
149+
150+
<hr/>
151+
152+
<h2>Guide</h2>
153+
This is a schema registry and API. It is hosted on GitHub Pages.
154+
Schemas are identified by a <i>namespace</i> and <i>schema name</i>, put together to form a *registry path*, of this form:
155+
156+
<br/><br/>
157+
158+
<pre><code>&#123;namespace&#125;/&#123;schema&#125;</code></pre>
159+
160+
<h3>Browsing</h3>
161+
162+
To browse existing schemas, select a namespace from the dropdown above. This will show you a list of all schemas in that namespace
163+
164+
<h3>API</h3>
165+
166+
To access a schema via the API, use the following URL format:
167+
<br/><br/>
168+
<pre><code>https://schema.databio.org/&#123;namespace&#125;/&#123;schema&#125;.yaml</code></pre>
169+
170+
You can also get a list of schemas in a namespace via the API:
171+
172+
<br/><br/>
173+
174+
<pre><code>https://schema.databio.org/&#123;namespace&#125;/schemas.json</code></pre>
175+
176+
<h3>Contributing</h3>You can contribute your own schema via PR to the GitHub repository.
148177
</>
149178
);
150179
}

0 commit comments

Comments
 (0)