Improve mobile view

This commit is contained in:
Brieuc Dubois 2024-01-17 20:13:33 +01:00
parent 875cac536f
commit 3f95e2811a
4 changed files with 9 additions and 4 deletions

View File

@ -35,7 +35,7 @@
{#if showModal}
<ModalCard {card} />
{:else}{/if}
{/if}
<style lang="less">
.card {

View File

@ -137,10 +137,11 @@
.column {
margin: 20px 10px;
width: 250px;
flex: 0 0 250px;
.one-column({
scroll-snap-align: center;
flex-basis: 80vw;
});
}

View File

@ -126,7 +126,7 @@
scroll-snap-type: x mandatory;
.one-column({
padding-left: calc(50vw - (250px / 2));
padding: 0 10%;
});
}
</style>

View File

@ -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}