templates/company/category.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}Company index{% endblock %}
  3. {% block body %}
  4. <style>.company-card {
  5.       background: white;
  6.       border: 1px solid #ddd;
  7.       border-radius: 0.5rem;
  8.       padding: 1rem;
  9.       margin-bottom: 1rem;
  10.     }
  11.     .tag {
  12.       background-color: #e9ecef;
  13.       padding: 0.25rem 0.75rem;
  14.       border-radius: 1rem;
  15.       font-size: 0.8rem;
  16.       margin-right: 0.5rem;
  17.     }</style>
  18.     <h1>List of companies</h1>
  19.      <div class="row">
  20.     <!-- Sidebar -->
  21.     <div class="col-md-3 card">
  22.       <h5>Filter Manufacturers by category</h5>
  23.       <ul>
  24.         <li><a href="{{ path('company_by_category', { categorySlug: 'medical-and-health-equipment' }) }}">Medical and Health Equipment</a></li>
  25.         <li><a href="{{ path('company_by_category', { categorySlug: 'renewable-energy' }) }}">Renewable Energy</a></li>
  26.         <li><a href="{{ path('company_by_category', { categorySlug: 'chemicals-and-materials' }) }}">chemicals and materials</a></li>
  27.         
  28.       </ul>
  29.     </div>
  30.     <!-- Content -->
  31.     <div class="col-md-9">
  32.     {% for company in companies %}
  33.       <div class="company-card d-flex align-items-start">
  34.       <img src="https://placehold.co/80" alt="Logo" class="rounded-circle mr-2 logo me-3">
  35.       <div class="flex-grow-1">
  36.         <div class="d-flex justify-content-between align-items-start">
  37.           <div>
  38.             <h5 class="text-primary">{{ company.Name }}</h5>
  39.             <div class="text-warning">★★★★★ <span class="text-muted">(48)</span></div>
  40.             <p class="mb-1">{{company.industry}}</p>
  41.             <span class="tag">{{ company.website }}</span>
  42.             <span class="tag">{{ company.phone }}</span>
  43.           </div>
  44.           <a href="{{ path('app_company_show', {'id': company.id}) }}" class="btn btn-warning">VIEW PROFILE</a>
  45.         </div>
  46.       </div>
  47.       </div>
  48.     
  49.       {% else %}
  50.                     <tr>
  51.                         <td colspan="8">no records found</td>
  52.                     </tr>
  53.                 {% endfor %}
  54.     </div>
  55.   </div>
  56. {% endblock %}