Improve mobile view
This commit is contained in:
parent
875cac536f
commit
0168360eee
|
@ -35,7 +35,7 @@
|
|||
|
||||
{#if showModal}
|
||||
<ModalCard {card} />
|
||||
{:else}{/if}
|
||||
{/if}
|
||||
|
||||
<style lang="less">
|
||||
.card {
|
||||
|
|
|
@ -137,10 +137,12 @@
|
|||
|
||||
.column {
|
||||
margin: 20px 10px;
|
||||
width: 250px;
|
||||
border: 1px solid red;
|
||||
flex: 0 0 250px;
|
||||
|
||||
.one-column({
|
||||
scroll-snap-align: center;
|
||||
flex-basis: 80vw;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -126,7 +126,7 @@
|
|||
scroll-snap-type: x mandatory;
|
||||
|
||||
.one-column({
|
||||
padding-left: calc(50vw - (250px / 2));
|
||||
padding: 0 10%;
|
||||
});
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -56,12 +56,16 @@
|
|||
{#each $views as view}
|
||||
<!-- svelte-ignore a11y-no-noninteractive-element-to-interactive-role -->
|
||||
<li
|
||||
on:click={() => currentView.set(view)}
|
||||
on:click={() => {
|
||||
currentView.set(view);
|
||||
isVisible = false;
|
||||
}}
|
||||
role="button"
|
||||
tabindex="0"
|
||||
on:keydown={(e) => {
|
||||
if (e.key === 'Enter') {
|
||||
currentView.set(view);
|
||||
isVisible = false;
|
||||
}
|
||||
}}
|
||||
class:active={$currentView === view}
|
||||
|
|
Loading…
Reference in New Issue