mirror of
https://github.com/status-im/pluto.git
synced 2025-02-24 08:28:15 +00:00
55 lines
1.3 KiB
HTML
55 lines
1.3 KiB
HTML
<html>
|
|
<head>
|
|
<style>
|
|
main {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
height: 100%
|
|
}
|
|
|
|
#selection {
|
|
padding: 10px;
|
|
}
|
|
|
|
#extension {
|
|
border: 40px solid #ddd;
|
|
border-width: 55px 7px;
|
|
border-radius: 40px;
|
|
margin: 50px auto;
|
|
width: 30vh;
|
|
height: 50vh;
|
|
overflow: hidden;
|
|
}
|
|
|
|
#extension iframe {
|
|
border: 0;
|
|
height: 100%;
|
|
width: 100%
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<script>
|
|
function load(urn) {
|
|
pluto.demo.load_and_render(urn, document.getElementById("frame").contentWindow.document.body.firstChild, document.getElementById("errors"));
|
|
}
|
|
</script>
|
|
<main>
|
|
<div id="selection">
|
|
Load demo extension from
|
|
<button disabled onclick="load('ipfs:QmSKP6f2uUsFq4mk1Afe4ZktxwQifrLb4xRQYNE1LxidKz')">IPFS</button>
|
|
<button onclick="load('url:assets/extensions/demo')">HTTP</button>
|
|
</div>
|
|
<div id="extension">
|
|
<iframe id="frame" srcdoc="<body><main></main></body>"></iframe>
|
|
</div>
|
|
<div id="errors"></div>
|
|
<video id="preview"></video>
|
|
</main>
|
|
</body>
|
|
</html>
|
|
|
|
<script src="assets/pluto.js"></script>
|