<div class="alert <%= colour == 'bg-negative' ? 'text-white' : 'text-dark' %> <%= colour %>" role="alert">
  <div class="d-flex">
    <div class="p-2 align-self-center">
      <%= fa_icon(icon + '') %>
    </div>
    <div class="p-2 align-self-center">
      <h5><%= content %></h5>
    </div>
    <% if buttons %>
      <% buttons.each do |title, path| %>
        <div class="ml-auto p-2">
          <%= link_to title, path, class: 'btn btn-light btn rounded-pill font-weight-bold', role: 'button' %>
        </div>
      <% end %>
    <% end %>
  </div>
</div>

<div class="row alert <%= colour == 'bg-negative' ? 'text-white' : 'text-dark' %> <%= colour %>" role="alert">
  <div class="col-1">
    <%= fa_icon(icon) %>
  </div>

  <% if buttons %>
    <div class='<%= "col-lg-#{11 - buttons.size * 2}" %>'>
      <h5><%= content %></h5>
    </div>
    <% buttons.each do |title, path| %>
      <div class="col-lg-2">
        <%= link_to title, path, class: "btn btn-light btn rounded-pill font-weight-bold" %>
      </div>
    <% end %>
  <% else %>
    <div class="col-11">
      <h5><%= content %></h5>
    </div>
  <% end %>
</div>

Update to sort out buttons a bit better
Update to sort out buttons a bit better
