From: Vincent Vanwaelscappel Date: Mon, 8 Aug 2022 15:41:40 +0000 (+0200) Subject: wait #5376 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=9f227b618798805e24af8bf6d68116b0b68c0195;p=fluidbook-toolbox.git wait #5376 @1 --- diff --git a/resources/quiz/js/app.js b/resources/quiz/js/app.js index 8989ee4a4..ba3c72840 100644 --- a/resources/quiz/js/app.js +++ b/resources/quiz/js/app.js @@ -43,7 +43,20 @@ require('../../scorm/scorm'); } $("main").css('minHeight', Math.max(maxHeight + 100, $(window).outerHeight() - $('header').outerHeight() - 70)); - $("header .headerholder .titleHolder h1").css('width', '100%'); + // Header + var ww = $(window).outerWidth(); + var h1 = $("header .headerholder .titleHolder h1"); + h1.css('width', '100%'); + h1.css('font-size', ''); + if (ww > 640) { + var fz = 32; + var h1h = h1.outerHeight() - 40; + while (h1h > 32) { + fz--; + h1.css('font-size', fz); + h1h = h1.outerHeight() - 40; + } + } // Badge position try { diff --git a/resources/quiz/style/020-header.sass b/resources/quiz/style/020-header.sass index ca61cebc8..f1d0ef57f 100644 --- a/resources/quiz/style/020-header.sass +++ b/resources/quiz/style/020-header.sass @@ -34,12 +34,13 @@ header font-size: 32px line-height: 1em width: 100% - padding: 20px 40px + padding: 20px 180px 20px 40px @media (max-width: 640px) text-align: center font-size: 22px bottom: 25px + padding: 20px 40px 20px 40px @media (max-width: 320px)