68092082f2
* Enable access to old notetype name * Set minimum height for ChangeNotetypeDialog * Add bootstrap icons to change-notetype * Move alert up and make it collapsible * Tweak some CSS - Add variables --sticky-bg and --sticky-border to StickyContainer - Tweak base.css * Add translatable string "(Nothing)" * Rework ChangeNotetype screen * Initially load option at newIndex and remaining options on focus Optimization for big notetypes: Should increase efficiency from O(n²) to O(n). Test on notetype with 500 templates shows significant improvement in load time (~10s down to ~1s). * Try to satisfy rust test * Change arrow direction depending on reading direction + add 0.5em top padding to main * Create Alert.svelte * Introduce CSS variable --pane-bg * Revert "Initially load option at newIndex and remaining options on focus" This reverts commit f42beee45c27dba9433d76217fb583b117fb5231. * Final cleanup * Refine padding/gutter
39 lines
1.0 KiB
Svelte
39 lines
1.0 KiB
Svelte
<!--
|
|
Copyright: Ankitects Pty Ltd and contributors
|
|
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|
-->
|
|
<script lang="ts">
|
|
import Container from "./Container.svelte";
|
|
import type { Breakpoint } from "./types";
|
|
|
|
export let id: string | undefined = undefined;
|
|
let className: string = "";
|
|
export { className as class };
|
|
|
|
export let height: number = 0;
|
|
export let breakpoint: Breakpoint | "fluid" = "fluid";
|
|
export let api: Record<string, never> | undefined = undefined;
|
|
</script>
|
|
|
|
<div {id} bind:offsetHeight={height} class="sticky-container {className}">
|
|
<Container {breakpoint} {api}>
|
|
<slot />
|
|
</Container>
|
|
</div>
|
|
|
|
<style lang="scss">
|
|
.sticky-container {
|
|
position: sticky;
|
|
top: 0;
|
|
bottom: 0;
|
|
left: 0;
|
|
right: 0;
|
|
z-index: 10;
|
|
|
|
background: var(--sticky-bg, var(--window-bg));
|
|
border-style: solid;
|
|
border-color: var(--sticky-border, var(--medium-border));
|
|
border-width: var(--sticky-borders, 0);
|
|
}
|
|
</style>
|