| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Minimal Solid data browser - a lightweight alternative to mashlib using the JSS authentication stack.
<!DOCTYPE html>
<html>
<head>
<title>My Solid App</title>
</head>
<body id="PageBody">
<header id="PageHeader"></header>
<main id="DummyUUID"></main>
<footer id="PageFooter"></footer>
<script src="https://unpkg.com/solid-shim/dist/solid-shim.min.js"></script>
<script>
panes.runDataBrowser()
</script>
</body>
</html>solid-shim supports the @view proposal for JSON-LD, allowing data to specify its own renderer.
<!DOCTYPE html>
<html>
<body>
<script type="application/ld+json">
{
"@context": { "schema": "http://schema.org/" },
"@type": "schema:Person",
"@view": "https://jsonos.com/examples/src/panes/person.js",
"schema:name": "Marie Curie",
"schema:jobTitle": "Physicist"
}
</script>
<script src="https://jsonos.com/browser/dist/mashlib.min.js"></script>
<script>
solidShim.renderView()
</script>
</body>
</html>When renderView() is called, solid-shim:
solidShim.renderView({
target: '#myDiv', // Element or selector to render into
subject: '#me', // Subject ID to render (default: @id from JSON-LD)
fallbackPane: myPane // Pane to use if @view fails or is missing
})Pane modules are ES modules with a render function:
export default {
name: 'person',
render(subject, context) {
const store = context.session.store
const div = document.createElement('div')
// ... render logic
return div
}
}See the W3C proposal for more details.
solid-shim exposes the same globals as mashlib:
git clone https://github.com/JavaScriptSolidServer/solid-shim
cd solid-shim
npm install
npm startnpm run buildsolid-shim ├── solid-panes-jss (panes and UI components) │ ├── solid-ui-jss (UI widgets) │ │ └── solid-logic-jss (core logic) │ │ └── solid-oidc (authentication) │ └── various pane packages └── rdflib (RDF processing)
This is a minimal alternative to SolidOS/mashlib using the JSS authentication stack:
MIT
| Back | FazBrowse Home | New Git URL |