Skip to content

Commit 6e50348

Browse files
authored
Improved Card Component for Community Lists (internetarchive#11104)
* New lists render for community * Added alt text to openlibrary avatar
1 parent aff7d44 commit 6e50348

File tree

3 files changed

+32
-3
lines changed

3 files changed

+32
-3
lines changed

openlibrary/i18n/messages.pot

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6300,6 +6300,14 @@ msgstr ""
63006300
msgid "You"
63016301
msgstr ""
63026302

6303+
#: lists/list_follow.html
6304+
msgid "OpenLibrary Logo"
6305+
msgstr ""
6306+
6307+
#: lists/list_follow.html
6308+
msgid "Community List"
6309+
msgstr ""
6310+
63036311
#: lists/list_overview.html lists/widget.html my_books/dropdown_content.html
63046312
msgid "See this list"
63056313
msgstr ""

openlibrary/templates/lists/list_follow.html

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,12 @@
5555
</div>
5656
</div>
5757
$else:
58-
<div class="list-follow-card__bottom">
59-
<div class="list-follow-card__community-label">
60-
<i>Community List</i>
58+
<div class="list-follow-card__bottom-community">
59+
<div class="list-follow-card__user">
60+
<img src="/static/images/openlibrary-128x128.png" alt="$_('OpenLibrary Logo')"/>
61+
<div class="list-follow-card__community-label">
62+
<i>$_("Community List")</i>
63+
</div>
6164
</div>
6265
</div>
6366
</div>

static/css/components/list-follow.less

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,24 @@
136136
text-overflow: ellipsis;
137137
}
138138

139+
&__bottom-community {
140+
background: @grey-f4f4f4;
141+
display: flex;
142+
justify-content: space-between;
143+
padding-bottom: 5px;
144+
padding-top: 5px;
145+
margin-bottom: -3px;
146+
border-radius: 0 0 3px 3px;
147+
}
148+
&__community-label {
149+
font-weight: normal;
150+
font-size: @font-size-label-large;
151+
color: @black;
152+
153+
white-space: nowrap;
154+
overflow: hidden;
155+
padding-bottom: 2px;
156+
}
139157
&__num-books {
140158
color: @grey-555;
141159
font-size: @font-size-label-medium;

0 commit comments

Comments
 (0)