chore: 换用更美观、现代的前端页面 (#348)
This commit is contained in:
9
web/src/lib/hooks/is-mobile.svelte.ts
Normal file
9
web/src/lib/hooks/is-mobile.svelte.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { MediaQuery } from 'svelte/reactivity';
|
||||
|
||||
const MOBILE_BREAKPOINT = 768;
|
||||
|
||||
export class IsMobile extends MediaQuery {
|
||||
constructor() {
|
||||
super(`max-width: ${MOBILE_BREAKPOINT - 1}px`);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user