-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Half star styling and number formatting corrections
- Loading branch information
1 parent
711afbd
commit 2be674b
Showing
5 changed files
with
10 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
$def with(ratings_count, ratings_average, want_to_read_count) | ||
|
||
$ formatted_want_to_read_count = "{:,}".format(want_to_read_count) | ||
$ formatted_want_to_read_count = "{:,}".format(want_to_read_count) if want_to_read_count else "" | ||
$ ratings_label = _('rating') if ratings_count == 1 else _('ratings') | ||
|
||
<span class="ratingsByline itemprop="aggregateRating" itemscope itemtype="https://schema.org/AggregateRating"> | ||
$if ratings_count: | ||
$:macros.StarRatingsComponent(ratings_count, ratings_average, 'results_page') | ||
</span> | ||
$if want_to_read_count > 0 and ratings_count > 0: | ||
$if want_to_read_count and ratings_count: | ||
<span class="dot">·</span> | ||
$if want_to_read_count > 0: | ||
$if want_to_read_count: | ||
<span class="ratingsByline" itemprop="reviewCount">$_('%(want_to_read_count)s Want to read', want_to_read_count=formatted_want_to_read_count)</span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters