diff --git a/app/assets/stylesheets/shared/banner.scss b/app/assets/stylesheets/shared/banner.scss index fc25fcc62..553f39399 100644 --- a/app/assets/stylesheets/shared/banner.scss +++ b/app/assets/stylesheets/shared/banner.scss @@ -1,5 +1,7 @@ .banner { @include full-width-background; + @include card; + padding: 0 rem-calc(16); .debates-list &::before, .proposals-list &::before, @@ -7,18 +9,21 @@ content: none; } + &:hover { + text-decoration: underline; + } + a { - display: block; - - > * { - padding: 0 rem-calc(16); - - &:empty { - display: none; - } + &, + &:hover { + color: inherit; } } + > :empty { + display: none; + } + + .budget-header, + .budgets-index > .budget-header, + .jumbo { diff --git a/app/components/shared/banner_component.html.erb b/app/components/shared/banner_component.html.erb index cbea18d0e..6fb3236cd 100644 --- a/app/components/shared/banner_component.html.erb +++ b/app/components/shared/banner_component.html.erb @@ -1,3 +1,3 @@ diff --git a/app/components/shared/banner_component.rb b/app/components/shared/banner_component.rb index 21aba7c65..bffbe1a7b 100644 --- a/app/components/shared/banner_component.rb +++ b/app/components/shared/banner_component.rb @@ -19,10 +19,8 @@ class Shared::BannerComponent < ApplicationComponent private - def link - link_to banner.target_url do - tag.h2(banner.title, style: "color:#{banner.font_color}") + - tag.h3(banner.description, style: "color:#{banner.font_color}") - end + def banner_content + tag.h2(link_to(banner.title, banner.target_url), style: "color:#{banner.font_color}") + + tag.h3(banner.description, style: "color:#{banner.font_color}") end end diff --git a/spec/system/admin/banners_spec.rb b/spec/system/admin/banners_spec.rb index c2bbab091..29a6eeb7d 100644 --- a/spec/system/admin/banners_spec.rb +++ b/spec/system/admin/banners_spec.rb @@ -86,7 +86,7 @@ describe "Admin banners magement", :admin do visit proposals_path expect(page).to have_content "Such banner" - expect(page).to have_link "Such banner many text wow link", href: "https://www.url.com" + expect(page).to have_link "Such banner", href: "https://www.url.com" end scenario "Publish a banner with a translation different than the current locale" do