chore(ui): footer is hidden by default

feat/type-attributes
Tomáš Mládek 2023-01-02 00:46:01 +01:00
parent c6c869787d
commit acfd8432dc
1 changed files with 19 additions and 4 deletions

View File

@ -10,19 +10,27 @@
let rootEl: HTMLElement; let rootEl: HTMLElement;
let contentEl: HTMLElement; let contentEl: HTMLElement;
let contentHeight = 0; let contentHeight = 0;
let hidden = false; let hidden = true;
let activeJobs: number; let activeJobs: number;
onMount(() => { onMount(() => {
const observer = new ResizeObserver((entries) => { const rootObserver = new ResizeObserver((entries) => {
// should be only one // should be only one
entries.forEach((entry) => { entries.forEach((entry) => {
contentHeight = contentEl?.getBoundingClientRect()?.height;
dispatch("resize", entry.contentRect.height); dispatch("resize", entry.contentRect.height);
}); });
}); });
observer.observe(rootEl); rootObserver.observe(rootEl);
const contentObserver = new ResizeObserver((entries) => {
entries.forEach((entry) => {
contentHeight = entry.contentRect.height;
});
});
contentObserver.observe(contentEl);
rootEl.style.top = `${rootEl.getBoundingClientRect().top}px`;
}); });
function toggleHidden() { function toggleHidden() {
@ -91,6 +99,9 @@
align-items: center; align-items: center;
height: 2em; height: 2em;
padding: 0.2em; padding: 0.2em;
position: absolute;
top: 0;
width: 100%;
.info { .info {
flex-grow: 1; flex-grow: 1;
@ -98,6 +109,10 @@
} }
} }
.content {
margin-top: 2em;
}
:global(#footer .content > *) { :global(#footer .content > *) {
margin: 0.5rem; margin: 0.5rem;
} }