async function createApp(iframe) {
const app = await layout(iframe, {
leftSideBarWidth: width / 4,
rightSideBarWidth: 400,
headerHeight: height / 5,
sizeTolerance: 4
});
function showColor(part, color, label = '') {
part.style.setProperty('display', 'flex');
part.appendChild(
html`<div style="background-color: ${color}; margin: 10px; height: calc(100% - 20px); width: calc(100% - 20px); display: flex; justify-content: center; align-items: center; font: 24px mono;">${label}</div>`
);
}
showColor(app.parts.header, 'lightpink', 'header');
showColor(app.parts.leftSideBar, 'lightblue', 'leftSideBar');
showColor(app.parts.main, 'coral', 'main');
showColor(app.parts.rightSideBar, 'yellow', 'rightSideBar');
showColor(app.parts.footer, 'wheat', 'footer');
return app;
}