feat(spa): show navbar with app logo and app name

This commit is contained in:
2025-10-25 18:48:47 +03:00
parent ed8592c19d
commit c3c0d6d2c1
9 changed files with 174 additions and 76 deletions

View File

@@ -85,9 +85,9 @@
{# Image #}
{% elseif item['type'] == 'image' %}
<a href="" id="thumb-image" data-toggle="image" class="img-thumbnail">
<a href="" id="thumb-image-{{ settingKey }}" data-toggle="image" class="img-thumbnail">
<img src="{{ attribute(_context, settingKey) }}"
data-placeholder="{{ attribute(_context, settingKey) }}"
data-placeholder="https://placehold.co/100x100?text=Удалено"
/>
</a>
<input type="hidden"
@@ -95,8 +95,7 @@
value="{{ attribute(_context, settingKey) }}"
id="{{ settingKey }}"
/>
{# Image #}
{# Textarea #}
{% elseif item['type'] == 'textarea' %}
<textarea name="{{ settingKey }}"
rows="{{ item['rows'] }}"
@@ -104,7 +103,6 @@
id="{{ settingKey }}"
class="form-control"
>{{ attribute(_context, settingKey) }}</textarea>
{# Products #}
{% elseif item['type'] == 'products' %}
<input type="text" value="" placeholder="Начните вводить название товара..." id="{{ settingKey }}-input" class="form-control"/>
@@ -450,4 +448,13 @@
</div>
</div>
</div>
{{ footer }}
{{ footer }}
<script>
const $element = $('#thumb-image-module_tgshop_app_icon');
$('#button-clear').on('click', function() {
$element.find('img').attr('src', $element.find('img').attr('data-placeholder'));
$element.parent().find('input').val('');
$element.popover('destroy');
});
</script>