Improve rendering of iframes in the dashboard

This commit is contained in:
Eric Lippmann 2018-01-16 16:38:32 +01:00
parent 8599696d6d
commit 4182a5af75
2 changed files with 23 additions and 1 deletions

View File

@ -1,4 +1,8 @@
<?php if (! $compact): ?>
<div class="controls">
<?= $tabs ?>
</div>
<iframe src="<?= $this->escape($url) ?>" style="height:99%; width:99%;" frameborder="no"></iframe>
<?php endif ?>
<div class="iframe-container">
<iframe src="<?= $this->escape($url) ?>" frameborder="no"></iframe>
</div>

View File

@ -215,3 +215,21 @@ a:hover > .icon-cancel {
height: 100%;
vertical-align: middle;
}
// Responsive iFrames
.iframe-container {
position: relative;
height: 0;
overflow: hidden;
padding-bottom: 75%;
width: 100%;
& > iframe {
position: absolute;
left: 0;
top: 0;
height: 100%;
width: 100%;
}
}