mirror of
https://github.com/ankitects/anki.git
synced 2025-09-23 16:26:40 -04:00
Use StickyBar in deckoptions
This commit is contained in:
parent
fa47f6ec15
commit
a8b1291f84
3 changed files with 8 additions and 12 deletions
|
@ -27,6 +27,7 @@ compile_svelte(
|
||||||
srcs = svelte_files,
|
srcs = svelte_files,
|
||||||
deps = [
|
deps = [
|
||||||
"//ts/sveltelib",
|
"//ts/sveltelib",
|
||||||
|
"//ts/components",
|
||||||
"@npm//@types/bootstrap",
|
"@npm//@types/bootstrap",
|
||||||
"@npm//@types/marked",
|
"@npm//@types/marked",
|
||||||
],
|
],
|
||||||
|
@ -100,6 +101,8 @@ esbuild(
|
||||||
":base_css",
|
":base_css",
|
||||||
"//ts/sveltelib",
|
"//ts/sveltelib",
|
||||||
"@npm//marked",
|
"@npm//marked",
|
||||||
|
"//ts/components",
|
||||||
|
"//ts/components:svelte_components",
|
||||||
] + svelte_names,
|
] + svelte_names,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -132,6 +135,7 @@ svelte_check(
|
||||||
"@npm//@types/bootstrap",
|
"@npm//@types/bootstrap",
|
||||||
"@npm//@types/lodash-es",
|
"@npm//@types/lodash-es",
|
||||||
"@npm//@types/marked",
|
"@npm//@types/marked",
|
||||||
|
"//ts/components:svelte_components",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import * as tr from "lib/i18n";
|
import * as tr from "lib/i18n";
|
||||||
import type { DeckOptionsState, ConfigListEntry } from "./lib";
|
import type { DeckOptionsState, ConfigListEntry } from "./lib";
|
||||||
|
import StickyBar from "components/StickyBar.svelte";
|
||||||
import OptionsDropdown from "./OptionsDropdown.svelte";
|
import OptionsDropdown from "./OptionsDropdown.svelte";
|
||||||
|
|
||||||
export let state: DeckOptionsState;
|
export let state: DeckOptionsState;
|
||||||
|
@ -21,16 +22,6 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.sticky-bar {
|
|
||||||
position: sticky;
|
|
||||||
z-index: 1;
|
|
||||||
top: 0;
|
|
||||||
color: var(--text-fg);
|
|
||||||
background: var(--window-bg);
|
|
||||||
padding-bottom: 0.5em;
|
|
||||||
padding-top: 0.5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.selector-grid {
|
.selector-grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 6fr 1fr;
|
grid-template-columns: 6fr 1fr;
|
||||||
|
@ -39,7 +30,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div class="sticky-bar">
|
<StickyBar>
|
||||||
<div>{tr.actionsOptionsFor({ val: state.currentDeck.name })}</div>
|
<div>{tr.actionsOptionsFor({ val: state.currentDeck.name })}</div>
|
||||||
|
|
||||||
<div class="selector-grid">
|
<div class="selector-grid">
|
||||||
|
@ -54,4 +45,4 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
|
|
||||||
<OptionsDropdown {state} />
|
<OptionsDropdown {state} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</StickyBar>
|
||||||
|
|
|
@ -153,6 +153,7 @@ prettier_test(
|
||||||
name = "format_check",
|
name = "format_check",
|
||||||
srcs = glob([
|
srcs = glob([
|
||||||
"*.ts",
|
"*.ts",
|
||||||
|
"*.svelte",
|
||||||
]),
|
]),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue