From 3bd5f01e53f3729a229ba354c5ce705ab2370e2d Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 20 Jul 2017 09:55:18 +0200 Subject: [PATCH] Fix slide ratio in preview mode --- www/slide/slide.less | 49 +++++++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 21 deletions(-) diff --git a/www/slide/slide.less b/www/slide/slide.less index 3fcf134b8..069bc15fd 100644 --- a/www/slide/slide.less +++ b/www/slide/slide.less @@ -98,30 +98,37 @@ body { } } } -.preview .cp { - flex: 1; - overflow: hidden; - div#modal:not(.shown) { - position: relative; - top: auto; - left: auto; - width: auto; - display: block; - height: 100%; - #content { - .slide-container { - width: 100%; +.preview { + .cp { + width: 50vw; + overflow: hidden; + div#modal:not(.shown) { + position: relative; + top: auto; + left: auto; + width: auto; + display: block; + height: 100%; + #content { + .slide-container { + width: 100%; + } + .slide-frame { + width: 50vw; + height: 28.125vw; // height:width ratio = 9/16 = .5625 + max-height: ~"calc(100vh - 96px)"; + max-width: ~"calc(16 / 9 * (100vh - 96px))"; + //max-height: 100vh; + //max-width: 177.78vh; // 16/9 = 1.778 + } } - .slide-frame { - width: 50vw; - height: 28.125vw; // height:width ratio = 9/16 = .5625 - max-height: 100vh; - max-width: 177.78vh; // 16/9 = 1.778 + #button_exit { + visibility: hidden; } } - #button_exit { - visibility: hidden; - } + } + .CodeMirror { + flex: 1; } } .cp {