apply_layout = {
console.log("apply_layout");
if (
location.href.includes("observableusercontent.com") &&
!location.href.includes("blob:")
)
return "Layout not applied when hosted on Observable";
const style = html`<style>
:root {
--header-size: 10rem;
}
.header {
top: 0;
left: 0;
position: fixed;
width: 100%;
height: var(--header-size);
}
.sidebar {
top: 10rem;
position: fixed;
height: 100%;
overflow: auto;
}
.left {
left: 0;
}
.right {
right: 0;
}
.content {
margin-top: var(--header-size);
margin-left: auto;
margin-right: auto;
};
</style>`;
debugger;
document.body.appendChild(content);
document.body.appendChild(header);
document.body.appendChild(right_sidebar);
document.body.appendChild(left_sidebar);
document.body.appendChild(style);
}