Rename StickyBar and StickyBottom to StickyHeader and StickyFooter

This commit is contained in:
Henrik Giesel 2021-09-15 23:15:55 +02:00
parent 896b40c873
commit 60690e0557
6 changed files with 16 additions and 16 deletions

View File

@ -5,7 +5,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
<script lang="ts"> <script lang="ts">
import type { ChangeNotetypeState } from "./lib"; import type { ChangeNotetypeState } from "./lib";
import StickyBar from "components/StickyBar.svelte"; import StickyHeader from "components/StickyHeader.svelte";
import ButtonToolbar from "components/ButtonToolbar.svelte"; import ButtonToolbar from "components/ButtonToolbar.svelte";
import Item from "components/Item.svelte"; import Item from "components/Item.svelte";
import ButtonGroup from "components/ButtonGroup.svelte"; import ButtonGroup from "components/ButtonGroup.svelte";
@ -25,7 +25,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
} }
</script> </script>
<StickyBar> <StickyHeader>
<ButtonToolbar class="justify-content-between" size={2.3} wrap={false}> <ButtonToolbar class="justify-content-between" size={2.3} wrap={false}>
<Item> <Item>
<ButtonGroup class="flex-grow-1"> <ButtonGroup class="flex-grow-1">
@ -48,4 +48,4 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
<SaveButton {state} /> <SaveButton {state} />
</Item> </Item>
</ButtonToolbar> </ButtonToolbar>
</StickyBar> </StickyHeader>

View File

@ -10,7 +10,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
export let height: number = 0; export let height: number = 0;
</script> </script>
<footer {id} bind:offsetHeight={height} class={`container-fluid pt-1 ${className}`}> <footer {id} bind:offsetHeight={height} class="container-fluid pt-1 {className}">
<slot /> <slot />
</footer> </footer>

View File

@ -8,12 +8,12 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
export { className as class }; export { className as class };
</script> </script>
<nav {id} class={`container-fluid py-1 ${className}`}> <header {id} class="container-fluid pb-1 {className}">
<slot /> <slot />
</nav> </header>
<style lang="scss"> <style lang="scss">
nav { header {
position: sticky; position: sticky;
top: 0; top: 0;
left: 0; left: 0;

View File

@ -10,7 +10,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
import type Modal from "bootstrap/js/dist/modal"; import type Modal from "bootstrap/js/dist/modal";
import TextInputModal from "./TextInputModal.svelte"; import TextInputModal from "./TextInputModal.svelte";
import StickyBar from "components/StickyBar.svelte"; import StickyHeader from "components/StickyHeader.svelte";
import ButtonToolbar from "components/ButtonToolbar.svelte"; import ButtonToolbar from "components/ButtonToolbar.svelte";
import Item from "components/Item.svelte"; import Item from "components/Item.svelte";
import ButtonGroup from "components/ButtonGroup.svelte"; import ButtonGroup from "components/ButtonGroup.svelte";
@ -87,7 +87,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
bind:modalKey bind:modalKey
/> />
<StickyBar class="g-1"> <StickyHeader class="g-1">
<ButtonToolbar class="justify-content-between" size={2.3} wrap={false}> <ButtonToolbar class="justify-content-between" size={2.3} wrap={false}>
<Item> <Item>
<ButtonGroup class="flex-grow-1"> <ButtonGroup class="flex-grow-1">
@ -115,4 +115,4 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
/> />
</Item> </Item>
</ButtonToolbar> </ButtonToolbar>
</StickyBar> </StickyHeader>

View File

@ -27,7 +27,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
<script lang="typescript"> <script lang="typescript">
import { isApplePlatform } from "lib/platform"; import { isApplePlatform } from "lib/platform";
import StickyBar from "components/StickyBar.svelte"; import StickyHeader from "components/StickyHeader.svelte";
import ButtonToolbar from "components/ButtonToolbar.svelte"; import ButtonToolbar from "components/ButtonToolbar.svelte";
import Item from "components/Item.svelte"; import Item from "components/Item.svelte";
@ -51,7 +51,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
export const templateButtons = {}; export const templateButtons = {};
</script> </script>
<StickyBar> <StickyHeader>
<ButtonToolbar {size} {wrap} api={toolbar}> <ButtonToolbar {size} {wrap} api={toolbar}>
<Item id="notetype"> <Item id="notetype">
<NoteTypeButtons api={notetypeButtons} /> <NoteTypeButtons api={notetypeButtons} />
@ -73,4 +73,4 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
<TemplateButtons api={templateButtons} /> <TemplateButtons api={templateButtons} />
</Item> </Item>
</ButtonToolbar> </ButtonToolbar>
</StickyBar> </StickyHeader>

View File

@ -6,7 +6,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
import { tick } from "svelte"; import { tick } from "svelte";
import { isApplePlatform } from "lib/platform"; import { isApplePlatform } from "lib/platform";
import { bridgeCommand } from "lib/bridgecommand"; import { bridgeCommand } from "lib/bridgecommand";
import StickyBottom from "components/StickyBottom.svelte"; import StickyFooter from "components/StickyFooter.svelte";
import TagOptionsBadge from "./TagOptionsBadge.svelte"; import TagOptionsBadge from "./TagOptionsBadge.svelte";
import TagEditMode from "./TagEditMode.svelte"; import TagEditMode from "./TagEditMode.svelte";
import TagInput from "./TagInput.svelte"; import TagInput from "./TagInput.svelte";
@ -390,7 +390,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
$: shortenTags = shortenTags || assumedRows > 2; $: shortenTags = shortenTags || assumedRows > 2;
</script> </script>
<StickyBottom bind:height class="d-flex"> <StickyFooter bind:height class="d-flex">
{#if !wrap} {#if !wrap}
<TagOptionsBadge <TagOptionsBadge
--buttons-size="{size}rem" --buttons-size="{size}rem"
@ -503,7 +503,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
<Tag>SPACER</Tag> <Tag>SPACER</Tag>
</div> </div>
</ButtonToolbar> </ButtonToolbar>
</StickyBottom> </StickyFooter>
<style lang="scss"> <style lang="scss">
.tag-spacer { .tag-spacer {