Skip to content
This repository has been archived by the owner on Sep 20, 2019. It is now read-only.

Commit

Permalink
Include footer image and style accordingly (#187)
Browse files Browse the repository at this point in the history
  • Loading branch information
rushenn authored and deekoder committed Aug 30, 2016
1 parent 4c42a75 commit 62b112a
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/assets/javascripts/hub.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ $(document).on 'page:change', ->
return

# Open
$body.on 'click', '*:not("a") > img:not(".img-preview__img")', ->
$body.on 'click', '*:not("a") > img:not(".img-preview__img"):not(".footer__img")', ->
$imgSrc = $(this).attr('src')
$imgWrap = '<div class="img-preview">' +
'<div class="img-preview__close img-preview__close--back"></div>' +
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/includes/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ a {
}

*:not(a) {
& > img {
& > img:not([class]) {
border-radius: 2px;
max-width: 800px;
width: 100%;
Expand Down
13 changes: 13 additions & 0 deletions app/assets/stylesheets/includes/footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,16 @@
color: darken($footer-color, 10%);
}
}

.footer__img {
display: inline-block;
max-width: 100px;
max-height: 50px;
vertical-align: text-bottom;
margin-left: 10px;

@media (max-width: $screen-xs-max) {
display: block;
margin: 10px auto 0;
}
}
2 changes: 1 addition & 1 deletion app/assets/stylesheets/includes/lightbox.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
*:not(a) {
img {
img:not([class]) {
&:not(.img-preview__img) {
@include transition(box-shadow, 300ms);
cursor: pointer;
Expand Down
9 changes: 6 additions & 3 deletions app/views/layouts/_footer.html.erb
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
<footer id="footer">
<% if @mybrand %>
<%= @mybrand.footer_text %>
<%= @mybrand.footer_text %>

<% if !@mybrand.footer_img.blank? %>
<img class="footer__img" src="<%= @mybrand.footer_img %>" alt="">
<% end %>

<% else %>
Doctor is licensed under Apache 2.0 License.
Doctor is licensed under Apache 2.0 License.
<% end %>

</footer>

0 comments on commit 62b112a

Please sign in to comment.