added responsive styles to pankuzulist and slide component. Added subdivision to tablet viewport type.

This commit is contained in:
2024-11-03 00:03:43 +09:00
parent 8247b05192
commit d4ec57aa0d
18 changed files with 1249 additions and 975 deletions

View File

@@ -3,7 +3,8 @@
* @module composables/windowDimensions
*/
const tabletMaxWidth = 1024;
const largeTabletMaxWidth = 1024;
const mediumTabletMaxWidth = 960;
const mobileMaxWidth = 640;
/**
@@ -13,7 +14,8 @@ const mobileMaxWidth = 640;
*/
const enum ViewPortType {
DESKTOP,
TABLET,
LARGE_TABLET,
MEDIUM_TABLET,
MOBILE,
}
@@ -29,12 +31,14 @@ function useWindowDimensions() {
function update(event: Event | undefined) {
width.value = window.innerWidth;
height.value = window.innerHeight;
if (width.value >= tabletMaxWidth) {
if (width.value > largeTabletMaxWidth) {
viewPortType.value = ViewPortType.DESKTOP;
} else if (width.value < mobileMaxWidth) {
viewPortType.value = ViewPortType.MOBILE;
} else if (width.value > mediumTabletMaxWidth) {
viewPortType.value = ViewPortType.LARGE_TABLET;
} else if (width.value > mobileMaxWidth) {
viewPortType.value = ViewPortType.MEDIUM_TABLET;
} else {
viewPortType.value = ViewPortType.TABLET;
viewPortType.value = ViewPortType.MOBILE;
}
}