BikeBikeBike/app/views/application/_header.html.haml

21 lines
846 B
Plaintext
Raw Normal View History

2015-08-21 19:29:43 -07:00
- content_for :banner do
- image = image_path(image_file || 'empty-racks.jpg')
2015-08-21 19:29:43 -07:00
- style = nil
- cover = nil
- figure = nil
2015-09-01 20:50:45 -07:00
- if capable_of(:css_mixblendmode)
2015-08-21 19:29:43 -07:00
- cover = "<div class=\"cover\" style=\"background-image: url(#{image})\"></div>"
- else
- style = "background-image: url(#{image})"
#header-title.short{style: style}
2016-05-30 18:24:07 -07:00
= (render banner_image, {:image => image}) if defined?(banner_image) == "local-variable"
2015-08-21 19:29:43 -07:00
= cover.html_safe if cover
2016-05-30 18:24:07 -07:00
- if @page_title.present? || defined?(page_group)
- content_for :title do
=@page_title.present? ? I18n.t(@page_title, @page_title_vars) : I18n.t("page_titles.#{page_group.to_s}.#{page_key.to_s}")
= row do
= columns do
%h1=_(@main_title || "page_titles.#{page_group.to_s}.#{page_key.to_s}", :t, @main_title_vars)
- content_for :og_image do
= image