mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-06-26 15:44:23 +00:00
feat: add initial Nuxt frontend with SSR
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import { ref, computed } from 'vue'
|
||||
|
||||
const width = ref(0)
|
||||
|
||||
if (process.client) {
|
||||
width.value = window.innerWidth
|
||||
window.addEventListener('resize', () => {
|
||||
width.value = window.innerWidth
|
||||
})
|
||||
}
|
||||
|
||||
export const isMobile = computed(() => width.value <= 768)
|
||||
Reference in New Issue
Block a user