# HG changeset patch # User Goffi # Date 1521013410 -3600 # Node ID 44b838bcc0d68b21981cd1bfd7cbe2a94f8b14f8 # Parent 9d95b58200df8966ee7a235eddd6d33a3a0c1686 file/overview: display tumbnails when available diff -r 9d95b58200df -r 44b838bcc0d6 default/file/overview.html --- a/default/file/overview.html Sun Mar 11 19:21:46 2018 +0100 +++ b/default/file/overview.html Wed Mar 14 08:43:30 2018 +0100 @@ -23,7 +23,11 @@ {% else %}
  • - {{ icon('doc', cls='file__icon icon--soft') }} + {% if file.thumb_url is defined %} + {{file.name}} + {% else %} + {{ icon('doc', cls='file__icon icon--soft') }} + {% endif %} {{ file.name }}
  • diff -r 9d95b58200df -r 44b838bcc0d6 default/static/file.css --- a/default/static/file.css Sun Mar 11 19:21:46 2018 +0100 +++ b/default/static/file.css Wed Mar 14 08:43:30 2018 +0100 @@ -20,6 +20,11 @@ .file a { text-decoration: none; + outline: none; +} + +.file a:focus img { + outline: 3px solid #bbb; } .file__icon { @@ -28,6 +33,13 @@ margin: 0 auto; } +.file__thumbnail { + max-width: 300px; + height: 125px; + display: block; + margin: 0 auto; +} + .icon--soft { fill: #777; }