From 94b355883d04119ff716a12d6289d509962a28ef Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Tue, 9 Jun 2020 19:22:18 +0000 Subject: [PATCH] wait #3693 @2 --- js/420-features-details.js | 14 ++++++++++++++ less/420-features-details.less | 4 ++++ 2 files changed, 18 insertions(+) create mode 100644 js/420-features-details.js diff --git a/js/420-features-details.js b/js/420-features-details.js new file mode 100644 index 0000000..f5bb709 --- /dev/null +++ b/js/420-features-details.js @@ -0,0 +1,14 @@ +registerLoader(load_features_details, true); + +function load_features_details() { + $(window).on('fluidbookresize', resizeFeatureDetails); + resizeFeatureDetails(); +} + +function resizeFeatureDetails() { + $('article iframe').each(function () { + $(this).css('height', null); + var r = parseInt($(this).attr('width')) / parseInt($(this).attr('height')); + $(this).css('height', $(this).outerWidth() / r); + }); +} \ No newline at end of file diff --git a/less/420-features-details.less b/less/420-features-details.less index 42edb4c..8818516 100644 --- a/less/420-features-details.less +++ b/less/420-features-details.less @@ -29,6 +29,10 @@ height: auto; vertical-align: top; } + iframe{ + width: 50%; + vertical-align: top; + } @media @m1280 { &.ileft { -- 2.39.5