Og info appears only if oembed isn't available

This commit is contained in:
Fábián Tamás László 2013-06-14 07:38:24 +02:00 committed by Jonne Haß
parent 22c644c2ae
commit 1a3ead3619
2 changed files with 21 additions and 18 deletions

View file

@ -6,15 +6,16 @@
{{#if o_embed_cache.data}} {{#if o_embed_cache.data}}
{{{o_embed_cache.data.html}}} {{{o_embed_cache.data.html}}}
{{/if}} {{/if}}
{{/if}} {{else}}
{{#if open_graph_cache}} {{#if open_graph_cache}}
<div class="opengraph"> <div class="opengraph">
<a href="{{open_graph_cache.url}}" target="_blank"> <a href="{{open_graph_cache.url}}" target="_blank">
<h2>{{{open_graph_cache.title}}}</h2> <h2>{{{open_graph_cache.title}}}</h2>
<img src="{{open_graph_cache.image}}"/> <img src="{{open_graph_cache.image}}"/>
<p>{{open_graph_cache.description}}</p> <p>{{open_graph_cache.description}}</p>
</a> </a>
</div> </div>
{{/if}}
{{/if}} {{/if}}
<header>{{{headline}}}</header> <header>{{{headline}}}</header>

View file

@ -1,9 +1,11 @@
{{#if open_graph_cache}} {{#unless o_embed_cache}}
<a href="{{open_graph_cache.url}}" target="_blank"> {{#if open_graph_cache}}
<div> <a href="{{open_graph_cache.url}}" target="_blank">
<img src="{{open_graph_cache.image}}" /> <div>
<strong>{{open_graph_cache.title}}</strong> <img src="{{open_graph_cache.image}}" />
<p>{{open_graph_cache.description}}</p> <strong>{{open_graph_cache.title}}</strong>
</div> <p>{{open_graph_cache.description}}</p>
</a> </div>
{{/if}} </a>
{{/if}}
{{/unless}}