Skip to content

Commit

Permalink
Sticky footers on small screens
Browse files Browse the repository at this point in the history
  • Loading branch information
abkruse committed Dec 26, 2016
1 parent 781b26b commit 74b9629
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 14 deletions.
13 changes: 11 additions & 2 deletions members/static/css/members.css
Original file line number Diff line number Diff line change
Expand Up @@ -1996,9 +1996,14 @@ footer.sticky-footer {
margin-left: 2%;
}

.org-img, .org-photo{
.org-img, .org-photo {
min-width: 125px;
margin-left: 5%;
}

div.org-list {
padding-left: 15%;
}
}

@media only screen and (max-width: 750px) {
Expand All @@ -2018,14 +2023,18 @@ footer.sticky-footer {
#fb, #tw, #ye, #inst {
display: none;
}

.org-list {
padding-left: 10%;
}
}

@media only screen and (max-width: 700px) {
.org-photo #star-img {
margin-left: 0;
}

.org-list {
div.org-list {
padding-left: 5%;
}

Expand Down
24 changes: 13 additions & 11 deletions members/templates/members/org_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,19 @@ <h3 class='oswald' style='text-align:center;'>Organizations at {{ site.name }}</
</form>
</div>
{% if search_terms %}
{% if search_results %}
<div style="width:100%; text-align:center;" class='org-group'>
{% for org in search_results %}
{% include 'members/org_card_frag.html' %}
{% endfor %}
</div>
{% else %}
<div class='row'>
<h3 class='org-error' style="text-align:center; font-family:'Oswald', sans-serif; margin-top:10%;">No organization matches that query</h3>
</div>
{% endif %}
<div class='org-list'>
{% if search_results %}
<div style="width:100%; text-align:center;" class='org-group'>
{% for org in search_results %}
{% include 'members/org_card_frag.html' %}
{% endfor %}
</div>
{% else %}
<div class='row'>
<h3 class='org-error' style="text-align:center; font-family:'Oswald', sans-serif; margin-top:10%;">No organization matches that query</h3>
</div>
{% endif %}
</div>
{% else %}
<div class='org-list'>
{% for org in organizations %}
Expand Down
2 changes: 1 addition & 1 deletion members/templates/members/org_view.html
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ <h5 class='oswald' style='color:black;'>Notes</h5>
var img = $('#mem-photo');
get_orientation(img);

if($(document).width() < 990) {
if($('.main').width() < 990) {
$('footer').attr('class', 'sticky-footer');
} else {
if($('footer').hasClass('sticky-footer')) {
Expand Down
8 changes: 8 additions & 0 deletions members/templates/members/view_members.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,14 @@ <h3>No members matching that query</h3>
}
}
})

if($('#tabs-3').height() < 699) {
$('footer').attr('class', 'sticky-footer');
} else {
if($('footer').hasClass('sticky-footer')) {
$('footer').attr('page-footer main-footer');
}
}
});
</script>
{% endblock %}

0 comments on commit 74b9629

Please sign in to comment.