Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed app/assets/images/labels/dresdenrb-icon.png
Binary file not shown.
Binary file added app/assets/images/labels/dresdenrb.ico
Binary file not shown.
Binary file modified app/assets/images/labels/dresdenrb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/labels/dresdenrb/header.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions app/assets/stylesheets/application.sass
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions app/assets/stylesheets/labels/dresdenrb.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#nav
.navbar-brand
padding-top: 0
padding-bottom: 0
img.label
max-height: 42px
8 changes: 8 additions & 0 deletions app/helpers/home_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
19 changes: 12 additions & 7 deletions app/views/application/_headline.slim
Original file line number Diff line number Diff line change
@@ -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
Loading