|
8 | 8 | description (string, required) - Short library description |
9 | 9 | categories (list, required) - List of {label, url, variant} dicts for category tags |
10 | 10 | cpp_version (string, required) - e.g. "C++ 14" — rendered as neutral tag |
11 | | - contributor_name (string, required) - Contributor display name |
12 | | - contributor_role (string, optional) - Contributor role, e.g. "Contributor". Omit to hide. |
13 | | - contributor_avatar_url (string, optional) - Avatar image URL |
14 | | - contributor_badge_url (string, optional) - Badge icon image URL |
| 11 | + author (dict, required) - Author object for _user_profile.html (name, role, avatar_url, badge_url) |
15 | 12 | doc_url (string, required) - Documentation link URL |
16 | 13 | extra_attrs (string, optional) - Extra HTML attributes for analytics |
17 | 14 |
|
18 | 15 | Usage (list): |
19 | | - {% include "v3/includes/_library_item.html" with variant="list" library_name="Boost.Geometry" library_url="#" description="A library for solving geometry problems." categories=cats cpp_version="C++ 14" contributor_name="Barend Gehrels" contributor_avatar_url="/img/avatar.png" doc_url="/libs/geometry/doc/" %} |
| 16 | + {% include "v3/includes/_library_item.html" with variant="list" library_name="Boost.Geometry" library_url="#" description="A library for solving geometry problems." categories=cats cpp_version="C++ 14" author=author doc_url="/libs/geometry/doc/" %} |
20 | 17 |
|
21 | 18 | Usage (card): |
22 | | - {% include "v3/includes/_library_item.html" with variant="card" library_name="Boost.Asio" description="Portable networking and low-level I/O." categories=cats cpp_version="C++ 11" contributor_name="Christopher Kohlhoff" doc_url="/libs/asio/doc/" %} |
| 19 | + {% include "v3/includes/_library_item.html" with variant="card" library_name="Boost.Asio" description="Portable networking and low-level I/O." categories=cats cpp_version="C++ 11" author=author doc_url="/libs/asio/doc/" %} |
23 | 20 | {% endcomment %} |
24 | 21 | {% if variant == "list" %}<li class="library-item library-item--list" {{ extra_attrs|safe }}>{% else %}<div class="library-item library-item--card" {{ extra_attrs|safe }}>{% endif %} |
25 | 22 |
|
|
39 | 36 | </div> |
40 | 37 |
|
41 | 38 | <div class="library-item__contributor"> |
42 | | - {% include "v3/includes/_avatar_v3.html" with src=contributor_avatar_url name=contributor_name size="xl" %} |
43 | | - <div class="library-item__contributor-info"> |
44 | | - <span class="library-item__contributor-name">{{ contributor_name }}</span> |
45 | | - {% if contributor_role %} |
46 | | - <span class="library-item__contributor-role"> |
47 | | - {{ contributor_role }} |
48 | | - {% if contributor_badge_url %} |
49 | | - <img class="library-item__contributor-badge" src="{{ contributor_badge_url }}" alt="" width="16" height="16" aria-hidden="true" loading="lazy" decoding="async"> |
50 | | - {% endif %} |
51 | | - </span> |
52 | | - {% endif %} |
53 | | - </div> |
| 39 | + {% include "v3/includes/_user_profile.html" with author=author %} |
54 | 40 | </div> |
55 | 41 |
|
56 | 42 | <div class="library-item__actions"> |
|
0 commit comments