Closed rgaiacs closed 9 years ago
I think this approach requires more care and attention from lead instructors (and others editing bootcamp home pages) than we can reasonably expect... :-(
I think this approach requires more care and attention from lead instructors (and others editing bootcamp home pages) than we can reasonably expect... :-(
Agree but AFAIK we can't use Javascript. Could we get this merge and open another issue for setting the height automatically?
Is there a reason that we can't use Javascript? That seems like the easiest way to get the type of dynamic height you are looking for.
@r-gaia-cs ?
Is there a reason that we can't use Javascript? That seems like the easiest way to get the type of dynamic height you are looking for.
You can use Javascript to dynamic change the height of the iframe but you first need to know the value of the height. Unfortunately you can't use Javascript to get the height of the elements inside the iframe to set the properly value for the iframe due same origin policy:
Cross-origin script API access
JavaScript APIs such as iframe.contentWindow, window.parent, window.open and window.opener allow documents to directly reference each other. When the two documents do not have the same origin, these references provide limited access to the Window and Location objects.
I couldn't use Javascript and when asked all the Javascript expert that I know they all said that what I want isn't possible due this same origin policy.
Oh, yeah that's not possible AFAIK. Is there a way to know what type of page you will be getting from the URL target of the iframe? If we can figure out what we are going to get ahead of time, then we can preemptively set the height based on a data structure mapping targets to heights.
Oh, yeah that's not possible AFAIK. Is there a way to know what type of page you will be getting from the URL target of the iframe? If we can figure out what we are going to get ahead of time, then we can preemptively set the height based on a data structure mapping targets to heights.
The only information from the URL is Eventbrite ID. So there is no way to know that in advance.
One option was what I suggested previous: let the user set the height. Another
option is add another metadata at YAML header saying the number of rooms, add
some conditions at the page to be handle by Jekyll and maybe this part to
_includes
to keep index.html
small to novices.
and values for when using two rooms.