Skip to content

Commit

Permalink
fix: sticky nav panel (close #38)
Browse files Browse the repository at this point in the history
  • Loading branch information
valentine195 committed Jun 17, 2023
1 parent c1dcc4d commit 5ef60df
Showing 1 changed file with 27 additions and 17 deletions.
44 changes: 27 additions & 17 deletions src/calendar/ui/Calendar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -85,23 +85,25 @@
</div>
<Nav />
</div>
{#if $viewState == ViewState.Year}
<Year />
{:else if $viewState == ViewState.Month}
{#key $displaying}
<Month year={$displaying.year} month={$displaying.month} />
{/key}
{:else if $viewState == ViewState.Week}
<Weekdays year={$displaying.year} month={$displaying.month} />
<Week
year={$displaying.year}
month={$displaying.month}
dayArray={weekForDay}
{weekNumber}
/>
{:else if $viewState == ViewState.Day}
<DayView />
{/if}
<div class="calendar">
{#if $viewState == ViewState.Year}
<Year />
{:else if $viewState == ViewState.Month}
{#key $displaying}
<Month year={$displaying.year} month={$displaying.month} />
{/key}
{:else if $viewState == ViewState.Week}
<Weekdays year={$displaying.year} month={$displaying.month} />
<Week
year={$displaying.year}
month={$displaying.month}
dayArray={weekForDay}
{weekNumber}
/>
{:else if $viewState == ViewState.Day}
<DayView />
{/if}
</div>
{#if $viewing}
<hr />
<DayView />
Expand All @@ -110,6 +112,14 @@
{/key}

<style scoped>
.calendar-container {
overflow: hidden;
display: flex;
flex-flow: column nowrap;
}
.calendar {
overflow: auto;
}
.top-container {
display: flex;
flex-flow: column;
Expand Down

0 comments on commit 5ef60df

Please sign in to comment.