From 698e74a496468ec07a6b938abfb378d0bbd6bae1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adeodato=20Sim=C3=B3?= <73768+dato@users.noreply.github.com> Date: Sat, 21 Oct 2023 12:53:24 -0300 Subject: [PATCH 1/2] Minor vocabulary fixes and structured data improvements (#3036) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Remove duplicate Review object under `rating` property This was preventing validation, since `rating` is not a valid property (`review` is, which is created from book.html already). * Drop `bestRating` property in ratings, since it defaults to 5 See ("If bestRating is omitted, 5 is assumed"). * Create Rating object (and its enclosing Review) in book/rating.html * Use `position` property for Book objects in a series `volumeNumber`, previously used, is only valid for objects of type PublicationVolume (which series members are not). * Give URL of book series when setting of `isPartOf` * series.html: Add empty BookSeries object --------- Co-authored-by: Adeodato Simó --- bookwyrm/templates/book/book.html | 14 +++++++------- bookwyrm/templates/book/rating.html | 15 ++++++++++----- bookwyrm/templates/book/series.html | 9 +++++---- .../templates/snippets/status/content_status.html | 12 ------------ .../templates/snippets/status/headers/rating.html | 3 --- 5 files changed, 22 insertions(+), 31 deletions(-) diff --git a/bookwyrm/templates/book/book.html b/bookwyrm/templates/book/book.html index 9083f9bdc..8e76fb014 100644 --- a/bookwyrm/templates/book/book.html +++ b/bookwyrm/templates/book/book.html @@ -44,16 +44,18 @@ {% endif %} {% if book.series %} - - - + + {% if book.authors.exists %} - + {% endif %} + {% endif %}

{% endif %} @@ -186,8 +188,6 @@ itemtype="https://schema.org/AggregateRating" > - {# @todo Is it possible to not hard-code the value? #} - diff --git a/bookwyrm/templates/book/rating.html b/bookwyrm/templates/book/rating.html index c0af67fab..9998a49dc 100644 --- a/bookwyrm/templates/book/rating.html +++ b/bookwyrm/templates/book/rating.html @@ -5,13 +5,18 @@ {% include 'snippets/avatar.html' with user=user %} -
-
- {{ user.display_name }} +
+ -
+
+

{% trans "rated it" %}

- {% include 'snippets/stars.html' with rating=rating.rating %}
diff --git a/bookwyrm/templates/book/series.html b/bookwyrm/templates/book/series.html index dc8113813..8b945452f 100644 --- a/bookwyrm/templates/book/series.html +++ b/bookwyrm/templates/book/series.html @@ -5,15 +5,15 @@ {% block title %}{{ series_name }}{% endblock %} {% block content %} -
-

{{ series_name }}

+
+

{{ series_name }}

{% trans "Series by" %} @@ -22,6 +22,7 @@
{% for book in books %} {% with book=book %} + {# @todo Set `hasPart` property in some meaningful way #}
{% if book.series_number %}{% blocktrans with series_number=book.series_number %}Book {{ series_number }}{% endblocktrans %}{% else %}{% trans 'Unsorted Book' %}{% endif %} diff --git a/bookwyrm/templates/snippets/status/content_status.html b/bookwyrm/templates/snippets/status/content_status.html index 1dc8382b2..28ed61e83 100644 --- a/bookwyrm/templates/snippets/status/content_status.html +++ b/bookwyrm/templates/snippets/status/content_status.html @@ -6,14 +6,6 @@ {% load humanize %} {% with status_type=status.status_type %} -
-
{% if not hide_book %} {% with book=status.book|default:status.mention_books.first %} @@ -58,9 +50,6 @@ {% endif %} > - - {# @todo Is it possible to not hard-code the value? #} - {% include 'snippets/stars.html' with rating=status.rating %} @@ -154,6 +143,5 @@
-
{% endwith %} diff --git a/bookwyrm/templates/snippets/status/headers/rating.html b/bookwyrm/templates/snippets/status/headers/rating.html index bc40c04c8..fcef7eee7 100644 --- a/bookwyrm/templates/snippets/status/headers/rating.html +++ b/bookwyrm/templates/snippets/status/headers/rating.html @@ -16,9 +16,6 @@ > From 00bf2903bce62cae66fe539b0253a31540a1a304 Mon Sep 17 00:00:00 2001 From: Jascha Ezra Urbach Date: Sat, 21 Oct 2023 18:29:45 +0200 Subject: [PATCH 2/2] Bumped version number to 0.7.0 (#3052) --- VERSION | 2 +- bump-version.sh | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) mode change 100644 => 100755 bump-version.sh diff --git a/VERSION b/VERSION index 05e8a4593..faef31a43 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.6.6 +0.7.0 diff --git a/bump-version.sh b/bump-version.sh old mode 100644 new mode 100755 index 231c05b50..552d8409d --- a/bump-version.sh +++ b/bump-version.sh @@ -46,7 +46,8 @@ if [ -f VERSION ]; then # echo -e "$ADJUSTMENTS_MSG" # read echo -e "$PUSHING_MSG" -# git add CHANGELOG.md VERSION +# git add CHANGELOG.md + git add VERSION git commit -m "Bump version to ${INPUT_STRING}." git tag -a -m "Tag version ${INPUT_STRING}." "v$INPUT_STRING" git push origin --tags @@ -61,14 +62,15 @@ else if [ "$RESPONSE" = "YES" ]; then RESPONSE="y"; fi if [ "$RESPONSE" = "y" ]; then echo "0.1.0" > VERSION - echo "## 0.1.0 ($NOW)" > CHANGELOG.md +# echo "## 0.1.0 ($NOW)" > CHANGELOG.md # git log --pretty=format:" - %s" >> CHANGELOG.md # echo "" >> CHANGELOG.md # echo "" >> CHANGELOG.md # echo -e "$ADJUSTMENTS_MSG" # read echo -e "$PUSHING_MSG" - git add VERSION CHANGELOG.md +# git add CHANGELOG.md + git add VERSION git commit -m "Add VERSION and CHANGELOG.md files, Bump version to v0.1.0." git tag -a -m "Tag version 0.1.0." "v0.1.0" git push origin --tags