Skip to content

Commit

Permalink
header: fix layout jumping with reload button
Browse files Browse the repository at this point in the history
  • Loading branch information
yagebu committed Jan 21, 2024
1 parent f351018 commit 19914c8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
1 change: 1 addition & 0 deletions frontend/css/layout.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ header {
display: flex;
flex-wrap: wrap;
grid-area: header;
gap: 0.5em;
align-items: center;
padding: 0.5em;
color: var(--header-color);
Expand Down
24 changes: 11 additions & 13 deletions frontend/src/sidebar/Header.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,6 @@
<HeaderIcon />
<h1>
{$ledger_title}{#if has_dropdown}&nbsp;▾{/if}<PageTitle />
<button
type="button"
hidden={!$has_changes}
class="reload-page"
use:keyboardShortcut={"r"}
on:click={router.reload.bind(router)}
>
&#8635;
</button>
{#if has_dropdown}
<div class="beancount-files">
<ul>
Expand All @@ -37,20 +28,27 @@
</div>
{/if}
</h1>
<button
type="button"
hidden={false && !$has_changes}
class="reload-page"
use:keyboardShortcut={"r"}
on:click={router.reload.bind(router)}
>
&#8635;
</button>
<span class="spacer" />
<FilterForm />
</header>

<style>
.reload-page {
margin-top: -8px;
margin-left: 20px;
background-color: var(--warning);
}
h1 {
display: inline-block;
flex: 1 0 content;
padding: 0.25em 0.5em;
padding: 0.5rem;
margin: 0;
overflow: hidden;
font-size: 16px;
Expand Down

0 comments on commit 19914c8

Please sign in to comment.