From 1a0abbb6439690fb9167dce5ecb800dc5c41e130 Mon Sep 17 00:00:00 2001 From: SayaAndy Date: Mon, 18 Aug 2025 17:21:32 +0700 Subject: fix: set thumb width to 10vmin to fix thumb align and shift --- views/layouts/general-page.html | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'views') diff --git a/views/layouts/general-page.html b/views/layouts/general-page.html index 5918956..cd19bd0 100644 --- a/views/layouts/general-page.html +++ b/views/layouts/general-page.html @@ -98,6 +98,17 @@ } }); + function calculateVmin(percent) { + const viewportWidth = window.innerWidth; + const viewportHeight = window.innerHeight; + + const smallerDimension = Math.min(viewportWidth, viewportHeight); + + const vminValue = (smallerDimension / 100) * percent; + + return vminValue; + } + function calculateVmax(percent) { const viewportWidth = window.innerWidth; const viewportHeight = window.innerHeight; -- cgit v1.3.1+13