diff --git a/capacitor/package.json b/capacitor/package.json index e526cf4..6b5c828 100644 --- a/capacitor/package.json +++ b/capacitor/package.json @@ -1,6 +1,6 @@ { "name": "capacitor", - "version": "1.0.3", + "version": "1.0.4", "private": true, "scripts": { "build:native": "cd public/nodejs/ && npm install && docker build -t android-build:latest . && docker run -v ${PWD}:/app/ -it android-build:latest /bin/bash /app/setup-deps.sh", diff --git a/common/Router.svelte b/common/Router.svelte index a482bf4..4e4e557 100644 --- a/common/Router.svelte +++ b/common/Router.svelte @@ -6,12 +6,21 @@ import Miniplayer from 'svelte-miniplayer' import Search from './views/Search.svelte' import AiringSchedule from './views/AiringSchedule.svelte' + import { readable } from 'simple-store-svelte' export let page = 'home' + + const mql = matchMedia('(min-width: 769px)') + const isMobile = readable(!mql.matches, set => { + mql.addEventListener('change', ({ matches }) => set(!matches)) + }) + + $: minwidth = $isMobile ? '200px' : '35rem' + $: maxwidth = $isMobile ? '200px' : '60rem'