diff options
author | ArthurHoaro <arthur@hoa.ro> | 2016-11-09 18:57:02 +0100 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2018-07-05 20:31:35 +0200 |
commit | 1b93137e16694f52952c930848e1a7928e8a00a6 (patch) | |
tree | 3d2c69d1c3bd1a85e1e46b04c55fc3978b5ebde8 /tpl | |
parent | edb4a4d9c9fbc01d67ee8d095fe26648714e2285 (diff) | |
download | Shaarli-1b93137e16694f52952c930848e1a7928e8a00a6.tar.gz Shaarli-1b93137e16694f52952c930848e1a7928e8a00a6.tar.zst Shaarli-1b93137e16694f52952c930848e1a7928e8a00a6.zip |
Use web-thumbnailer to retrieve thumbnails
* requires PHP 5.6
* use blazy on linklist since a lot more thumbs are retrieved
* thumbnails can be disabled
* thumbs size is now 120x120
* thumbs are now cropped to fit the expected size
Fixes #345 #425 #487 #543 #588 #590
Diffstat (limited to 'tpl')
-rw-r--r-- | tpl/vintage/configure.html | 12 | ||||
-rw-r--r-- | tpl/vintage/linklist.html | 11 | ||||
-rw-r--r-- | tpl/vintage/picwall.html | 6 |
3 files changed, 27 insertions, 2 deletions
diff --git a/tpl/vintage/configure.html b/tpl/vintage/configure.html index 479284eb..e47c71ad 100644 --- a/tpl/vintage/configure.html +++ b/tpl/vintage/configure.html | |||
@@ -128,6 +128,18 @@ | |||
128 | <input type="text" name="apiSecret" id="apiSecret" size="50" value="{$api_secret}" /> | 128 | <input type="text" name="apiSecret" id="apiSecret" size="50" value="{$api_secret}" /> |
129 | </td> | 129 | </td> |
130 | </tr> | 130 | </tr> |
131 | <tr> | ||
132 | <td valign="top"><b>Enable thumbnails</b></td> | ||
133 | <td> | ||
134 | <input type="checkbox" name="enableThumbnails" id="enableThumbnails" | ||
135 | {if="$thumbnails_enabled"}checked{/if}/> | ||
136 | <label for="enableThumbnails"> | ||
137 | <strong>Warning:</strong> | ||
138 | If you have a large database, the first retrieval may take a few minutes. | ||
139 | It's recommended to visit the picture wall after enabling this feature | ||
140 | </label> | ||
141 | </td> | ||
142 | </tr> | ||
131 | 143 | ||
132 | <tr> | 144 | <tr> |
133 | <td></td> | 145 | <td></td> |
diff --git a/tpl/vintage/linklist.html b/tpl/vintage/linklist.html index 1ca51be3..9bdafa8c 100644 --- a/tpl/vintage/linklist.html +++ b/tpl/vintage/linklist.html | |||
@@ -80,7 +80,16 @@ | |||
80 | {loop="$links"} | 80 | {loop="$links"} |
81 | <li{if="$value.class"} class="{$value.class}"{/if}> | 81 | <li{if="$value.class"} class="{$value.class}"{/if}> |
82 | <a id="{$value.shorturl}"></a> | 82 | <a id="{$value.shorturl}"></a> |
83 | <div class="thumbnail">{$value.url|thumbnail}</div> | 83 | {if="$thumbnails_enabled && !empty($value.thumbnail)"} |
84 | <div class="thumbnail"> | ||
85 | <a href="{$value.real_url}"> | ||
86 | {ignore}RainTPL hack: put the 2 src on two different line to avoid path replace bug{/ignore} | ||
87 | <img data-src="{$value.thumbnail}#" class="b-lazy" | ||
88 | src="#" | ||
89 | alt="thumbnail" width="{$thumbnails_width}" height="{$thumbnails_height}" /> | ||
90 | </a> | ||
91 | </div> | ||
92 | {/if} | ||
84 | <div class="linkcontainer"> | 93 | <div class="linkcontainer"> |
85 | {if="$is_logged_in"} | 94 | {if="$is_logged_in"} |
86 | <div class="linkeditbuttons"> | 95 | <div class="linkeditbuttons"> |
diff --git a/tpl/vintage/picwall.html b/tpl/vintage/picwall.html index 29688914..2ac11ec2 100644 --- a/tpl/vintage/picwall.html +++ b/tpl/vintage/picwall.html | |||
@@ -15,7 +15,11 @@ | |||
15 | <div id="picwall_container"> | 15 | <div id="picwall_container"> |
16 | {loop="$linksToDisplay"} | 16 | {loop="$linksToDisplay"} |
17 | <div class="picwall_pictureframe"> | 17 | <div class="picwall_pictureframe"> |
18 | {$value.thumbnail}<a href="{$value.real_url}"><span class="info">{$value.title}</span></a> | 18 | {ignore}RainTPL hack: put the 2 src on two different line to avoid path replace bug{/ignore} |
19 | <img data-src="{$value.thumbnail}#" class="b-lazy" | ||
20 | src="#" | ||
21 | alt="thumbnail" width="{$thumbnails_width}" height="{$thumbnails_height}" /> | ||
22 | <a href="{$value.real_url}"><span class="info">{$value.title}</span></a> | ||
19 | {loop="$value.picwall_plugin"} | 23 | {loop="$value.picwall_plugin"} |
20 | {$value} | 24 | {$value} |
21 | {/loop} | 25 | {/loop} |