From 55a3a28d49f187d3de0391ea3beaba0e75620dac Mon Sep 17 00:00:00 2001 From: Joachim Date: Sun, 23 May 2021 21:17:14 +0200 Subject: [PATCH 1/5] Add microformats to author page --- bookwyrm/templates/author/author.html | 33 ++++++++++++++++++++------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/bookwyrm/templates/author/author.html b/bookwyrm/templates/author/author.html index aa99cbe27..496012a82 100644 --- a/bookwyrm/templates/author/author.html +++ b/bookwyrm/templates/author/author.html @@ -22,42 +22,59 @@ -
- {% if author.aliases or author.born or author.died or author.wikipedia_link %} +
+ + + {% if author.aliases or author.born or author.died or author.wikipedia_link or author.openlibrary_key or author.inventaire_id %}
{% if author.aliases %}
{% trans "Aliases:" %}
-
{{ author.aliases|join:', ' }}
+
+ {% for alias in author.aliases %} + {{alias}}{% if not forloop.last %},{% endif %} + {% endfor %} +
{% endif %} {% if author.born %}
{% trans "Born:" %}
-
{{ author.born|naturalday }}
+
{{ author.born|naturalday }}
{% endif %} {% if author.died %}
{% trans "Died:" %}
-
{{ author.died|naturalday }}
+
{{ author.died|naturalday }}
{% endif %}
{% if author.wikipedia_link %} -

{% trans "Wikipedia" %}

+

+ + + {% trans "Wikipedia" %} + +

{% endif %} {% if author.openlibrary_key %}

- {% trans "View on OpenLibrary" %} + + + {% trans "View on OpenLibrary" %} +

{% endif %} {% if author.inventaire_id %}

- {% trans "View on Inventaire" %} + + + {% trans "View on Inventaire" %} +

{% endif %}
From 58c07d16779d3d1f7a5f8c43518c41efad6e891b Mon Sep 17 00:00:00 2001 From: Joachim Date: Mon, 24 May 2021 12:36:48 +0200 Subject: [PATCH 2/5] Apply review suggestions --- bookwyrm/templates/author/author.html | 29 +++++++++++++-------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/bookwyrm/templates/author/author.html b/bookwyrm/templates/author/author.html index 496012a82..de7d230f9 100644 --- a/bookwyrm/templates/author/author.html +++ b/bookwyrm/templates/author/author.html @@ -22,7 +22,7 @@
-
+
{% if author.aliases or author.born or author.died or author.wikipedia_link or author.openlibrary_key or author.inventaire_id %} @@ -32,11 +32,11 @@ {% if author.aliases %}
{% trans "Aliases:" %}
-
- {% for alias in author.aliases %} - {{alias}}{% if not forloop.last %},{% endif %} - {% endfor %} -
+ {% for alias in author.aliases %} +
+ {{alias}}{% if not forloop.last %},{% endif %} +
+ {% endfor %}
{% endif %} {% if author.born %} @@ -54,25 +54,24 @@ {% if author.wikipedia_link %} -

- - +

+ {% trans "Wikipedia" %}

{% endif %} + {% if author.openlibrary_key %} -

- - +

+ {% trans "View on OpenLibrary" %}

{% endif %} + {% if author.inventaire_id %} -

- - +

+ {% trans "View on Inventaire" %}

From 594f7b370875e6f469c2c84fc075c0ee8ff87347 Mon Sep 17 00:00:00 2001 From: Joachim Date: Mon, 24 May 2021 12:51:18 +0200 Subject: [PATCH 3/5] Style fixes --- bookwyrm/templates/author/author.html | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/bookwyrm/templates/author/author.html b/bookwyrm/templates/author/author.html index de7d230f9..1d317492f 100644 --- a/bookwyrm/templates/author/author.html +++ b/bookwyrm/templates/author/author.html @@ -26,43 +26,43 @@ {% if author.aliases or author.born or author.died or author.wikipedia_link or author.openlibrary_key or author.inventaire_id %} -
+
{% if author.aliases %} -
-
{% trans "Aliases:" %}
+
+
{% trans "Aliases:" %}
{% for alias in author.aliases %}
- {{alias}}{% if not forloop.last %},{% endif %} + {{alias}}{% if not forloop.last %}, {% endif %}
{% endfor %}
{% endif %} {% if author.born %} -
-
{% trans "Born:" %}
+
+
{% trans "Born:" %}
{{ author.born|naturalday }}
{% endif %} {% if author.died %} -
-
{% trans "Died:" %}
+
+
{% trans "Died:" %}
{{ author.died|naturalday }}
{% endif %}
{% if author.wikipedia_link %} -

+

{% trans "Wikipedia" %}

{% endif %} - + {% if author.openlibrary_key %} -

+

{% trans "View on OpenLibrary" %} @@ -70,7 +70,7 @@ {% endif %} {% if author.inventaire_id %} -

+

{% trans "View on Inventaire" %} From 25858ed3aa5da7e9f41281d9590faff31fe8e29a Mon Sep 17 00:00:00 2001 From: Joachim Date: Mon, 24 May 2021 12:51:41 +0200 Subject: [PATCH 4/5] Added LibraryThing and Goodreads links --- bookwyrm/templates/author/author.html | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/bookwyrm/templates/author/author.html b/bookwyrm/templates/author/author.html index 1d317492f..9b3c637e3 100644 --- a/bookwyrm/templates/author/author.html +++ b/bookwyrm/templates/author/author.html @@ -76,6 +76,22 @@

{% endif %} + + {% if author.librarything_key %} +

+ + {% trans "View on LibraryThing" %} + +

+ {% endif %} + + {% if author.goodreads_key %} +

+ + {% trans "View on Goodreads" %} + +

+ {% endif %}
{% endif %} From b72580daf61ff0dd22dd05ad8ecbabe92301b3b4 Mon Sep 17 00:00:00 2001 From: Joachim Date: Mon, 24 May 2021 17:17:12 +0200 Subject: [PATCH 5/5] Update author.html --- bookwyrm/templates/author/author.html | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/bookwyrm/templates/author/author.html b/bookwyrm/templates/author/author.html index 9b3c637e3..f4f308f2d 100644 --- a/bookwyrm/templates/author/author.html +++ b/bookwyrm/templates/author/author.html @@ -27,10 +27,10 @@ {% if author.aliases or author.born or author.died or author.wikipedia_link or author.openlibrary_key or author.inventaire_id %}
-
+
{% if author.aliases %} -
+
{% trans "Aliases:" %}
{% for alias in author.aliases %}
@@ -39,14 +39,16 @@ {% endfor %}
{% endif %} + {% if author.born %} -
+
{% trans "Born:" %}
{{ author.born|naturalday }}
{% endif %} + {% if author.died %} -
+
{% trans "Died:" %}
{{ author.died|naturalday }}
@@ -54,7 +56,7 @@
{% if author.wikipedia_link %} -

+

{% trans "Wikipedia" %} @@ -62,7 +64,7 @@ {% endif %} {% if author.openlibrary_key %} -

+

{% trans "View on OpenLibrary" %} @@ -70,7 +72,7 @@ {% endif %} {% if author.inventaire_id %} -

+

{% trans "View on Inventaire" %} @@ -78,7 +80,7 @@ {% endif %} {% if author.librarything_key %} -

+

{% trans "View on LibraryThing" %} @@ -86,7 +88,7 @@ {% endif %} {% if author.goodreads_key %} -

+

{% trans "View on Goodreads" %}