aboutsummaryrefslogtreecommitdiffhomepage
path: root/tpl/vintage/linklist.html
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/vintage/linklist.html
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/vintage/linklist.html')
-rw-r--r--tpl/vintage/linklist.html7
1 files changed, 4 insertions, 3 deletions
diff --git a/tpl/vintage/linklist.html b/tpl/vintage/linklist.html
index 00896eb5..90f5cf8f 100644
--- a/tpl/vintage/linklist.html
+++ b/tpl/vintage/linklist.html
@@ -77,10 +77,10 @@
77 {/if} 77 {/if}
78 <ul> 78 <ul>
79 {loop="$links"} 79 {loop="$links"}
80 <li{if="$value.class"} class="{$value.class}"{/if}> 80 <li{if="$value.class"} class="{$value.class}"{/if} data-id="{$value.id}">
81 <a id="{$value.shorturl}"></a> 81 <a id="{$value.shorturl}"></a>
82 {if="$thumbnails_enabled && !empty($value.thumbnail)"} 82 {if="$thumbnails_enabled && $value.thumbnail !== false"}
83 <div class="thumbnail"> 83 <div class="thumbnail" {if="$value.thumbnail === null"}data-async-thumbnail="1"{/if}>
84 <a href="{$value.real_url}"> 84 <a href="{$value.real_url}">
85 {ignore}RainTPL hack: put the 2 src on two different line to avoid path replace bug{/ignore} 85 {ignore}RainTPL hack: put the 2 src on two different line to avoid path replace bug{/ignore}
86 <img data-src="{$base_path}/{$value.thumbnail}#" class="b-lazy" 86 <img data-src="{$base_path}/{$value.thumbnail}#" class="b-lazy"
@@ -153,6 +153,7 @@
153 153
154 {include="page.footer"} 154 {include="page.footer"}
155<script src="{$asset_path}/js/thumbnails.min.js#"></script> 155<script src="{$asset_path}/js/thumbnails.min.js#"></script>
156{if="$is_logged_in && $async_metadata"}<script src="{$asset_path}/js/metadata.min.js?v={$version_hash}#"></script>{/if}
156 157
157</body> 158</body>
158</html> 159</html>