Skip to content

Commit

Permalink
Cleaned up files
Browse files Browse the repository at this point in the history
  • Loading branch information
jakedcolbert committed Aug 18, 2023
1 parent 796a45d commit 0bcce7f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 40 deletions.
20 changes: 11 additions & 9 deletions src/lib/components/CollectionSelector.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,18 @@ Book Collection Selector component.
import LayoutOptions from './LayoutOptions.svelte';
import TabsMenu from './TabsMenu.svelte';
import config from '$lib/data/config';
import { convertStyle, refs, layout, selectedLayouts, s, t } from '$lib/data/stores';
import {
convertStyle,
refs,
layout,
LAYOUT_SINGLE,
LAYOUT_TWO,
LAYOUT_VERSE_BY_VERSE,
selectedLayouts,
s,
t
} from '$lib/data/stores';
import { SinglePaneIcon, SideBySideIcon, VerseByVerseIcon } from '$lib/icons';
import { LAYOUT_SINGLE, LAYOUT_TWO, LAYOUT_VERSE_BY_VERSE } from '$lib/data/stores';
const modalId = 'collectionSelector';
let modal;
Expand All @@ -36,13 +45,6 @@ Book Collection Selector component.
};
}
export let vertOffset = '1rem'; //Prop that will have the navbar's height (in rem) passed in
//The positioningCSS positions the modal 1rem below the navbar and 1rem from the right edge of the screen (on mobile it will be centered)
$: positioningCSS =
'position:absolute; top:' +
(Number(vertOffset.replace('rem', '')) + 1) +
'rem; inset-inline-end:1rem;';
function handleOk() {
const selectedLayout = getSelectedLayout();
$refs.docSet = selectedLayout.primaryDocSet;
Expand Down
28 changes: 0 additions & 28 deletions src/lib/components/Dropdown.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ A simple dropdown menu from DaisyUI.
import { s, convertStyle } from '$lib/data/stores';
import { createEventDispatcher } from 'svelte';
export let cols = 6;
export let useCustomBtn = false;
export let direction = 'bottom';
const dispatch = createEventDispatcher();
</script>
Expand All @@ -32,30 +31,3 @@ A simple dropdown menu from DaisyUI.
<slot name="content" />
</div>
</div>

<style>
.custom-btn {
display: inline-flex;
cursor: pointer;
user-select: none;
align-items: center;
justify-content: center;
text-align: center;
transition-property: color, background-color, border-color, text-decoration-color, fill,
stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;
transition-duration: 200ms;
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
border-radius: var(--rounded-btn, 0.5rem);
height: 3rem;
line-height: 1em;
min-height: 3rem;
border-width: 1px;
border-color: transparent;
background-color: transparent;
color: currentColor;
--tw-shadow: 0 0 #0000;
--tw-shadow-colored: 0 0 #0000;
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000),
var(--tw-shadow);
}
</style>
4 changes: 2 additions & 2 deletions src/lib/components/LayoutOptions.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Displays the three different layout option menus.
<div class="layout-subtitle">
{i + 1}.
</div>
<Dropdown useCustomBtn={true} direction="right">
<Dropdown direction="right">
<svelte:fragment slot="label">
<div class="layout-item-block" style:box-shadow="unset">
<div class="layout-text-block normal-case text-left">
Expand Down Expand Up @@ -141,7 +141,7 @@ Displays the three different layout option menus.
<div class="layout-subtitle">
{i + 1}.
</div>
<Dropdown useCustomBtn={true} direction="right">
<Dropdown direction="right">
<svelte:fragment slot="label">
<div class="layout-item-block" style:box-shadow="unset">
<div class="layout-text-block normal-case text-left">
Expand Down
2 changes: 1 addition & 1 deletion src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<TextAppearanceSelector bind:this={textAppearanceSelector} vertOffset={NAVBAR_HEIGHT} />

<!-- Collection Selector Menu -->
<CollectionSelector bind:this={collectionSelector} vertOffset={NAVBAR_HEIGHT} />
<CollectionSelector bind:this={collectionSelector} />

<FontSelector bind:this={fontSelector} />
</div>
Expand Down

0 comments on commit 0bcce7f

Please sign in to comment.