Files
comment/templates/last_comments.tpl

60 lines
2.9 KiB
Smarty
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<div class="last-comments-widget" style="max-width: 400px;">
<h4 class="widget-title mb-4" style="font-weight: 700; border-left: 4px solid #0d6efd; padding-left: 15px; line-height: 1.2;">Свежие отзывы</h4>
<div class="list-group list-group-flush">
{foreach from=$last_comments_items item=c}
<div class="list-group-item bg-transparent px-0 py-3 border-bottom" style="border-color: #f0f0f0 !important;">
<div class="d-flex align-items-start mb-2">
<div class="lc-avatar-wrapper">
{if $c.avatar}
<img src="{$c.avatar}" alt="{$c.comment_author_name|escape}">
{else}
<div class="lc-letter-circle av-c{$c.avatar_color_index|default:1}">
{$c.first_letter|default:'?'|upper}
</div>
{/if}
</div>
<div class="flex-grow-1 min-w-0">
<div class="d-flex justify-content-between align-items-start">
<div>
<strong style="color: #333; font-size: 0.95rem; display: block; line-height: 1.2;">
{$c.comment_author_name}
{if $c.parent_id > 0}
<span class="lc-reply-label">
<i class="bi bi-reply-all-fill text-primary"></i> ответил(а)
</span>
{/if}
</strong>
{if $c.stars}
<div class="d-flex align-items-center" style="margin-top: 3px; line-height: 1;">
{$c.stars}
</div>
{/if}
</div>
<span class="text-muted" style="font-size: 0.7rem; white-space: nowrap;">
<i class="bi bi-clock me-1"></i>{$c.date}
</span>
</div>
</div>
</div>
<div style="margin-left: 54px;">
<div class="mb-2">
<a href="{$c.link}" class="text-decoration-none d-flex align-items-center fw-medium" style="color: #0d6efd; font-size: 0.85rem;">
<i class="bi bi-file-earmark-text me-1 text-secondary"></i>
<span class="text-truncate">{$c.document_title}</span>
</a>
</div>
<div style="color: #444; font-size: 0.9rem; line-height: 1.4; background: #f9f9f9; padding: 10px 12px; border-radius: 0 8px 8px 8px; border-left: 2px solid #0d6efd;">
«{$c.comment_text}»
</div>
</div>
</div>
{/foreach}
</div>
</div>