aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2020-11-10 10:45:22 +0100
committerGitHub <noreply@github.com>2020-11-10 10:45:22 +0100
commit39b75ea9836054df22a377f0f0f28d6ac9a19dc2 (patch)
treea192e750dc09dad903c14fe3a97d5265c552f4b2
parent7e78237fc9106f5f53802c36ce26be0b44938255 (diff)
parent85c09fe3799db606a3d117c370bc63965e4a8554 (diff)
downloadShaarli-39b75ea9836054df22a377f0f0f28d6ac9a19dc2.tar.gz
Shaarli-39b75ea9836054df22a377f0f0f28d6ac9a19dc2.tar.zst
Shaarli-39b75ea9836054df22a377f0f0f28d6ac9a19dc2.zip
Merge pull request #1636 from ArthurHoaro/fix/vintage-async-metadata
-rw-r--r--assets/vintage/css/shaarli.css61
-rw-r--r--tpl/vintage/daily.html8
-rw-r--r--tpl/vintage/editlink.html32
-rw-r--r--tpl/vintage/page.header.html24
4 files changed, 114 insertions, 11 deletions
diff --git a/assets/vintage/css/shaarli.css b/assets/vintage/css/shaarli.css
index 1688dce0..33e178af 100644
--- a/assets/vintage/css/shaarli.css
+++ b/assets/vintage/css/shaarli.css
@@ -1122,6 +1122,16 @@ ul.errors {
1122 float: left; 1122 float: left;
1123} 1123}
1124 1124
1125ul.warnings {
1126 color: orange;
1127 float: left;
1128}
1129
1130ul.successes {
1131 color: green;
1132 float: left;
1133}
1134
1125#pluginsadmin { 1135#pluginsadmin {
1126 width: 80%; 1136 width: 80%;
1127 padding: 20px 0 0 20px; 1137 padding: 20px 0 0 20px;
@@ -1248,3 +1258,54 @@ ul.errors {
1248 width: 0%; 1258 width: 0%;
1249 height: 10px; 1259 height: 10px;
1250} 1260}
1261
1262.loading-input {
1263 position: relative;
1264}
1265
1266@keyframes around {
1267 0% {
1268 transform: rotate(0deg);
1269 }
1270
1271 100% {
1272 transform: rotate(360deg);
1273 }
1274}
1275
1276.loading-input .icon-container {
1277 position: absolute;
1278 right: 60px;
1279 top: calc(50% - 10px);
1280}
1281
1282.loading-input .loader {
1283 position: relative;
1284 height: 20px;
1285 width: 20px;
1286 display: inline-block;
1287 animation: around 5.4s infinite;
1288}
1289
1290.loading-input .loader::after,
1291.loading-input .loader::before {
1292 content: "";
1293 background: #eee;
1294 position: absolute;
1295 display: inline-block;
1296 width: 100%;
1297 height: 100%;
1298 border-width: 2px;
1299 border-color: #333 #333 transparent transparent;
1300 border-style: solid;
1301 border-radius: 20px;
1302 box-sizing: border-box;
1303 top: 0;
1304 left: 0;
1305 animation: around 0.7s ease-in-out infinite;
1306}
1307
1308.loading-input .loader::after {
1309 animation: around 0.7s ease-in-out 0.1s infinite;
1310 background: transparent;
1311}
diff --git a/tpl/vintage/daily.html b/tpl/vintage/daily.html
index 74f6cdc7..28ba9f90 100644
--- a/tpl/vintage/daily.html
+++ b/tpl/vintage/daily.html
@@ -14,9 +14,9 @@
14 14
15 <div class="dailyAbout"> 15 <div class="dailyAbout">
16 All links of one day<br>in a single page.<br> 16 All links of one day<br>in a single page.<br>
17 {if="$previousday"} <a href="{$base_path}/daily&amp;day={$previousday}"><b>&lt;</b>Previous day</a>{else}<b>&lt;</b>Previous day{/if} 17 {if="$previousday"} <a href="{$base_path}/daily?day={$previousday}"><b>&lt;</b>Previous day</a>{else}<b>&lt;</b>Previous day{/if}
18 - 18 -
19 {if="$nextday"}<a href="{$base_path}/daily&amp;day={$nextday}">Next day<b>&gt;</b></a>{else}Next day<b>&gt;</b>{/if} 19 {if="$nextday"}<a href="{$base_path}/daily?day={$nextday}">Next day<b>&gt;</b></a>{else}Next day<b>&gt;</b>{/if}
20 <br> 20 <br>
21 21
22 {loop="$daily_about_plugin"} 22 {loop="$daily_about_plugin"}
@@ -52,13 +52,13 @@
52 {$link=$value} 52 {$link=$value}
53 <div class="dailyEntry"> 53 <div class="dailyEntry">
54 <div class="dailyEntryPermalink"> 54 <div class="dailyEntryPermalink">
55 <a href="{$base_path}/?{$value.shorturl}"> 55 <a href="{$base_path}/shaare/{$value.shorturl}">
56 <img src="{$asset_path}/img/squiggle.png#" width="25" height="26" title="permalink" alt="permalink"> 56 <img src="{$asset_path}/img/squiggle.png#" width="25" height="26" title="permalink" alt="permalink">
57 </a> 57 </a>
58 </div> 58 </div>
59 {if="!$hide_timestamps || $is_logged_in"} 59 {if="!$hide_timestamps || $is_logged_in"}
60 <div class="dailyEntryLinkdate"> 60 <div class="dailyEntryLinkdate">
61 <a href="{$base_path}/?{$value.shorturl}">{function="strftime('%c', $link.timestamp)"}</a> 61 <a href="{$base_path}/shaare/{$value.shorturl}">{function="strftime('%c', $link.timestamp)"}</a>
62 </div> 62 </div>
63 {/if} 63 {/if}
64 {if="$link.tags"} 64 {if="$link.tags"}
diff --git a/tpl/vintage/editlink.html b/tpl/vintage/editlink.html
index eb8807b5..343418bc 100644
--- a/tpl/vintage/editlink.html
+++ b/tpl/vintage/editlink.html
@@ -6,6 +6,7 @@
6{if="$link.title==''"}onload="document.linkform.lf_title.focus();" 6{if="$link.title==''"}onload="document.linkform.lf_title.focus();"
7{elseif="$link.description==''"}onload="document.linkform.lf_description.focus();" 7{elseif="$link.description==''"}onload="document.linkform.lf_description.focus();"
8{else}onload="document.linkform.lf_tags.focus();"{/if} > 8{else}onload="document.linkform.lf_tags.focus();"{/if} >
9{$asyncLoadClass=$link_is_new && $async_metadata && empty($link.title) ? 'loading-input' : ''}
9<div id="pageheader"> 10<div id="pageheader">
10 {include="page.header"} 11 {include="page.header"}
11 <div id="shaarli_title"><a href="{$titleLink}">{$shaarlititle}</a></div> 12 <div id="shaarli_title"><a href="{$titleLink}">{$shaarlititle}</a></div>
@@ -14,12 +15,29 @@
14 {if="isset($link.id)"} 15 {if="isset($link.id)"}
15 <input type="hidden" name="lf_id" value="{$link.id}"> 16 <input type="hidden" name="lf_id" value="{$link.id}">
16 {/if} 17 {/if}
17 <label for="lf_url"><i>URL</i></label><br><input type="text" name="lf_url" id="lf_url" value="{$link.url}" class="lf_input"><br> 18 <label for="lf_url"><i>URL</i></label><br><input type="text" name="lf_url" id="lf_url" value="{$link.url}" class="lf_input">
18 <label for="lf_title"><i>Title</i></label><br><input type="text" name="lf_title" id="lf_title" value="{$link.title}" class="lf_input"><br> 19 <label for="lf_title"><i>Title</i></label>
19 <label for="lf_description"><i>Description</i></label><br><textarea name="lf_description" id="lf_description" rows="4" cols="25">{$link.description}</textarea><br> 20 <div class="{$asyncLoadClass}">
20 <label for="lf_tags"><i>Tags</i></label><br> 21 <input type="text" name="lf_title" id="lf_title" value="{$link.title}" class="lf_input">
21 <input type="text" name="lf_tags" id="lf_tags" value="{$link.tags}" class="lf_input" 22 <div class="icon-container">
22 data-list="{loop="$tags"}{$key}, {/loop}" data-multiple autocomplete="off" ><br> 23 <i class="loader"></i>
24 </div>
25 </div>
26 <label for="lf_description"><i>Description</i></label>
27 <div class="{if="$retrieve_description"}{$asyncLoadClass}{/if}">
28 <textarea name="lf_description" id="lf_description" rows="4" cols="25">{$link.description}</textarea>
29 <div class="icon-container">
30 <i class="loader"></i>
31 </div>
32 </div>
33 <label for="lf_tags"><i>Tags</i></label>
34 <div class="{if="$retrieve_description"}{$asyncLoadClass}{/if}">
35 <input type="text" name="lf_tags" id="lf_tags" value="{$link.tags}" class="lf_input"
36 data-list="{loop="$tags"}{$key}, {/loop}" data-multiple autocomplete="off" >
37 <div class="icon-container">
38 <i class="loader"></i>
39 </div>
40 </div>
23 41
24 {if="$formatter==='markdown'"} 42 {if="$formatter==='markdown'"}
25 <div class="md_help"> 43 <div class="md_help">
@@ -56,5 +74,5 @@
56 </div> 74 </div>
57</div> 75</div>
58{include="page.footer"} 76{include="page.footer"}
59</body> 77{if="$link_is_new && $async_metadata"}<script src="{$asset_path}/js/metadata.min.js?v={$version_hash}#"></script>{/if}</body>
60</html> 78</html>
diff --git a/tpl/vintage/page.header.html b/tpl/vintage/page.header.html
index 0a33523b..64d7f656 100644
--- a/tpl/vintage/page.header.html
+++ b/tpl/vintage/page.header.html
@@ -54,6 +54,30 @@
54 </ul> 54 </ul>
55{/if} 55{/if}
56 56
57{if="!empty($global_errors)"}
58 <ul class="errors">
59 {loop="$global_errors"}
60 <li>{$value}</li>
61 {/loop}
62 </ul>
63{/if}
64
65{if="!empty($global_warnings)"}
66 <ul class="warnings">
67 {loop="$global_warnings"}
68 <li>{$value}</li>
69 {/loop}
70 </ul>
71{/if}
72
73{if="!empty($global_successes)"}
74 <ul class="successes">
75 {loop="$global_successes"}
76 <li>{$value}</li>
77 {/loop}
78 </ul>
79{/if}
80
57<div class="clear"></div> 81<div class="clear"></div>
58 82
59 83