Fix book layout for mobile

foundation/home
jonahmania 2018-05-01 23:43:05 -04:00
parent 9075d69cbd
commit 076721ac79
2 changed files with 100 additions and 50 deletions

View File

@ -97,74 +97,92 @@ function put_un_in_cookie2(){
<div class="spacer"></div> <div class="spacer"></div>
<h3 class="featured_books">Your Recent Faves</h3> <h3 class="featured_books">Your Recent Faves</h3>
<div> <div>
{% for work in faves %} <div>
{% with work.googlebooks_id as googlebooks_id %} {% for work in faves %}
{% include "book_panel.html" %} {% with work.googlebooks_id as googlebooks_id %}
{% endwith %} {% include "book_panel.html" %}
{% endfor %} {% endwith %}
<a class="more_featured_books" href="{% url 'supporter' request.user %}"><i class="fa fa-arrow-circle-o-right fa-3x"></i></a> {% endfor %}
<a class="more_featured_books" href="{% url 'supporter' request.user %}"><i class="fa fa-arrow-circle-o-right fa-3x"></i></a>
</div>
<a class="more_featured_books_mobile button success" href="{% url 'supporter' request.user %}">See More</a>
</div> </div>
{% endif %} {% endif %}
{% if top_pledge %} {% if top_pledge %}
<div class="spacer"></div> <div class="spacer"></div>
<h3 class="featured_books">Pledge to Make These eBooks Free</h3> <h3 class="featured_books">Pledge to Make These eBooks Free</h3>
<div> <div class="book-list">
{% for campaign in top_pledge %} <div>
{% with campaign.work as work %} {% for campaign in top_pledge %}
{% with work.googlebooks_id as googlebooks_id %} {% with campaign.work as work %}
{% include "book_panel.html" %} {% with work.googlebooks_id as googlebooks_id %}
{% endwith %}{% endwith %} {% include "book_panel.html" %}
{% endfor %} {% endwith %}{% endwith %}
<a class="more_featured_books" href="{% url 'campaign_list' 'pledge' %}"><i class="fa fa-arrow-circle-o-right fa-3x"></i></a> {% endfor %}
<a class="more_featured_books" href="{% url 'campaign_list' 'pledge' %}"><i class="fa fa-arrow-circle-o-right fa-3x"></i></a>
</div>
</div> </div>
<a class="more_featured_books_mobile button success" href="{% url 'campaign_list' 'pledge' %}">See More</a>
{% endif %} {% endif %}
<div class="spacer"></div> <div class="spacer"></div>
<h3 class="featured_books">Read These Free Licensed eBooks</h3> <h3 class="featured_books">Read These Free Licensed eBooks</h3>
<div> <div class="book-list">
{% for work in cc_books %} <div>
{% with work.googlebooks_id as googlebooks_id %} {% for work in cc_books %}
{% include "book_panel.html" %} {% with work.googlebooks_id as googlebooks_id %}
{% endwith %} {% include "book_panel.html" %}
{% endfor %} {% endwith %}
<a class="more_featured_books" href="{% url 'cc_list' %}"><i class="fa fa-arrow-circle-o-right fa-3x"></i></a> {% endfor %}
<a class="more_featured_books" href="{% url 'cc_list' %}"><i class="fa fa-arrow-circle-o-right fa-3x"></i></a>
</div>
<a class="button success more_featured_books_mobile" href="{% url 'cc_list' %}">See More</a>
</div> </div>
<div class="spacer"></div> <div class="spacer"></div>
{% if top_b2u %} {% if top_b2u %}
<h3 class="featured_books">Buy and Read These eBooks to Make Them Free</h3> <h3 class="featured_books">Buy and Read These eBooks to Make Them Free</h3>
<div> <div class="book-list">
{% for campaign in top_b2u %} <div>
{% with campaign.work as work %} {% for campaign in top_b2u %}
{% with work.googlebooks_id as googlebooks_id %} {% with campaign.work as work %}
{% include "book_panel.html" %} {% with work.googlebooks_id as googlebooks_id %}
{% endwith %}{% endwith %} {% include "book_panel.html" %}
{% endfor %} {% endwith %}{% endwith %}
<a class="more_featured_books" href="{% url 'campaign_list' 'b2u' %}"><i class="fa fa-arrow-circle-o-right fa-3x"></i></a> {% endfor %}
<a class="more_featured_books" href="{% url 'campaign_list' 'b2u' %}"><i class="fa fa-arrow-circle-o-right fa-3x"></i></a>
</div>
</div> </div>
<a class="more_featured_books_mobile button success" href="{% url 'campaign_list' 'b2u' %}">See More</a>
{% endif %} {% endif %}
<div class="spacer"></div> <div class="spacer"></div>
{% if top_t4u %} {% if top_t4u %}
<h3 class="featured_books">Read These Free eBooks and Thank the Creators</h3> <h3 class="featured_books">Read These Free eBooks and Thank the Creators</h3>
<div> <div class="book-list">
{% for campaign in top_t4u %} <div>
{% with campaign.work as work %} {% for campaign in top_t4u %}
{% with work.googlebooks_id as googlebooks_id %} {% with campaign.work as work %}
{% include "book_panel.html" %} {% with work.googlebooks_id as googlebooks_id %}
{% endwith %}{% endwith %} {% include "book_panel.html" %}
{% endfor %} {% endwith %}{% endwith %}
<a class="more_featured_books" href="{% url 'campaign_list' 't4u' %}"><i class="fa fa-arrow-circle-o-right fa-3x"></i></a> {% endfor %}
<a class="more_featured_books" href="{% url 'campaign_list' 't4u' %}"><i class="fa fa-arrow-circle-o-right fa-3x"></i></a>
</div>
</div> </div>
<a class="more_featured_books_mobile button success" href="{% url 'campaign_list' 't4u' %}">See More</a>
{% endif %} {% endif %}
<div class="spacer"></div> <div class="spacer"></div>
<h3 class="featured_books">Read These Unglued eBooks - You've Made Them Free</h3> <h3 class="featured_books">Read These Unglued eBooks - You've Made Them Free</h3>
<div> <div class="book-list">
{% for work in unglued_books %} <div>
{% with work.googlebooks_id as googlebooks_id %} {% for work in unglued_books %}
{% include "book_panel.html" %} {% with work.googlebooks_id as googlebooks_id %}
{% endwith %} {% include "book_panel.html" %}
{% endfor %} {% endwith %}
<a class="more_featured_books" href="{% url 'campaign_list' 'unglued' %}"><i class="fa fa-arrow-circle-o-right fa-3x"></i></a> {% endfor %}
<a class="more_featured_books" href="{% url 'campaign_list' 'unglued' %}"><i class="fa fa-arrow-circle-o-right fa-3x"></i></a>
</div>
</div> </div>
<a class="more_featured_books_mobile button success" href="{% url 'campaign_list' 'unglued' %}">See More</a>
<div class="spacer"></div> <div class="spacer"></div>
</div> </div>

View File

@ -6,10 +6,6 @@
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
max-width: 960px; max-width: 960px;
div {
box-sizing: content-box;
}
} }
#user-block1 { #user-block1 {
@ -34,6 +30,21 @@
visibility: hidden; visibility: hidden;
height: 0px; height: 0px;
} }
.book-list > div{
justify-content: center;
}
.more_featured_books {
display:none;
}
.more_featured_books_mobile {
width:100%;
> a {
width: 100%;
}
}
} }
@include breakpoint(medium up) { @include breakpoint(medium up) {
@ -47,6 +58,21 @@
flex: 1 16%; flex: 1 16%;
} }
} }
.book-list > div {
}
.more_featured_books {
padding-left:14px;
> i {
margin-top:150px;
font-size: 26px;
}
}
.more_featured_books_mobile{
display: none !important;
}
} }
#js-main-container { #js-main-container {
@ -107,6 +133,12 @@
} }
.thewholebook { .book-list > div{
border: none !important; display: flex;
flex-wrap: wrap;
box-sizing: content-box;
}
.thewholebook {
border: none !important;
} }