<%
  back_to = if article.parent then article.parent else article.profile end
%>

<% button_bar do %>
  <%= button :back, 'Voltar a %{parent}' % {parent: back_to.name}, back_to.url %>
<% end %>

<iframe id="diagramo" src="<%= article.diagramo_uri %>" width="100%" height="500px"></iframe>

<style>
  .box-2, .box-3 {
    display: none;
  }
  .box-1 {
    margin: 0;
  }
</style>


<% button_bar do %>
  <%= button :back, 'Voltar a %{parent}' % {parent: back_to.name}, back_to.url %>
<% end %>

<iframe id="diagramo" src="<%= article.diagramo_uri %>" width="100%" height="500px"></iframe>

<% if !@page.parent || @page.parent.path.blank? %>
  <style>
    .box-2, .box-3 {
      display: none;
    }
    .box-1 {
      margin: 0;
    }
  </style>
<% end %>

Remove styling when diagram is in blog listing
Remove styling when diagram is in blog listing