Make news footer responsive

This commit is contained in:
Michael Weimann 2023-08-15 21:59:41 +02:00 committed by msquare
parent 6c3bb7521f
commit e03f2936e7
1 changed files with 17 additions and 16 deletions

View File

@ -66,34 +66,35 @@
{% endif %} {% endif %}
</div> </div>
<div class="card-footer {% if theme.type =='light' %}bg-light{% else %}bg-dark{% endif %} text-muted"> <div class="card-footer text-nowrap {% if theme.type =='light' %}bg-light{% else %}bg-dark{% endif %} text-muted">
{% if news.updated_at != news.created_at and not is_overview %} <div class="d-flex flex-column flex-md-row align-items-md-center gap-3">
<div class="d-flex align-items-center"> {% if news.updated_at != news.created_at and not is_overview %}
<div class="me-3"> <div>
{{ m.icon('clock') }} {{ news.updated_at.format(__('Y-m-d H:i')) }} {{ m.icon('clock') }} {{ news.updated_at.format(__('Y-m-d H:i')) }}
{{ __('news.updated') }}
</div> </div>
{{ __('news.updated') }} {% endif %}
</div>
{% endif %} <div>
<div class="d-flex align-items-center">
<div class="me-3">
{{ m.icon('clock') }} {{ news.created_at.format(__('Y-m-d H:i')) }} {{ m.icon('clock') }} {{ news.created_at.format(__('Y-m-d H:i')) }}
</div> </div>
<div class="me-3"> <div class="text-truncate">
{{ m.user(news.user) }} {{ m.user(news.user) }}
</div> </div>
{% if show_comments_link|default(false) %} {% if show_comments_link|default(false) %}
<a href="{{ url('news/' ~ news.id) }}" class="me-1"> <div>
{{ m.icon('chat-left-text') }} {{ __('news.comments') }} <a href="{{ url('news/' ~ news.id) }}" class="me-1">
</a> {{ m.icon('chat-left-text') }} {{ __('news.comments') }}
<span class="badge bg-primary">{{ news.comments.count() }}</span> </a>
{{ m.icon('chevron-double-right', 'primary') }} <span class="badge bg-primary">{{ news.comments.count() }}</span>
{{ m.icon('chevron-double-right', 'primary') }}
</div>
{% endif %} {% endif %}
{% if has_permission_to('admin_news') %} {% if has_permission_to('admin_news') %}
<div class="ms-auto"> <div>
{{ m.button(m.icon('pencil'), url('admin/news/' ~ news.id), 'secondary', 'sm') }} {{ m.button(m.icon('pencil'), url('admin/news/' ~ news.id), 'secondary', 'sm') }}
</div> </div>
{% endif %} {% endif %}