diff options
author | ArthurHoaro <arthur@hoa.ro> | 2018-07-28 09:41:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-28 09:41:29 +0200 |
commit | ad5f47adbaee1eef85e90950ab8a45fe82959924 (patch) | |
tree | d23a186661db00d36cb2b2287a7bf890fbc62cfb /tpl/vintage | |
parent | 8fdd65b88412a0db28c723a486650c434fe5668c (diff) | |
parent | 7b4fea0e39be9e74e9aef13e73af9bbd2b1a6397 (diff) | |
download | Shaarli-ad5f47adbaee1eef85e90950ab8a45fe82959924.tar.gz Shaarli-ad5f47adbaee1eef85e90950ab8a45fe82959924.tar.zst Shaarli-ad5f47adbaee1eef85e90950ab8a45fe82959924.zip |
Merge pull request #687 from ArthurHoaro/web-thumb
Use web-thumbnailer to retrieve thumbnails
Diffstat (limited to 'tpl/vintage')
-rw-r--r-- | tpl/vintage/configure.html | 23 | ||||
-rw-r--r-- | tpl/vintage/linklist.html | 12 | ||||
-rw-r--r-- | tpl/vintage/picwall.html | 8 | ||||
-rw-r--r-- | tpl/vintage/thumbnails.html | 28 |
4 files changed, 68 insertions, 3 deletions
diff --git a/tpl/vintage/configure.html b/tpl/vintage/configure.html index 479284eb..9466c235 100644 --- a/tpl/vintage/configure.html +++ b/tpl/vintage/configure.html | |||
@@ -128,6 +128,29 @@ | |||
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 | <select name="enableThumbnails" id="enableThumbnails" class="align"> | ||
135 | <option value="all" {if="$thumbnails_mode=='all'"}selected{/if}> | ||
136 | {'All'|t} | ||
137 | </option> | ||
138 | <option value="common" {if="$thumbnails_mode=='common'"}selected{/if}> | ||
139 | {'Only common media hosts'|t} | ||
140 | </option> | ||
141 | <option value="none" {if="$thumbnails_mode=='none'"}selected{/if}> | ||
142 | {'None'|t} | ||
143 | </option> | ||
144 | </select> | ||
145 | <label for="enableThumbnails"> | ||
146 | {if="! $gd_enabled"} | ||
147 | {'You need to enable the extension <code>php-gd</code> to use thumbnails.'|t} | ||
148 | {elseif="$thumbnails_enabled"} | ||
149 | <a href="?do=thumbs_update">{'Synchonize thumbnails'|t}</a> | ||
150 | {/if} | ||
151 | </label> | ||
152 | </td> | ||
153 | </tr> | ||
131 | 154 | ||
132 | <tr> | 155 | <tr> |
133 | <td></td> | 156 | <td></td> |
diff --git a/tpl/vintage/linklist.html b/tpl/vintage/linklist.html index 1ca51be3..3f202849 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"> |
@@ -145,6 +154,7 @@ | |||
145 | </div> | 154 | </div> |
146 | 155 | ||
147 | {include="page.footer"} | 156 | {include="page.footer"} |
157 | <script src="js/thumbnails.min.js"></script> | ||
148 | 158 | ||
149 | </body> | 159 | </body> |
150 | </html> | 160 | </html> |
diff --git a/tpl/vintage/picwall.html b/tpl/vintage/picwall.html index 29688914..5f1d266e 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} |
@@ -34,6 +38,6 @@ | |||
34 | 38 | ||
35 | {include="page.footer"} | 39 | {include="page.footer"} |
36 | 40 | ||
37 | <script src="js/picwall.min.js"></script> | 41 | <script src="js/thumbnails.min.js"></script> |
38 | </body> | 42 | </body> |
39 | </html> | 43 | </html> |
diff --git a/tpl/vintage/thumbnails.html b/tpl/vintage/thumbnails.html new file mode 100644 index 00000000..79aebf8d --- /dev/null +++ b/tpl/vintage/thumbnails.html | |||
@@ -0,0 +1,28 @@ | |||
1 | <!DOCTYPE html> | ||
2 | <html> | ||
3 | <head>{include="includes"}</head> | ||
4 | <body> | ||
5 | <div id="pageheader"> | ||
6 | {include="page.header"} | ||
7 | </div> | ||
8 | |||
9 | <div class="center thumbnails-update-container"> | ||
10 | <div class="thumbnail-placeholder" style="width: {$thumbnails_width}px; height: {$thumbnails_height}px;"></div> | ||
11 | |||
12 | <div class="thumbnail-link-title"></div> | ||
13 | |||
14 | <div class="progressbar"> | ||
15 | <div></div> | ||
16 | </div> | ||
17 | |||
18 | <div class="progress-counter"> | ||
19 | <span class="progress-current">0</span> / <span class="progress-total">{$ids|count}</span> | ||
20 | </div> | ||
21 | </div> | ||
22 | |||
23 | <input type="hidden" name="ids" value="{function="implode($ids, ',')"}" /> | ||
24 | |||
25 | {include="page.footer"} | ||
26 | <script src="js/thumbnails_update.min.js?v={$version_hash}"></script> | ||
27 | </body> | ||
28 | </html> | ||