diff options
author | Bryan Newbold <bnewbold@archive.org> | 2020-08-06 18:33:45 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@archive.org> | 2020-08-06 19:01:12 -0700 |
commit | 7704b8df5dd381c64356116b2c3cb1c2912e0626 (patch) | |
tree | b296975e520027edf39ef731e8548b0f1db92c64 | |
parent | 1204b4f0804a6c1983f71de7840a78f2bbd1061c (diff) | |
download | fatcat-scholar-7704b8df5dd381c64356116b2c3cb1c2912e0626.tar.gz fatcat-scholar-7704b8df5dd381c64356116b2c3cb1c2912e0626.zip |
basic placeholder thumbnail image
-rw-r--r-- | fatcat_scholar/static/document-icon.svg | 179 | ||||
-rw-r--r-- | fatcat_scholar/templates/base.html | 3 | ||||
-rw-r--r-- | fatcat_scholar/templates/search_macros.html | 12 |
3 files changed, 191 insertions, 3 deletions
diff --git a/fatcat_scholar/static/document-icon.svg b/fatcat_scholar/static/document-icon.svg new file mode 100644 index 0000000..59fda86 --- /dev/null +++ b/fatcat_scholar/static/document-icon.svg @@ -0,0 +1,179 @@ +<?xml version="1.0" encoding="iso-8859-1"?>
+<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ viewBox="0 0 504 504" style="enable-background:new 0 0 504 504;" xml:space="preserve">
+<g>
+ <g>
+ <path d="M395.57,155.992l-90.54-90.728C303.546,63.78,301.542,63,299.45,63H65.142c-11.968,0-21.696,9.672-21.696,21.632
+ l-0.124,397.692c0,11.96,9.736,21.676,21.7,21.676H376.05c11.96,0,21.696-9.708,21.7-21.664l0.116-320.796
+ C397.866,159.452,397.042,157.468,395.57,155.992z M381.994,482.332c0,3.276-2.668,5.924-5.944,5.924H65.022
+ c-3.28,0-5.948-2.624-5.948-5.9l0.124-397.708c0-3.276,2.664-5.896,5.944-5.896h231.04l85.924,86.076L381.994,482.332z"/>
+ </g>
+</g>
+<g>
+ <g>
+ <path d="M354.454,153.564h-31.972c-8.356,0-15.352-6.712-15.352-15.068v-67.72c0-4.352-3.528-7.876-7.876-7.876
+ c-4.348,0-7.876,3.528-7.876,7.876v67.72c0,17.044,14.056,30.816,31.1,30.816h31.972c4.348,0,7.88-3.52,7.88-7.872
+ S358.802,153.564,354.454,153.564z"/>
+ </g>
+</g>
+<g>
+ <g>
+ <path d="M458.378,93.128l-90.54-90.772C366.354,0.872,364.35,0,362.262,0H127.95c-11.964,0-21.64,9.816-21.64,21.78v48.996
+ c0,4.352,3.524,7.876,7.876,7.876s7.876-3.528,7.876-7.876V21.78c0-3.276,2.616-6.028,5.892-6.028h231.044l85.928,86.112
+ l-0.12,317.552c0,3.272-2.664,5.832-5.94,5.832H389.87c-4.352,0-7.876,3.528-7.876,7.876c0,4.348,3.524,7.876,7.876,7.876h48.996
+ c11.964,0,21.692-9.628,21.688-21.588L460.678,98.7C460.678,96.612,459.846,94.604,458.378,93.128z"/>
+ </g>
+</g>
+<g>
+ <g>
+ <path d="M417.27,90.56h-31.972c-8.356,0-15.168-6.524-15.168-14.88V7.96c0-4.348-3.528-7.876-7.876-7.876
+ c-4.348,0-7.876,3.528-7.876,7.876v67.72c0,17.044,13.876,30.632,30.916,30.632h31.972c4.348,0,7.88-3.524,7.88-7.876
+ S421.618,90.56,417.27,90.56z"/>
+ </g>
+</g>
+<g>
+ <g>
+ <path d="M105.738,192.936H86.57c-4.348,0-7.876,3.524-7.876,7.876c0,4.352,3.528,7.876,7.876,7.876h19.168
+ c4.344,0,7.876-3.524,7.876-7.876C113.614,196.46,110.082,192.936,105.738,192.936z"/>
+ </g>
+</g>
+<g>
+ <g>
+ <path d="M354.33,192.936H141.114c-4.356,0-7.876,3.524-7.876,7.876c0,4.352,3.524,7.876,7.876,7.876H354.33
+ c4.352,0,7.876-3.524,7.876-7.876C362.206,196.46,358.682,192.936,354.33,192.936z"/>
+ </g>
+</g>
+<g>
+ <g>
+ <path d="M354.33,232.312h-59.74c-4.352,0-7.876,3.524-7.876,7.876s3.524,7.876,7.876,7.876h59.74c4.352,0,7.876-3.524,7.876-7.876
+ S358.682,232.312,354.33,232.312z"/>
+ </g>
+</g>
+<g>
+ <g>
+ <path d="M259.218,232.312H86.574c-4.348,0-7.876,3.524-7.876,7.876s3.528,7.876,7.876,7.876h172.644
+ c4.344,0,7.876-3.524,7.876-7.876S263.562,232.312,259.218,232.312z"/>
+ </g>
+</g>
+<g>
+ <g>
+ <path d="M354.33,271.684H86.574c-4.348,0-7.876,3.528-7.876,7.876c0,4.348,3.528,7.876,7.876,7.876H354.33
+ c4.352,0,7.876-3.528,7.876-7.876C362.206,275.212,358.682,271.684,354.33,271.684z"/>
+ </g>
+</g>
+<g>
+ <g>
+ <path d="M354.33,389.812H86.574c-4.348,0-7.876,3.528-7.876,7.876c0,4.348,3.528,7.876,7.876,7.876H354.33
+ c4.352,0,7.876-3.528,7.876-7.876C362.206,393.34,358.682,389.812,354.33,389.812z"/>
+ </g>
+</g>
+<g>
+ <g>
+ <path d="M105.738,311.06H86.57c-4.348,0-7.876,3.528-7.876,7.876c0,4.348,3.528,7.876,7.876,7.876h19.168
+ c4.344,0,7.876-3.528,7.876-7.876C113.614,314.588,110.082,311.06,105.738,311.06z"/>
+ </g>
+</g>
+<g>
+ <g>
+ <path d="M354.33,311.06H141.114c-4.356,0-7.876,3.528-7.876,7.876c0,4.348,3.524,7.876,7.876,7.876H354.33
+ c4.352,0,7.876-3.528,7.876-7.876C362.206,314.588,358.682,311.06,354.33,311.06z"/>
+ </g>
+</g>
+<g>
+ <g>
+ <path d="M354.33,350.436h-59.74c-4.352,0-7.876,3.528-7.876,7.876c0,4.348,3.524,7.876,7.876,7.876h59.74
+ c4.352,0,7.876-3.528,7.876-7.876C362.206,353.964,358.682,350.436,354.33,350.436z"/>
+ </g>
+</g>
+<g>
+ <g>
+ <path d="M259.218,350.436H86.574c-4.348,0-7.876,3.528-7.876,7.876c0,4.348,3.528,7.876,7.876,7.876h172.644
+ c4.344,0,7.876-3.528,7.876-7.876C267.094,353.964,263.562,350.436,259.218,350.436z"/>
+ </g>
+</g>
+<g>
+ <g>
+ <path d="M105.738,429.184H86.57c-4.348,0-7.876,3.528-7.876,7.876c0,4.348,3.528,7.876,7.876,7.876h19.168
+ c4.344,0,7.876-3.528,7.876-7.876C113.614,432.712,110.082,429.184,105.738,429.184z"/>
+ </g>
+</g>
+<g>
+ <g>
+ <path d="M354.33,429.184H141.114c-4.356,0-7.876,3.528-7.876,7.876c0,4.348,3.524,7.876,7.876,7.876H354.33
+ c4.352,0,7.876-3.528,7.876-7.876C362.206,432.712,358.682,429.184,354.33,429.184z"/>
+ </g>
+</g>
+<g>
+ <g>
+ <path d="M417.15,129.936h-46.74c-4.352,0-7.876,3.524-7.876,7.876c0,4.352,3.524,7.876,7.876,7.876h46.736
+ c4.352,0,7.88-3.524,7.88-7.876C425.026,133.46,421.502,129.936,417.15,129.936z"/>
+ </g>
+</g>
+<g>
+ <g>
+ <path d="M417.146,169.312H389.87c-4.352,0-7.876,3.524-7.876,7.876s3.524,7.876,7.876,7.876h27.276
+ c4.352,0,7.876-3.524,7.876-7.876S421.498,169.312,417.146,169.312z"/>
+ </g>
+</g>
+<g>
+ <g>
+ <path d="M417.146,208.684H389.87c-4.352,0-7.876,3.524-7.876,7.876s3.524,7.876,7.876,7.876h27.276
+ c4.352,0,7.876-3.524,7.876-7.876S421.498,208.684,417.146,208.684z"/>
+ </g>
+</g>
+<g>
+ <g>
+ <path d="M417.146,326.812h-24.864c-4.344,0-7.876,3.528-7.876,7.876c0,4.348,3.532,7.876,7.876,7.876h24.864
+ c4.352,0,7.876-3.528,7.876-7.876C425.022,330.34,421.498,326.812,417.146,326.812z"/>
+ </g>
+</g>
+<g>
+ <g>
+ <path d="M417.146,248.06H389.87c-4.352,0-7.876,3.528-7.876,7.876c0,4.348,3.524,7.876,7.876,7.876h27.276
+ c4.352,0,7.876-3.528,7.876-7.876C425.022,251.584,421.498,248.06,417.146,248.06z"/>
+ </g>
+</g>
+<g>
+ <g>
+ <path d="M417.146,287.436H389.87c-4.352,0-7.876,3.528-7.876,7.876c0,4.348,3.524,7.876,7.876,7.876h27.276
+ c4.352,0,7.876-3.528,7.876-7.876C425.022,290.964,421.498,287.436,417.146,287.436z"/>
+ </g>
+</g>
+<g>
+ <g>
+ <path d="M417.146,366.184H389.87c-4.352,0-7.876,3.528-7.876,7.876c0,4.348,3.524,7.876,7.876,7.876h27.276
+ c4.352,0,7.876-3.528,7.876-7.876C425.022,369.712,421.498,366.184,417.146,366.184z"/>
+ </g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+<g>
+</g>
+</svg>
diff --git a/fatcat_scholar/templates/base.html b/fatcat_scholar/templates/base.html index 17e61ee..77bbb0f 100644 --- a/fatcat_scholar/templates/base.html +++ b/fatcat_scholar/templates/base.html @@ -55,6 +55,9 @@ .ui.serp.card { max-width: 180px !important; } + div.fulltext-link { + width: 180px !important; + } } {# for fulltext search result highlighting #} diff --git a/fatcat_scholar/templates/search_macros.html b/fatcat_scholar/templates/search_macros.html index d9f66dd..a0352a0 100644 --- a/fatcat_scholar/templates/search_macros.html +++ b/fatcat_scholar/templates/search_macros.html @@ -180,9 +180,15 @@ <img src="{{ paper.fulltext.thumbnail_url }}"> </a> </div> + {% else %} + <div class="ui serp card" style="margin-bottom: 0.2em; box-shadow: none;"> + <a class="image" target="_blank" href="{{ paper.fulltext.access_url}}" style="background: none;"> + <img src="/static/document-icon.svg" style="opacity: 0.6;"> + </a> + </div> {% endif %} <a target="_blank" href="{{ paper.fulltext.access_url}}"> - <div style="width: 100%; opacity: 0.65; text-align: center; overflow: hidden;"> + <div class="fulltext-link" style="width: 100%; opacity: 1.0; text-align: center; overflow: hidden;"> {# TODO: could have other hover info, like mimetype icon and file size? #} <span> {% if paper.fulltext.access_type == "wayback" %} @@ -191,9 +197,9 @@ archive.org {% endif %} {% if paper.fulltext.file_mimetype == "application/pdf" %} - <i class="file pdf outline icon"></i> + <i class="file pdf outline icon" style="margin-right: 0;"></i> {% elif paper.fulltext.access_type == "ia_sim" %} - <i class="film icon"></i> + <i class="film icon" style="margin-right: 0;"></i> {% endif %} </span> </div> |