style, fix: footer with notifications, styling improvements
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
e2db937b65
commit
4b798163f9
1 changed files with 36 additions and 26 deletions
|
@ -1,22 +1,19 @@
|
|||
<script lang="ts">
|
||||
import Icon from "../utils/Icon.svelte"
|
||||
import Icon from "../utils/Icon.svelte";
|
||||
import Jobs from "./Jobs.svelte";
|
||||
import Notifications from "./Notifications.svelte";
|
||||
import { i18n } from "../../i18n";
|
||||
|
||||
let hidden = true;
|
||||
let activeJobs: number;
|
||||
|
||||
let infoHeight = -1;
|
||||
</script>
|
||||
|
||||
<footer
|
||||
id="footer"
|
||||
class:hidden
|
||||
style="--info-height: -{infoHeight}px"
|
||||
>
|
||||
<footer id="footer" class:hidden>
|
||||
<div class="notifications">
|
||||
<Notifications />
|
||||
</div>
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<div class="status" bind:clientHeight={infoHeight} on:click={() => hidden = !hidden}>
|
||||
<div class="status" on:click={() => (hidden = !hidden)}>
|
||||
<div class="info">
|
||||
{#if activeJobs > 0}
|
||||
{$i18n.t("Active jobs:")} {activeJobs}
|
||||
|
@ -25,13 +22,10 @@
|
|||
{/if}
|
||||
</div>
|
||||
<div class="icons">
|
||||
<Icon
|
||||
name="{hidden ? 'up' : 'down'}-arrow"
|
||||
/>
|
||||
<Icon name="{hidden ? 'up' : 'down'}-arrow" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<Notifications />
|
||||
<div class="jobs">
|
||||
<Jobs bind:active={activeJobs} />
|
||||
</div>
|
||||
</footer>
|
||||
|
@ -41,26 +35,32 @@
|
|||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
& > * {
|
||||
padding: 0 0.5rem;
|
||||
}
|
||||
|
||||
background: var(--background);
|
||||
border-top: 1px solid var(--foreground-lighter);
|
||||
|
||||
transition: 0.7s bottom ease;
|
||||
|
||||
--height: calc(100vh / 6);
|
||||
}
|
||||
|
||||
footer.hidden {
|
||||
bottom: -20vh;
|
||||
bottom: calc(var(--height) * -1);
|
||||
}
|
||||
|
||||
.status {
|
||||
height: 2rem;
|
||||
width: 100%;
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 2em;
|
||||
padding: 0.2em;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
|
||||
cursor: pointer;
|
||||
|
||||
|
@ -70,13 +70,23 @@
|
|||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
margin-top: 2em;
|
||||
overflow-y: scroll;
|
||||
height: 20vh;
|
||||
.notifications,
|
||||
.jobs {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.25rem;
|
||||
}
|
||||
|
||||
:global(#footer .content > *) {
|
||||
margin: 0.5rem;
|
||||
:global(.notifications > *:first-child) {
|
||||
padding-top: 0.5rem;
|
||||
}
|
||||
|
||||
.jobs {
|
||||
overflow-y: scroll;
|
||||
height: var(--height);
|
||||
|
||||
padding-top: 0.5rem;
|
||||
|
||||
background: var(--background-lighter);
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in a new issue