mirror of https://github.com/status-im/pluto.git
Improved playground
This commit is contained in:
parent
50199c8f92
commit
2c1913b9ac
|
@ -4,41 +4,87 @@
|
|||
"next": "Next",
|
||||
"previous": "Previous",
|
||||
"tagline": "A grammar for data manipulation",
|
||||
"build/Deployment": "Deployment",
|
||||
"Deployment": "Deployment",
|
||||
"build/FirstExtension": "My first extension",
|
||||
"My first extension": "My first extension",
|
||||
"build/Packaging": "Packaging",
|
||||
"Packaging": "Packaging",
|
||||
"concepts/Anatomy": "Anatomy",
|
||||
"Anatomy of an extension": "Anatomy of an extension",
|
||||
"concepts/Event": "Event",
|
||||
"Event": "Event",
|
||||
"concepts/Hook": "Hook",
|
||||
"Hook": "Hook",
|
||||
"concepts/Query": "Query",
|
||||
"Query": "Query",
|
||||
"concepts/Registry": "Registry",
|
||||
"Registry": "Registry",
|
||||
"concepts/View": "View",
|
||||
"View": "View",
|
||||
"decisions/0001-record-decisions": "decisions/0001-record-decisions",
|
||||
"decisions/0002-reader-errors": "decisions/0002-reader-errors",
|
||||
"decisions/README": "decisions/README",
|
||||
"decisions/templates/template": "decisions/templates/template",
|
||||
"Development": "Development",
|
||||
"Manifesto": "Manifesto",
|
||||
"Principles": "Principles",
|
||||
"principles/Privacy": "principles/Privacy",
|
||||
"principles/Security": "principles/Security",
|
||||
"principles/Simplicity": "principles/Simplicity",
|
||||
"Roadmap": "Roadmap",
|
||||
"Docs": "Docs",
|
||||
"Examples": "Examples",
|
||||
"Getting Started": "Getting Started",
|
||||
"Concepts": "Concepts",
|
||||
"Build": "Build",
|
||||
"Contributing": "Contributing"
|
||||
"docs": {
|
||||
"build/Deployment": {
|
||||
"title": "Deployment",
|
||||
"sidebar_label": "Deployment"
|
||||
},
|
||||
"build/FirstExtension": {
|
||||
"title": "My first extension",
|
||||
"sidebar_label": "My first extension"
|
||||
},
|
||||
"build/Packaging": {
|
||||
"title": "Packaging",
|
||||
"sidebar_label": "Packaging"
|
||||
},
|
||||
"concepts/Anatomy": {
|
||||
"title": "Anatomy",
|
||||
"sidebar_label": "Anatomy of an extension"
|
||||
},
|
||||
"concepts/Block": {
|
||||
"title": "Block",
|
||||
"sidebar_label": "Block"
|
||||
},
|
||||
"concepts/Event": {
|
||||
"title": "Event",
|
||||
"sidebar_label": "Event"
|
||||
},
|
||||
"concepts/Hook": {
|
||||
"title": "Hook",
|
||||
"sidebar_label": "Hook"
|
||||
},
|
||||
"concepts/Query": {
|
||||
"title": "Query",
|
||||
"sidebar_label": "Query"
|
||||
},
|
||||
"concepts/Reference": {
|
||||
"title": "Reference",
|
||||
"sidebar_label": "Reference"
|
||||
},
|
||||
"concepts/Registry": {
|
||||
"title": "Registry",
|
||||
"sidebar_label": "Registry"
|
||||
},
|
||||
"concepts/View": {
|
||||
"title": "View",
|
||||
"sidebar_label": "View"
|
||||
},
|
||||
"decisions/0001-record-decisions": {
|
||||
"title": "decisions/0001-record-decisions"
|
||||
},
|
||||
"decisions/0002-reader-errors": {
|
||||
"title": "decisions/0002-reader-errors"
|
||||
},
|
||||
"decisions/README": {
|
||||
"title": "decisions/README"
|
||||
},
|
||||
"decisions/templates/template": {
|
||||
"title": "decisions/templates/template"
|
||||
},
|
||||
"Development": {
|
||||
"title": "Development"
|
||||
},
|
||||
"Manifesto": {
|
||||
"title": "Manifesto"
|
||||
},
|
||||
"Principles": {
|
||||
"title": "Principles"
|
||||
},
|
||||
"Roadmap": {
|
||||
"title": "Roadmap"
|
||||
}
|
||||
},
|
||||
"links": {
|
||||
"Docs": "Docs",
|
||||
"Examples": "Examples",
|
||||
"Try": "Try"
|
||||
},
|
||||
"categories": {
|
||||
"Getting Started": "Getting Started",
|
||||
"Concepts": "Concepts",
|
||||
"Build": "Build",
|
||||
"Contributing": "Contributing"
|
||||
}
|
||||
},
|
||||
"pages-strings": {
|
||||
"Help Translate|recruit community translators for your project": "Help Translate",
|
||||
|
|
|
@ -16,13 +16,15 @@
|
|||
<script>
|
||||
const ipfs = new window.Ipfs();
|
||||
|
||||
async function load() {
|
||||
const buffer = await loadIPFS(ipfs, "QmYoa8CBcYmzm6Kd1NbPNLYQtbwMpwR7YBiywaAyST5gtH");
|
||||
async function load(hash) {
|
||||
const buffer = await loadIPFS(ipfs, hash);
|
||||
return buffer.toString();
|
||||
}
|
||||
|
||||
ipfs.once("ready", async () => {
|
||||
const content = await load();
|
||||
let params = (new URL(document.location)).searchParams;
|
||||
let hash = params.get("hash");
|
||||
const content = await load(hash || "QmYoa8CBcYmzm6Kd1NbPNLYQtbwMpwR7YBiywaAyST5gtH");
|
||||
codeMirror.setValue(content);
|
||||
});
|
||||
|
||||
|
|
|
@ -131,51 +131,48 @@ main {
|
|||
padding: 10px;
|
||||
}
|
||||
|
||||
#side-column {
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
#panel {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
#side-column {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 25%;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
#docs {
|
||||
margin-top: 1em;
|
||||
margin-right: 0.5em;
|
||||
overflow-y: scroll;
|
||||
height: 27em;
|
||||
box-shadow: 0px 0px 1px #666 inset;
|
||||
overflow-y: scroll;
|
||||
height: 50vh;
|
||||
box-shadow: 0px 0px 1px #666 inset;
|
||||
}
|
||||
|
||||
#docs h6 {
|
||||
margin: 0px;
|
||||
margin-bottom: 0.5em;
|
||||
padding-left: 0.5em;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
background-color: #d4d4d4;
|
||||
margin: 0px;
|
||||
margin-bottom: 0.5em;
|
||||
padding-left: 0.5em;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
background-color: #d4d4d4;
|
||||
}
|
||||
|
||||
#docs li {
|
||||
list-style: none;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
#docs ul {
|
||||
padding-left: 0.5em;
|
||||
padding-left: 0.5em;
|
||||
}
|
||||
|
||||
#docs pre {
|
||||
font-family: monospace;
|
||||
font-size: 0.9em;
|
||||
margin-bottom: 0px;
|
||||
color: #5f9ea0;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
#docs pre.inline-args {
|
||||
/* display: inline-block; */
|
||||
font-family: monospace;
|
||||
font-size: 0.9em;
|
||||
margin-bottom: 0px;
|
||||
color: #5f9ea0;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
#panel p {
|
||||
|
|
Loading…
Reference in New Issue