From 3495e36afdd094b8b667b61c8ef8945171381351 Mon Sep 17 00:00:00 2001 From: nicholas antonov Date: Thu, 17 May 2018 14:17:48 -0400 Subject: [PATCH] change panel to read when possible --- frontend/templates/book_panel.html | 21 +++++++++++++++++---- static/scss/bookview.css | 2 +- static/scss/read.css | 2 +- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/frontend/templates/book_panel.html b/frontend/templates/book_panel.html index ce1d5e0e..1ae5c69f 100644 --- a/frontend/templates/book_panel.html +++ b/frontend/templates/book_panel.html @@ -54,7 +54,9 @@ {% include "book_panel_addbutton.html" %}
- {% if purchased %} + {% if work.epubfiles %} + Read it Now + {% elif purchased %} Read it Now {% elif borrowed %} Read it Now @@ -298,7 +300,6 @@ {% endif %}
- {% comment %} For status icons, we should display... If there is an ebook: options to get it @@ -307,7 +308,19 @@ Otherwise: number of wishes {% endcomment %} {% if purchased or borrowed or first_ebook %} -
Read it Now
+ {% if work.epubfiles %} + + + Read it Now + + + {% else %} + +
+ Read it Now +
+
+ {% endif %} {% elif borrowable %}
Borrow It
{% elif in_library %} @@ -328,4 +341,4 @@
-{% endwith %} \ No newline at end of file +{% endwith %} diff --git a/static/scss/bookview.css b/static/scss/bookview.css index e2fd44e3..1f0ed47a 100644 --- a/static/scss/bookview.css +++ b/static/scss/bookview.css @@ -1,3 +1,3 @@ .panelborders{border-width:1px 0px;border-style:solid none;border-color:#FFFFFF}.panelborders{border-width:1px 0px;border-style:solid none;border-color:#FFFFFF}@media screen and (max-width: 39.9375em){.wrapper{display:flex;flex-direction:column}.pubinfo{display:flex;flex-direction:column;align-items:center}.wrapper{margin:10px}.bookImage{order:0;display:flex;justify-content:center}.bookSidebar{order:1;flex-direction:row;flex-wrap:wrap}.book-sidebar-item{flex:auto;display:flex;justify-content:center}.book-sidebar-item span{display:none}.bookRead{flex:100%}.bookDownload{flex:100%}.bookDonate{flex:100%}.bookDescription{order:2}.bookComments{order:3;margin-top:15px}}@supports not (grid-template-rows: auto){.wrapper{display:flex;flex-direction:column}.pubinfo{display:flex;flex-direction:column;align-items:center}.wrapper{margin:10px}.bookImage{order:0;display:flex;justify-content:center}.bookSidebar{order:1;flex-direction:row;flex-wrap:wrap}.book-sidebar-item{flex:auto;display:flex;justify-content:center}.book-sidebar-item span{display:none}.bookRead{flex:100%}.bookDownload{flex:100%}.bookDonate{flex:100%}.bookDescription{order:2}.bookComments{order:3;margin-top:15px}}@supports (grid-template-rows: auto){@media print, screen and (min-width: 40em){.wrapper{display:grid;grid-template-columns:fit-content 1fr 20%;grid-template-rows:auto auto;grid-template-areas:"bookImage bookDescription bookSidebar" ". bookComments .";margin-left:auto;margin-right:auto;max-width:1000px}.bookDescription{padding-right:15px}.bookSidebar{flex-direction:column;margin-top:66px}}}.bookImage{grid-area:bookImage;padding:15px}.bookImage img{padding:5px;border:solid 5px #eee}.bookImage div{float:right}.bookDescription{grid-area:bookDescription}.bookSidebar{display:flex;grid-area:bookSidebar}.book-sidebar-item{margin-bottom:16px}.bookComments{grid-area:bookComments}.btn_wishlist span{text-align:right}.btn_wishlist div{float:none}.description-more-content{padding-top:20px} -/*# sourceMappingURL=../../../../../../../static/scss/bookview.css.map */ \ No newline at end of file +/*# sourceMappingURL=../../../../../../static/scss/bookview.css.map */ \ No newline at end of file diff --git a/static/scss/read.css b/static/scss/read.css index c42c23ea..03c206cf 100644 --- a/static/scss/read.css +++ b/static/scss/read.css @@ -1,3 +1,3 @@ .panelborders{border-width:1px 0px;border-style:solid none;border-color:#FFFFFF} -/*# sourceMappingURL=../../../../../../../static/scss/read.css.map */ \ No newline at end of file +/*# sourceMappingURL=../../../../../../static/scss/read.css.map */ \ No newline at end of file