PublicRadioInternational / embed-containers

Development for embed containers within PRI's Platform
GNU General Public License v2.0
0 stars 0 forks source link

Embed: Related Link styling has been improved and implemented in containers #362

Closed brandonhundt closed 7 years ago

brandonhundt commented 7 years ago

I've improved the related link styling on the frontend. If you are able to replace the token that'd be great. This is real basic stuff here.

Frontend-example: https://www.pri.dev/story?id=a67c77270eeb4eba84a95cb165ad1b6d

TWIG:

<div class="entity-embed-container entity-embed-related-link">
<p><strong>{% if embed.displayTitle %}{{ embed.displayTitle }}: {% else %}Related: {% endif %}
{% for link in embed.links %}<a href="{{ link.url_path }}">{{ link.title }}</a>{% endfor %}</strong></p>
</div>

CSS:

.entity-embed-related-link {
  a {display: block; margin-bottom: 5px; font-size: .875em; line-height: 1.3em;}
  a:only-child {display: inline-block; margin-bottom: 0; line-height: 1.6em;
    font-size: 1em;}
}
brandonhundt commented 7 years ago

@rpeterman-gp Looks good in testing. I'll let you close if you are comfortable with it.

rpeterman-gp commented 7 years ago

Relates to Issue #346