diff --git a/app/assets/images/labels/dresdenrb-icon.png b/app/assets/images/labels/dresdenrb-icon.png deleted file mode 100644 index bf8e8995..00000000 Binary files a/app/assets/images/labels/dresdenrb-icon.png and /dev/null differ diff --git a/app/assets/images/labels/dresdenrb.ico b/app/assets/images/labels/dresdenrb.ico new file mode 100644 index 00000000..6a75cda2 Binary files /dev/null and b/app/assets/images/labels/dresdenrb.ico differ diff --git a/app/assets/images/labels/dresdenrb.png b/app/assets/images/labels/dresdenrb.png index 3c7a244d..02c3012b 100644 Binary files a/app/assets/images/labels/dresdenrb.png and b/app/assets/images/labels/dresdenrb.png differ diff --git a/app/assets/images/labels/dresdenrb/header.png b/app/assets/images/labels/dresdenrb/header.png new file mode 100644 index 00000000..d06ff2b8 Binary files /dev/null and b/app/assets/images/labels/dresdenrb/header.png differ diff --git a/app/assets/stylesheets/application.sass b/app/assets/stylesheets/application.sass index 9bbe70ba..9546f019 100644 --- a/app/assets/stylesheets/application.sass +++ b/app/assets/stylesheets/application.sass @@ -121,6 +121,9 @@ header margin-left: 0 width: 100px + #header_image + max-height: 250px + #title, &:hover, &:active, &:visited color: $title-color text-decoration: none diff --git a/app/assets/stylesheets/labels/dresdenrb.sass b/app/assets/stylesheets/labels/dresdenrb.sass index e69de29b..57fb3de0 100644 --- a/app/assets/stylesheets/labels/dresdenrb.sass +++ b/app/assets/stylesheets/labels/dresdenrb.sass @@ -0,0 +1,6 @@ +#nav + .navbar-brand + padding-top: 0 + padding-bottom: 0 + img.label + max-height: 42px diff --git a/app/helpers/home_helper.rb b/app/helpers/home_helper.rb index 9be67e93..dff25400 100644 --- a/app/helpers/home_helper.rb +++ b/app/helpers/home_helper.rb @@ -16,4 +16,12 @@ def contact_text concat '.' end end + + def header_image_path + File.join('labels', Whitelabel[:label_id], 'header.png') + end + + def header_image_available? + Rails.root.join('app', 'assets', 'images', header_image_path).exist? + end end diff --git a/app/views/application/_headline.slim b/app/views/application/_headline.slim index b6eb506e..70150582 100644 --- a/app/views/application/_headline.slim +++ b/app/views/application/_headline.slim @@ -1,10 +1,15 @@ header.d-none.d-xl-block .row - .col-lg-2.text-center - = link_to(root_path, title: title) do - =image_tag("labels/#{Whitelabel[:label_id]}.png", title: title, id: :logo) + - if header_image_available? + .col-lg-12 + = link_to(root_path, title: title) do + = image_tag(header_image_path, title: title, id: :header_image) + - else + .col-lg-2.text-center + = link_to(root_path, title: title) do + =image_tag("labels/#{Whitelabel[:label_id]}.png", title: title, id: :logo) - .col-lg-10 - = link_to(root_path, id: :title, title: title) do - h1= title - h2.mt-4= subtitle + .col-lg-10 + = link_to(root_path, id: :title, title: title) do + h1= title + h2.mt-4= subtitle