templates/bo/home/_widget_card.html.twig line 1

Open in your IDE?
  1. {#
  2. EXEMPLE
  3. {% include 'bo/home/_widget_card.html.twig' with {
  4. 'widgetTitle' : "TITLE",
  5. 'widgetNumber' : "NUMBER",
  6. 'widgetRouteLink' : 'SYMFONY NAME ROUTE',
  7. 'widgetRouteQuery' : 'SYMFONY QUERY ROUTE (q)',
  8. 'widgetIncrease' : 'INCREASE NUMBER',
  9. 'bootstrapIconName' : 'BOOSTRAP ICON ex : (calendar-date-fill)',
  10. 'bootstrapIconColor' : 'BOOSTRAP COLOR ex : (success)'}%}
  11. #}
  12. <div class="col-lg-3 col-md-3 col-sm-6 col-12">
  13.     {% if widgetRouteLink != "" %}
  14.         {% if widgetRouteQuery != "" %}
  15.                <a href={{ path(widgetRouteLink, {'q': widgetRouteQuery}) }}>
  16.         {% else %}
  17.                <a href={{ path(widgetRouteLink) }}>
  18.         {% endif %}
  19.     {% endif %}
  20.         <div class="col-xl-12">
  21.             <div class="card custom-card">
  22.                 <div class="card-body">
  23.                     <div class="d-flex flex-wrap align-items-top justify-content-between">
  24.                         <div class="flex-fill">
  25.                             <p class="mb-0 text-muted">{{ widgetTitle }}</p>
  26.                             <div class="d-flex align-items-center">
  27.                                 <span class="fs-5 fw-semibold">{{ widgetNumber }}</span>
  28.                                 {% if widgetIncrease != "" %}
  29.                                     <span class="fs-12 text-success ms-2"><i
  30.                                                 class="ti ti-trending-up me-1 d-inline-block"></i>{{ widgetIncrease }}</span>
  31.                                 {% endif %}
  32.                             </div>
  33.                         </div>
  34.                         <div>
  35.                                                 <span class="avatar avatar-md avatar-rounded bg-{{ bootstrapIconColor }}-transparent text-{{ bootstrapIconColor }} fs-18">
  36.                                                     <i class="bi bi-{{ bootstrapIconName }} fs-16"></i>
  37.                                                 </span>
  38.                         </div>
  39.                     </div>
  40.                 </div>
  41.             </div>
  42.         </div>
  43.         {% if widgetRouteLink != "" %}
  44.     </a>
  45.     {% endif %}
  46. </div>