feat: ajouter classe loading-input pour animation de chargement des métadonnées, classe lf_input aux champs URL et titre pour ciblage JavaScript, et inclusion conditionnelle du script metadata.min.js avec versioning pour nouveaux liens avec métadonnées asynchrones
This commit is contained in:
parent
5b6b0fd163
commit
5bf384a8d6
@ -11,7 +11,7 @@
|
||||
{ignore}Lil hack: when included in a loop in batch mode, `$value` is assigned by RainTPL with template vars.{/ignore}
|
||||
{function="extract($value) ? '' : ''"}
|
||||
{/if}
|
||||
{$asyncLoadClass=$link_is_new && $async_metadata && empty($link.title) ? 'loading-wrapper' : ''}
|
||||
{$asyncLoadClass=$link_is_new && $async_metadata && empty($link.title) ? 'loading-wrapper loading-input' : ''}
|
||||
{if="!isset($index)"}
|
||||
{$index=""}
|
||||
{/if}
|
||||
@ -48,12 +48,12 @@
|
||||
<div class="card-body">
|
||||
<div class="form-group bookmark-field-group">
|
||||
<label class="form-label" for="lf_url{$index}">{'URL'|t}</label>
|
||||
<input type="text" class="form-control" name="lf_url" id="lf_url{$index}" value="{$link.url}" placeholder="https://...">
|
||||
<input type="text" class="form-control lf_input" name="lf_url" id="lf_url{$index}" value="{$link.url}" placeholder="https://...">
|
||||
</div>
|
||||
<div class="form-group bookmark-field-group">
|
||||
<label class="form-label" for="lf_title{$index}">{'Title'|t}</label>
|
||||
<div class="{$asyncLoadClass}">
|
||||
<input type="text" class="form-control{if="empty($batch_mode) && $link.title==''"} autofocus{/if}" name="lf_title" id="lf_title{$index}" value="{$link.title}" placeholder="Page title">
|
||||
<input type="text" class="form-control lf_input{if="empty($batch_mode) && $link.title==''"} autofocus{/if}" name="lf_title" id="lf_title{$index}" value="{$link.title}" placeholder="Page title">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group bookmark-field-group">
|
||||
@ -121,6 +121,7 @@
|
||||
</div>
|
||||
{if="empty($batch_mode)"}
|
||||
{include="page.footer"}
|
||||
{if="$link_is_new && $async_metadata"}<script src="{$index_url}js/metadata.min.js?v={$version_hash}"></script>{/if}
|
||||
{/if}
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user