Skip to content

Instantly share code, notes, and snippets.

@bigflannel
Created May 10, 2014 17:33
Show Gist options
  • Save bigflannel/08b89b943ab9a9a5e23a to your computer and use it in GitHub Desktop.
Save bigflannel/08b89b943ab9a9a5e23a to your computer and use it in GitHub Desktop.
Koken Lens if tag and image aspect ratio
<!-- Display the essay's featured image -->
<koken:featured_image>
<!-- Link image to essay -->
<koken:link title="Read {{ essay.title }}">
<!-- Display featured image -->
<koken:if condition="content.width >= content.height" value="true">
<koken:img class="horizontal-image" />
<koken:else>
<koken:img class="vertical-image" />
</koken:if>
</koken:link>
</koken:featured_image>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment