module ApplicationHelper
  def nav_item(text, image, url, options = {})
    content_tag(:li, class: (current_page?(url) ? 'active' : '' )) do
      icon = image ? "<img src='#{image}' type='image/svg+xml'>" : ''
      link_to raw("#{icon}<h4>#{text}</h4>"), url, options
    end
  end

  def like_action_class(user, item)
    classes = ['button', 'like-action']
    classes << 'voted' if user.liked?(item)
    classes.join(' ')
  end
end

module ApplicationHelper
  def nav_item(text, image, url, options = {})
    content_tag(:li, class: (current_page?(url) ? 'active' : '' )) do
      icon = image ? "<img src='#{image}' type='image/svg+xml' width='24' height='24'>" : ''
      link_to raw("#{icon}<h4>#{text}</h4>"), url, options
    end
  end

  def like_action_class(user, item)
    classes = ['button', 'like-action']
    classes << 'voted' if user.liked?(item)
    classes.join(' ')
  end
end

Declare dimensions for header images
Declare dimensions for header images

This way, the text doesn't jump around since the text loads before the
svg as the space is reserved for the image.
