Skip to content

Instantly share code, notes, and snippets.

@tmcw

tmcw/index.html Secret

Created August 11, 2018 21:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmcw/aada7871d515b1d5c839326babfa88eb to your computer and use it in GitHub Desktop.
Save tmcw/aada7871d515b1d5c839326babfa88eb to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<meta charset="utf-8">
<title>United States Active Fire Perimeters</title>
<link rel="stylesheet" type="text/css" href="https://unpkg.com/@observablehq/notebook-inspector@1/dist/notebook-inspector-style.css">
<style>
#mapContainer {
}
</style>
<body>
<div class="wrapper">
<div id="mapContainer"></div>
<div id="mapboxCss"></div>
</div>
<script type="module">
import {Inspector, Runtime} from "https://unpkg.com/@observablehq/notebook-runtime?module";
import notebook from "https://api.observablehq.com/d/fba227dd70679935.js?key=c0ca20dda200b774";
const notebookCellsToRender = {
"mapContainer": "#mapContainer",
"mapboxCss": "#mapboxCss"
};
Runtime.load(notebook, (cell) => {
const selector = notebookCellsToRender[cell.name];
if (selector) {
return new Inspector(document.querySelector(selector));
} else {
return true;
}
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment