From 54cf3652b0383c612dd374a4682f78efbeb2afd8 Mon Sep 17 00:00:00 2001
From: Michael Knepher
Date: Wed, 27 May 2020 21:57:59 -0700
Subject: [PATCH] Add series name and index to book cover info
---
cps/static/css/style.css | 6 ++++++
cps/templates/discover.html | 10 +++++++++-
cps/templates/index.html | 16 ++++++++++++++++
cps/templates/search.html | 9 +++++++++
cps/templates/shelf.html | 8 ++++++++
5 files changed, 48 insertions(+), 1 deletion(-)
diff --git a/cps/static/css/style.css b/cps/static/css/style.css
index c043f459..5b22c835 100644
--- a/cps/static/css/style.css
+++ b/cps/static/css/style.css
@@ -127,6 +127,12 @@ a { color: #45b29d; }
color: #444;
}
+.container-fluid .book .meta .series {
+ font-weight: 400;
+ font-size: 12px;
+ color: #444;
+}
+
.container-fluid .book .meta .author {
font-size: 12px;
color: #999;
diff --git a/cps/templates/discover.html b/cps/templates/discover.html
index 650bdeda..dd8dc9bb 100644
--- a/cps/templates/discover.html
+++ b/cps/templates/discover.html
@@ -21,7 +21,7 @@
{% if loop.index > g.config_authors_max and g.config_authors_max != 0 %}
{% if not loop.first %}
&
- {% endif %}
+ {% endif %}
{{author.name.replace('|',',')|shortentitle(30)}}
{% if loop.last %}
(...)
@@ -34,6 +34,14 @@
{% endif %}
{% endfor %}
+ {% if entry.series.__len__() > 0 %}
+
+
+ {{entry.series[0].name}}
+
+ ({{entry.series_index}})
+
+ {% endif %}
{% if entry.ratings.__len__() > 0 %}
{% for number in range((entry.ratings[0].rating/2)|int(2)) %}
diff --git a/cps/templates/index.html b/cps/templates/index.html
index b65beccb..16f2b461 100644
--- a/cps/templates/index.html
+++ b/cps/templates/index.html
@@ -33,6 +33,14 @@
{% endif %}
{% endfor %}
+ {% if entry.series.__len__() > 0 %}
+
+
+ {{entry.series[0].name}}
+
+ ({{entry.series_index}})
+
+ {% endif %}
{% if entry.ratings.__len__() > 0 %}
{% for number in range((entry.ratings[0].rating/2)|int(2)) %}
@@ -101,6 +109,14 @@
{% endif %}
{%endfor%}
+ {% if entry.series.__len__() > 0 %}
+
+
+ {{entry.series[0].name}}
+
+ ({{entry.series_index}})
+
+ {% endif %}
{% if entry.ratings.__len__() > 0 %}
{% for number in range((entry.ratings[0].rating/2)|int(2)) %}
diff --git a/cps/templates/search.html b/cps/templates/search.html
index fa8176e9..7e546c8e 100644
--- a/cps/templates/search.html
+++ b/cps/templates/search.html
@@ -76,6 +76,15 @@
{% endif %}
{% endfor %}
+ {% if entry.series.__len__() > 0 %}
+
+
+ {{entry.series[0].name}}
+
+ ({{entry.series_index}})
+
+ {% endif %}
+
{% if entry.ratings.__len__() > 0 %}
{% for number in range((entry.ratings[0].rating/2)|int(2)) %}
diff --git a/cps/templates/shelf.html b/cps/templates/shelf.html
index f37661ce..cf44cccf 100644
--- a/cps/templates/shelf.html
+++ b/cps/templates/shelf.html
@@ -43,6 +43,14 @@
{% endif %}
{% endfor %}
+ {% if entry.series.__len__() > 0 %}
+
+
+ {{entry.series[0].name}}
+
+ ({{entry.series_index|int}})
+
+ {% endif %}
{% if entry.ratings.__len__() > 0 %}
{% for number in range((entry.ratings[0].rating/2)|int(2)) %}