Use type_bg_class() macro in templates
This commit is contained in:
parent
f7b0ee9ebb
commit
bcfcb95786
|
@ -61,7 +61,7 @@
|
|||
<div class="col-md-12">
|
||||
<h2>{{ __('form.preview') }}</h2>
|
||||
|
||||
<div class="card {% if theme.type =='light' %}bg-light{% else %}bg-dark{% endif %}">
|
||||
<div class="card {{ m.type_bg_class() }}">
|
||||
<div class="card-header">
|
||||
{{ faq.question }}
|
||||
</div>
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
{% for item in items %}
|
||||
<div class="col-md-12 faq">
|
||||
<span id="faq-{{ item.id }}" class="ref-id"></span>
|
||||
<div class="card {% if theme.type =='light' %}bg-light{% else %}bg-dark{% endif %} mb-4">
|
||||
<div class="card {{ m.type_bg_class() }} mb-4">
|
||||
<h4 class="card-header">
|
||||
{{ item.question }}
|
||||
<small class="text-muted">
|
||||
|
@ -47,7 +47,7 @@
|
|||
{{ item.text|markdown }}
|
||||
</div>
|
||||
|
||||
<div class="card-footer {% if theme.type =='light' %}bg-light{% else %}bg-dark{% endif %} d-flex align-items-center">
|
||||
<div class="card-footer {{ m.type_bg_class() }} d-flex align-items-center">
|
||||
<div class="me-3">
|
||||
{{ m.icon('clock') }} {{ item.updated_at.format(__('general.datetime')) }}
|
||||
</div>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<div class="card-body {{ m.type_bg_class() }}">
|
||||
{{ comment.text|nl2br }}
|
||||
</div>
|
||||
<div class="card-footer {% if theme.type =='light' %}bg-light{% else %}bg-dark{% endif %} text-muted d-flex align-items-center">
|
||||
<div class="card-footer {{ m.type_bg_class() }} text-muted d-flex align-items-center">
|
||||
<div class="me-3">
|
||||
{{ m.icon('clock') }}
|
||||
{{ comment.created_at.format(__('general.datetime')) }}
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
{% endblock %}
|
||||
|
||||
{% macro news(news, show_comments_link, is_overview) %}
|
||||
<div class="card {% if news.is_highlighted %}bg-warning{% elseif news.is_meeting %}bg-info{% elseif theme.type =='light' %}bg-light{% else %}bg-dark{% endif %} mb-4">
|
||||
<div class="card {% if news.is_highlighted %}bg-warning{% elseif news.is_meeting %}bg-info{% else %}{{ m.type_bg_class() }}{% endif %} mb-4">
|
||||
{% if is_overview|default(false) %}
|
||||
<div class="card-header {% if news.is_meeting and theme.type == 'dark' %}text-white{% endif %}">
|
||||
<a href="{{ url('/news/' ~ news.id) }}" class="text-inherit">
|
||||
|
@ -70,7 +70,7 @@
|
|||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="card-footer text-nowrap {% if theme.type =='light' %}bg-light{% else %}bg-dark{% endif %} text-muted">
|
||||
<div class="card-footer text-nowrap {{ m.type_bg_class() }} text-muted">
|
||||
<div class="d-flex flex-column flex-md-row align-items-md-center gap-3">
|
||||
{% if news.updated_at != news.created_at and not is_overview %}
|
||||
<div>
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
{{ question.text|nl2br }}
|
||||
</div>
|
||||
|
||||
<div class="card-footer {% if theme.type =='light' %}bg-light{% else %}bg-dark{% endif %} d-flex align-items-center">
|
||||
<div class="card-footer {{ m.type_bg_class() }} d-flex align-items-center">
|
||||
<div class="me-3">
|
||||
{{ m.icon('clock') }} {{ question.created_at.format(__('general.datetime')) }}
|
||||
</div>
|
||||
|
@ -68,7 +68,7 @@
|
|||
<div class="card-body bg-body {{ m.type_text_class() }}">
|
||||
{{ question.answer|markdown }}
|
||||
</div>
|
||||
<div class="card-footer bg-dark d-flex align-items-center {{ m.type_text_class() }}">
|
||||
<div class="card-footer {{ m.type_bg_class() }} d-flex align-items-center {{ m.type_text_class() }}">
|
||||
<div class="me-3">
|
||||
{{ m.icon('clock') }} {{ question.updated_at.format(__('general.datetime')) }}
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue