73 lines
2.3 KiB
Plaintext
73 lines
2.3 KiB
Plaintext
-@lang = @lang || LangSite.first
|
|
|
|
-css_style = ""
|
|
- if input.image_file
|
|
-if input.style== "Bandeaux de titre" or input.style== "combat du mois"
|
|
-img_url = input.image_file.file.large.url
|
|
-else
|
|
-img_url = input.image_file.file.large.medium.small.url
|
|
|
|
-css_style += "background-image:url('#{img_url}');background-size:100%;background-size:cover;background-position:center center;"
|
|
-if input.style== "combat du mois"
|
|
.link_panel
|
|
.img{:style => css_style}
|
|
.desc
|
|
%h2
|
|
=input.title
|
|
=simple_format input.description
|
|
|
|
.cta=link_to qit("En savoir plus >"), input.url, :class => "btn", :target => ("_blank" if input.popup) if input.url
|
|
|
|
.clear
|
|
-else
|
|
|
|
-if input.image_file and input.image_file.photograph
|
|
-@page_images_credits << input.image_file.photograph
|
|
|
|
-if input.cible
|
|
-url = input.cible.cible_url(@lang)
|
|
|
|
- elsif input.cible
|
|
-url = input.cible.cible_url(@lang)
|
|
-if !img_url and input.cible.class.to_s == "MenuItem" and input.cible.image_file
|
|
|
|
|
|
|
|
-if input.style== "Bandeaux de titre"
|
|
-img_url = input.cible.image_file.file.large.medium.url
|
|
-else
|
|
-img_url = input.cible.image_file.file.large.medium.small.url
|
|
|
|
-if input.cible.image_file and input.cible.image_file.photograph
|
|
-@page_images_credits << input.cible.image_file.photograph
|
|
|
|
|
|
|
|
-else
|
|
-url = ""
|
|
|
|
-if input.style != "combat du mois"
|
|
-css_style += "background-image:url('#{img_url}');background-size:100%;background-size:cover;background-position:center center;"
|
|
|
|
|
|
=link_to url.to_s , :target => ("_blank" if input.popup).to_s, :style => css_style, :data => {:ratio => input.ratio}, :class => "menu_itemlink_content"+(" menu_item_top" if input.style== "Bandeaux de titre").to_s do
|
|
|
|
|
|
|
|
.overlay
|
|
|
|
-if input.style== "Bandeaux de titre"
|
|
.gradient
|
|
%h1
|
|
-if input.title?
|
|
=input.title.to_s
|
|
-elsif input.cible and input.cible.class.to_s == "MenuItem" and input.cible.image_file
|
|
=input.cible.menu_item_langs.find_by_lang_site_id(@lang.id).name
|
|
|
|
-else
|
|
%h4.title
|
|
-if input.title?
|
|
=input.title.to_s
|
|
-elsif input.cible and input.cible.class.to_s == "MenuItem" and input.cible.image_file
|
|
=input.cible.menu_item_langs.find_by_lang_site_id(@lang.id).name
|
|
|