templates/tracking/index.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}AFI Tracking{% endblock %}
  3. {% block body %}
  4.     <style>
  5.         :root {
  6.             --primary: #006E51;
  7.             --primary-dark: #004d39;
  8.             --accent: #F6D155;
  9.             --bg: #f8fafc;
  10.             --text-muted: #64748b;
  11.         }
  12.         body {
  13.             background-color: var(--bg);
  14.             font-family: 'Inter', system-ui, -apple-system, sans-serif;
  15.         }
  16.         /* Card principale */
  17.         .tracking-card {
  18.             background: #fff;
  19.             border-radius: 24px;
  20.             padding: 40px;
  21.             box-shadow: 0 20px 40px rgba(0,0,0,.06);
  22.             border: 1px solid rgba(0,0,0,.03);
  23.             transition: transform 0.3s ease;
  24.         }
  25.         /* Titres */
  26.         .search-title {
  27.             color: var(--primary);
  28.             font-size: 2.2rem;
  29.             font-weight: 800;
  30.             margin-bottom: 4px;
  31.         }
  32.         .brand-subtitle {
  33.             font-size: .75rem;
  34.             letter-spacing: 2px;
  35.             text-transform: uppercase;
  36.             color: var(--text-muted);
  37.             margin-bottom: 35px;
  38.             display: block;
  39.         }
  40.         /* Champs de saisie */
  41.         .input-wrapper {
  42.             display: flex;
  43.             align-items: center;
  44.             height: 58px;
  45.             padding: 0 15px;
  46.             background: #f1f5f9;
  47.             border-radius: 16px;
  48.             border: 2px solid transparent;
  49.             transition: all .3s ease;
  50.         }
  51.         .input-wrapper:focus-within {
  52.             background: #fff;
  53.             border-color: var(--primary);
  54.             box-shadow: 0 0 0 4px rgba(0,110,81,.1);
  55.         }
  56.         .input-icon {
  57.             color: var(--primary);
  58.             opacity: .7;
  59.             margin-right: 12px;
  60.             font-size: 1.1rem;
  61.         }
  62.         .form-control-custom {
  63.             border: none;
  64.             background: transparent;
  65.             outline: none;
  66.             width: 100%;
  67.             font-weight: 500;
  68.             color: #1e293b;
  69.             font-size: 16px; /* Empêche le zoom auto sur iOS */
  70.         }
  71.         select.form-control-custom {
  72.             cursor: pointer;
  73.         }
  74.         /* Bouton de recherche */
  75.         .btn-search {
  76.             background: var(--primary);
  77.             color: #fff;
  78.             font-weight: 700;
  79.             border-radius: 14px;
  80.             padding: 0 28px;
  81.             height: 58px;
  82.             border: none;
  83.             display: flex;
  84.             align-items: center;
  85.             justify-content: center;
  86.             gap: 12px;
  87.             transition: all .3s ease;
  88.             cursor: pointer;
  89.         }
  90.         .btn-search:hover {
  91.             background: var(--primary-dark);
  92.             transform: translateY(-2px);
  93.             color: var(--accent);
  94.             box-shadow: 0 10px 20px rgba(0,110,81,0.2);
  95.         }
  96.         .btn-search:active {
  97.             transform: translateY(0);
  98.         }
  99.         /* Placeholder & Résultats */
  100.         .placeholder-view {
  101.             text-align: center;
  102.             padding: 50px 20px;
  103.             border-radius: 22px;
  104.             border: 2px dashed #e2e8f0;
  105.             background: rgba(255,255,255,.5);
  106.         }
  107.         .placeholder-icon {
  108.             width: 80px;
  109.             height: 80px;
  110.             line-height: 80px;
  111.             border-radius: 50%;
  112.             margin: 0 auto 20px;
  113.             background: #fff;
  114.             color: #cbd5e1;
  115.             font-size: 36px;
  116.             box-shadow: 0 10px 20px rgba(0,0,0,.04);
  117.         }
  118.         /* --- RESPONSIVE OPTIMISÉ --- */
  119.         @media (max-width: 768px) {
  120.             .container {
  121.                 padding-left: 15px;
  122.                 padding-right: 15px;
  123.             }
  124.             .py-5 {
  125.                 padding-top: 2rem !important;
  126.                 padding-bottom: 2rem !important;
  127.             }
  128.             .tracking-card {
  129.                 padding: 25px 20px;
  130.                 border-radius: 20px;
  131.             }
  132.             .search-title {
  133.                 font-size: 1.6rem;
  134.             }
  135.             .brand-subtitle {
  136.                 margin-bottom: 25px;
  137.             }
  138.             .input-wrapper {
  139.                 height: 52px; /* Hauteur réduite pour gagner de la place */
  140.                 border-radius: 12px;
  141.             }
  142.             .btn-search {
  143.                 height: 54px;
  144.                 width: 100%;
  145.                 border-radius: 12px;
  146.             }
  147.             .placeholder-view {
  148.                 padding: 30px 15px;
  149.                 margin-top: 25px !important;
  150.             }
  151.             .placeholder-icon {
  152.                 width: 60px;
  153.                 height: 60px;
  154.                 line-height: 60px;
  155.                 font-size: 28px;
  156.             }
  157.         }
  158.     </style>
  159.     <div class="container py-5">
  160.         <div class="row justify-content-center">
  161.             <div class="col-xl-8 col-lg-10 col-12">
  162.                 <div class="tracking-card text-center">
  163.                     <h2 class="search-title">Track Your Goods</h2>
  164.                     <span class="brand-subtitle">AFI Import Export Ltd</span>
  165.                     <form id="formTrack"
  166.                           action="{{ path('tracking_query') }}"
  167.                           method="POST"
  168.                           class="mt-2">
  169.                         <div class="row g-3">
  170.                             <div class="col-md-5 col-12">
  171.                                 <div class="input-wrapper">
  172.                                     <span class="input-icon"><i class="fa fa-tag"></i></span>
  173.                                     <select name="flagsearch" class="form-control-custom">
  174.                                         <option value="c" selected>Container / MCO</option>
  175.                                         <option value="p">Cargo Receipt</option>
  176.                                         <option value="n">Tracking Number</option>
  177.                                         <option value="cc">Customer Code</option>
  178.                                     </select>
  179.                                 </div>
  180.                             </div>
  181.                             <div class="col-md-7 col-12">
  182.                                 <div class="input-wrapper">
  183.                                     <span class="input-icon"><i class="fa fa-search"></i></span>
  184.                                     <input name="number"
  185.                                            type="text"
  186.                                            class="form-control-custom"
  187.                                            placeholder="Enter number..."
  188.                                            autocomplete="off"
  189.                                            required>
  190.                                 </div>
  191.                             </div>
  192.                             <div class="col-12">
  193.                                 <button onclick="sendAjaxFormCommun('#formTrack','.ldd','#infoTrack','','')"
  194.                                         type="submit"
  195.                                         class="btn btn-search w-100 ldd">
  196.                                     <i class="fa fa-paper-plane"></i> Track Shipment
  197.                                 </button>
  198.                             </div>
  199.                         </div>
  200.                     </form>
  201.                 </div>
  202.                 <div id="infoTrack" class="mt-4">
  203.                     <div class="placeholder-view">
  204.                         <div class="placeholder-icon">
  205.                             <i class="fa fa-map-marker-alt"></i>
  206.                         </div>
  207.                         <h4 class="fw-bold h5">Ready to Track?</h4>
  208.                         <p class="text-muted mx-auto mb-0" style="max-width:380px; font-size: 0.9rem;">
  209.                             Enter your shipment details above to get real-time updates on your cargo status.
  210.                         </p>
  211.                     </div>
  212.                 </div>
  213.             </div>
  214.         </div>
  215.     </div>
  216. {% endblock %}