From a6d2964846dc827dbf291d14db9cc7745cdc6fd0 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Sun, 10 Nov 2019 09:23:48 -0500 Subject: added buy and borrow buttons to books --- design/sass/_details.scss | 18 ++++++++++++++++-- design/templates/details/book.html | 8 ++++---- 2 files changed, 20 insertions(+), 6 deletions(-) (limited to 'design') diff --git a/design/sass/_details.scss b/design/sass/_details.scss index 83651ca..b72ca9d 100644 --- a/design/sass/_details.scss +++ b/design/sass/_details.scss @@ -227,10 +227,20 @@ h4.post-source { text-decoration: none; } } +.buy-btn { + @include fancy_sans; + display: block; + padding: .5rem 1rem; + background: #249bd6; + color: white; + text-transform: uppercase; + @include fontsize(16); + text-decoration: none; + margin-right: 1rem; +} .buy-btn-wrapper { - margin-top: 4rem; display: flex; - justify-content: center; + justify-content: start; align-items: center; align-content: space-between; h4 { @@ -244,6 +254,10 @@ h4.post-source { margin-right: 1rem; } } +.post-guide .buy-btn-wrapper { + margin-top: 4rem; + justify-content: center; +} .detail .post-guide { h3 { @include fontsize(27); diff --git a/design/templates/details/book.html b/design/templates/details/book.html index 101dd0d..f7bba47 100644 --- a/design/templates/details/book.html +++ b/design/templates/details/book.html @@ -19,10 +19,6 @@ {% if object.rating %}
Rating
{% for i in object.ratings_range %}{% if i <= object.get_rating%}★{%else%}☆{%endif%}{%endfor%}
{%endif%} {% if object.read_in %}
Read
{{object.read_in}}
{%endif%} - {% if object.afflink %}
Buy
-
Amzn
{%endif%} - {% if object.isbn %}
Borrow
-
WorldCat
{%endif%} {% if object.pages %}
Pages
{{object.pages}}
{%endif%} {% if object.publish_date %}
Published
@@ -30,6 +26,10 @@ {% if object.isbn %}
ISBN
{{object.isbn}}
{%endif%} +
+ {% if object.afflink %}Buy Now{%endif%} + {% if object.isbn %}Borrow{%endif%} +
{%if object.body_html%}
Notes
-- cgit v1.2.3-70-g09d2