Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Fix medium embed card sizing issue. #2

Merged
merged 1 commit into from Mar 19, 2014

Conversation

Projects
None yet
2 participants
Collaborator

plusjade commented Mar 19, 2014

Cards need explicit height because isotope cannot discern true iframe content height as iframe loads after isotope tries to calculate.

Additionally only load medium embed.js once.

@plusjade plusjade Fix medium embed card sizing issue.
Cards need explicit height because isotope cannot discern true iframe content height as iframe loads after isotope tries to calculate.

Additionally only load medium embed.js once.
413197f

@plusjade plusjade commented on the diff Mar 19, 2014

index.html
@@ -906,6 +906,14 @@ <h5 class="heading">
<!-- Script for the super awesome grid (Thanks, David DeSandro) -->
<script src="js/jquery.isotope_custom.js"></script>
+<!-- Medium embed
+ Force medium cards to be an explicit height.
+ Note this should be the height of the tallest card you have.
+ It won't auto scale =/
+ Alternatively you can set explicit heights per card where .process is defined.
+-->
+<style> .widget.process { height:500px } </style>
@plusjade

plusjade Mar 19, 2014

Collaborator

500px is convenient catch all for all process cards. However isotope will position them relative to this height so they won't fit snugly together if some are shorter/taller than 500px.

In order for isotope to correctly position many process cards, each process card should ideally explicitly define their true height. If you want to do that then you need to remove this line and add heights to every process DOM node:

<div class="widget process" style="height:250px">...</div>

You can get the exact height by letting the medium embed load, then inspecting the process DOM node with chrome inspector.

@francinelee francinelee added a commit that referenced this pull request Mar 19, 2014

@francinelee francinelee Merge pull request #2 from francinelee/medium-fix
Fix medium embed card sizing issue.
224081b

@francinelee francinelee merged commit 224081b into master Mar 19, 2014

Owner

francinelee commented Mar 19, 2014

^_^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment