From 68a2534d1bbb0194b410d67c1d19deef06d9820c Mon Sep 17 00:00:00 2001 From: hide_d Date: Tue, 7 Dec 2021 01:38:26 +0900 Subject: [PATCH] =?UTF-8?q?misc:=20auto500px=20=ED=95=84=EC=9A=94=EC=97=86?= =?UTF-8?q?=EC=9D=8C.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/index.php | 2 +- hwe/ts/main.ts | 5 +---- hwe/ts/util/auto500px.ts | 4 ++-- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/hwe/index.php b/hwe/index.php index c68d238f..b93aaa7b 100644 --- a/hwe/index.php +++ b/hwe/index.php @@ -115,7 +115,7 @@ if (!$otherTextInfo) { <?= $serverName ?>: 메인 - + diff --git a/hwe/ts/main.ts b/hwe/ts/main.ts index cea2ffbd..f1dbe419 100644 --- a/hwe/ts/main.ts +++ b/hwe/ts/main.ts @@ -12,7 +12,6 @@ exportWindow($, '$'); import '../scss/main.scss'; import { unwrap } from './util/unwrap'; -import { auto500px } from './util/auto500px'; import { htmlReady } from './util/htmlReady'; $(function ($) { @@ -124,6 +123,4 @@ $(function ($) { window.addEventListener('scroll', onScroll, true); window.addEventListener('orientationchange', onScroll, true); }); -})(); - -auto500px(); \ No newline at end of file +})(); \ No newline at end of file diff --git a/hwe/ts/util/auto500px.ts b/hwe/ts/util/auto500px.ts index aebc890d..2f69ba31 100644 --- a/hwe/ts/util/auto500px.ts +++ b/hwe/ts/util/auto500px.ts @@ -16,7 +16,7 @@ export function auto500px(targetHeight = 700): void { const htmlTag = unwrap(document.querySelector("head")); _viewPortMeta = document.createElement("meta"); _viewPortMeta.name = 'viewport'; - _viewPortMeta.content = 'width=500, initial-scale=1'; + _viewPortMeta.content = 'width=device-width, initial-scale=0.72, maximum-scale=5.0, minimum-scale=0.72'; htmlTag.appendChild(_viewPortMeta); viewportMeta = _viewPortMeta; } @@ -30,7 +30,7 @@ export function auto500px(targetHeight = 700): void { const selectorHeight = targetHeight; if (deviceWidth < 500) { - viewportMeta.content = 'width=500, initial-scale=1'; + viewportMeta.content = 'width=device-width, initial-scale=0.72, maximum-scale=5.0, minimum-scale=0.72'; return; }