From e9bb3b7df45a71161cb5456ff2cc82b3a9f8f887 Mon Sep 17 00:00:00 2001 From: Joshua Seigler Date: Tue, 30 Nov 2021 10:47:25 -0500 Subject: [PATCH] fix: document sizing for mobile --- index.html | 5 +++-- src/index.js | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index b443b26..b46560d 100644 --- a/index.html +++ b/index.html @@ -47,8 +47,9 @@ height: 100%; } #help { - max-width: 80ch; - padding: 5em; + width: 80ch; + max-width: 100%; + padding: 1em; } pre { background-color: #ffffff1f; diff --git a/src/index.js b/src/index.js index 0d3a29a..bf41426 100644 --- a/src/index.js +++ b/src/index.js @@ -5,8 +5,6 @@ import Hls from 'hls.js' import HlsjsIpfsLoader from 'hlsjs-ipfs-loader' document.addEventListener('DOMContentLoaded', async () => { - setBodyHeight() - window.addEventListener('resize', setBodyHeight) const hash = getUrlParameter('hash') const source = getUrlParameter('source') const title = getUrlParameter('title') @@ -17,6 +15,8 @@ document.addEventListener('DOMContentLoaded', async () => { } if (hash) { document.getElementById('help').style.display = 'none' + setBodyHeight() + window.addEventListener('resize', setBodyHeight) const video = document.getElementById('video') video.style.display = 'block' const repoPath = 'ipfs-' + Math.random()