diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2021-02-26 12:02:08 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2021-02-26 12:03:32 -0800 |
commit | 0880e0ecca4e65fd00a4ffafec948873be45193e (patch) | |
tree | 405812f25ba93006c68eef158cd446ba663916e7 /python/fatcat_web/templates/entity_macros.html | |
parent | fc9edfb1b65260f41f204d11bf130ceb35cb84e0 (diff) | |
download | fatcat-0880e0ecca4e65fd00a4ffafec948873be45193e.tar.gz fatcat-0880e0ecca4e65fd00a4ffafec948873be45193e.zip |
web: refactor container SERP rows into macro
Diffstat (limited to 'python/fatcat_web/templates/entity_macros.html')
-rw-r--r-- | python/fatcat_web/templates/entity_macros.html | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/python/fatcat_web/templates/entity_macros.html b/python/fatcat_web/templates/entity_macros.html index 204347cd..45f00362 100644 --- a/python/fatcat_web/templates/entity_macros.html +++ b/python/fatcat_web/templates/entity_macros.html @@ -265,6 +265,26 @@ </div> {% endmacro %} + +{% macro container_search_result_row(entity) -%} + <div> + <h4 style="margin-top: 1em; margin-bottom: 4px; font-size: 1.1em;"> + <a href="/container/{{ entity.ident }}" style="color: #2224c7;">{{ entity['name'] }}</a> + {% if entity.is_oa %}<i class="icon unlock orange small"></i>{% endif %} + </h4> + {% if entity.publisher %} + <h5 style="margin-top: 4px; margin-bottom: 0px; font-size: 1em;">{{ entity.publisher }}</h5> + {% endif %} + {% if entity.issnl %} + <a href="https://portal.issn.org/resource/ISSN/{{entity.issnl }}" style="color: green;">issn:{{ entity.issnl }}</a> + {% endif %} + {% if entity.container_type %} + {{ entity.container_type }} + {% endif %} + </div> +{% endmacro %} + + {% macro progress_color(frac) -%} {% if frac >= 1 %} green |