aboutsummaryrefslogtreecommitdiffhomepage
path: root/tpl/default
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2020-10-15 11:46:24 +0200
committerArthurHoaro <arthur@hoa.ro>2020-10-20 10:15:18 +0200
commit21e72da9ee34cec56b10c83ae0c75b4bf320dfcb (patch)
treeb6c0b8208f004e1b2b37b1af54e8d4c40310d56e /tpl/default
parent9b3c1270bcbe4f8e30e0160da8badd43dd94871a (diff)
downloadShaarli-21e72da9ee34cec56b10c83ae0c75b4bf320dfcb.tar.gz
Shaarli-21e72da9ee34cec56b10c83ae0c75b4bf320dfcb.tar.zst
Shaarli-21e72da9ee34cec56b10c83ae0c75b4bf320dfcb.zip
Asynchronous retrieval of bookmark's thumbnails
This feature is based general.enable_async_metadata setting and works with existing metadata.js file. The script is compatible with any template: - the thumbnail div bloc must have attribute - the bookmark bloc must have attribute with the bookmark ID as value Fixes #1564
Diffstat (limited to 'tpl/default')
-rw-r--r--tpl/default/linklist.html11
1 files changed, 8 insertions, 3 deletions
diff --git a/tpl/default/linklist.html b/tpl/default/linklist.html
index beab0eac..48cd9aad 100644
--- a/tpl/default/linklist.html
+++ b/tpl/default/linklist.html
@@ -135,8 +135,12 @@
135 135
136 <div class="linklist-item linklist-item{if="$value.class"} {$value.class}{/if}" data-id="{$value.id}"> 136 <div class="linklist-item linklist-item{if="$value.class"} {$value.class}{/if}" data-id="{$value.id}">
137 <div class="linklist-item-title"> 137 <div class="linklist-item-title">
138 {if="$thumbnails_enabled && !empty($value.thumbnail)"} 138 {if="$thumbnails_enabled && $value.thumbnail !== false"}
139 <div class="linklist-item-thumbnail" style="width:{$thumbnails_width}px;height:{$thumbnails_height}px;"> 139 <div
140 class="linklist-item-thumbnail {if="$value.thumbnail === null"}hidden{/if}"
141 style="width:{$thumbnails_width}px;height:{$thumbnails_height}px;"
142 {if="$value.thumbnail === null"}data-async-thumbnail="1"{/if}
143 >
140 <div class="thumbnail"> 144 <div class="thumbnail">
141 {ignore}RainTPL hack: put the 2 src on two different line to avoid path replace bug{/ignore} 145 {ignore}RainTPL hack: put the 2 src on two different line to avoid path replace bug{/ignore}
142 <a href="{$value.real_url}" aria-hidden="true" tabindex="-1"> 146 <a href="{$value.real_url}" aria-hidden="true" tabindex="-1">
@@ -158,7 +162,7 @@
158 </div> 162 </div>
159 163
160 <h2> 164 <h2>
161 <a href="{$value.real_url}"> 165 <a href="{$value.real_url}" class="linklist-real-url">
162 {if="strpos($value.url, $value.shorturl) === false"} 166 {if="strpos($value.url, $value.shorturl) === false"}
163 <i class="fa fa-external-link" aria-hidden="true"></i> 167 <i class="fa fa-external-link" aria-hidden="true"></i>
164 {else} 168 {else}
@@ -308,5 +312,6 @@
308 312
309{include="page.footer"} 313{include="page.footer"}
310<script src="{$asset_path}/js/thumbnails.min.js?v={$version_hash}#"></script> 314<script src="{$asset_path}/js/thumbnails.min.js?v={$version_hash}#"></script>
315{if="$is_logged_in && $async_metadata"}<script src="{$asset_path}/js/metadata.min.js?v={$version_hash}#"></script>{/if}
311</body> 316</body>
312</html> 317</html>