templates/Companies/article.html.twig line 1

Open in your IDE?
  1.         <meta charset="UTF-8">
  2.         <meta http-equiv="X-UA-Compatible" content="IE=edge">
  3.         <meta name="viewport" content="width=device-width, initial-scale=1.0">
  4.         <title>Pimcore Company</title>
  5.         
  6.        <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@10/swiper-bundle.min.css"/>
  7.         
  8.         
  9.         {#font awesome cdn link#}
  10.         <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
  11.         
  12.         <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js" charset="utf-8"></script>
  13.         
  14.         {#custom css file link#}
  15.         <style>
  16.         @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600;700&display=swap');
  17.        
  18.     :root{
  19.         --orange:#ff7800;
  20.         --black:#130f40;
  21.         --light-color:#666;
  22.         --box-shadow:0 .5rem 1.5rem rgba(0,0,0,.1);
  23.         --border:.2rem solid rgba(0,0,0,.1);
  24.         --outline:.1rem solid rgba(0,0,0,.1);
  25.         --outline-hover:.2rem solid var(--black);
  26.     }
  27.     section{
  28.         padding:2rem 9%;
  29.     }
  30.        .heading{
  31.         text-align: center;
  32.         padding:2rem 0;
  33.         padding-bottom: 3rem;
  34.         font-size: 3.5rem;
  35.         color:var(--black);
  36.     }
  37.     
  38.     .heading span{
  39.         background: var(--orange);
  40.         color:#fff;
  41.         display:inline-block;
  42.         padding:.5rem 3rem;
  43.         clip-path: polygon(100% 0, 93% 50%, 100% 99%, 0% 100%, 7% 50%, 0% 0%);
  44.     }
  45.     
  46.     .articles .box-container{
  47.         display:grid;
  48.         grid-template-columns: repeat(auto-fit, minmax(30rem, 1fr));
  49.         gap:1.5rem;
  50.     }
  51.     
  52.     .articles .box-container .box{
  53.         overflow: hidden;
  54.         border-radius: .5rem;
  55.         box-shadow: var(--box-shadow);
  56.         background:#fff;
  57.     }
  58.     
  59.     .articles .box-container .box img{
  60.         height:25rem;
  61.         width:100%;
  62.         object-fit:cover;
  63.     }
  64.     
  65.     .articles .box-container .box .content{
  66.         padding:2rem;
  67.     }
  68.     
  69.     .articles .box-container .box .content .icons{
  70.         display: flex;
  71.         align-items: center;
  72.         justify-content: space-between;
  73.         padding-bottom: 1.5rem;
  74.         margin-bottom: 1rem;
  75.         border-bottom: var(--border);
  76.     }
  77.     
  78.     .articles .box-container .box .content .icons a{
  79.         color:var(--light-color);
  80.         font-size:1.5rem;
  81.     }
  82.     
  83.     .articles .box-container .box .content .icons a:hover{
  84.         color:var(--black);
  85.     }
  86.     
  87.     .articles .box-container .box .content .icons a i{
  88.         color:var(--orange);
  89.         padding-right: .5rem;
  90.     }
  91.     
  92.     .articles .box-container .box .content h3{
  93.         line-height: 1.8;
  94.         color:var(--black);
  95.         font-size: 2.2rem;
  96.         padding:.5rem 0;
  97.     }
  98.     
  99.     .articles .box-container .box .content p{
  100.         line-height: 1.8;
  101.         color:var(--light-color);
  102.         font-size: 1.5rem;
  103.         padding:.5rem 0;
  104.     }
  105.     #company-articles{
  106.         width: 75%;
  107.         float: left;
  108.         background-color:#FCFFFE;
  109.     }
  110.     .p-content{
  111.         font-size: 12px;
  112.     }
  113.     </style>
  114.    
  115.         {#header section starts#}
  116.        {#{% include 'includes/company-home-header.html.twig' %}#}
  117.        {% include 'includes/company-home-header.html.twig' %}
  118.        
  119.        {% include 'includes/company-sidebar.html.twig' %}
  120.  {#article section starts#}
  121.         
  122.         <section class="articles" id="company-articles">
  123.             <h1 class="heading"><span>Articles</span></h1>
  124.             <div class="box-container">
  125.                 {% for repos in Articles %}
  126.                 <div class="box">
  127.                     {# <img src="https://pimcore.navabrinditsolutions.com/admin/asset/get-image-thumbnail?id=100" alt=""> #}
  128.                     <img src="/var/assets{{repos.ArticleImage}}" alt="" id="article-img">
  129.                     <div class="content" id="company-article">
  130.                         <div class="icons">
  131.                             <a href="#"><i class="fas fa-user"></i>{{repos.author}}</a>
  132.                             <a href="#"><i class="fas fa-calendar"></i>{{repos.articleDate}}</a>
  133.                         </div>
  134.                         <h3>{{repos.articleTitle}}</h3>
  135.                         <div class="p-content">
  136.                             {{repos.articleDescription | raw}}
  137.                         </div>
  138.                         <a href="/articleDetails?id={{repos.id}}" target="_blank" class="btn">read more</a>
  139.                     </div>
  140.                 </div>
  141.                {% endfor %} 
  142.             </div>
  143.         </section>
  144.         
  145.         {#article section ends#}
  146. {#footer section starts#}
  147.         
  148.        {% include 'includes/company-footer.html.twig' %}
  149.         
  150.         {#footer section ends#}
  151. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.4/jquery.min.js"></script>
  152. <script>
  153. jQuery(document).ready(function(){
  154.     jQuery('.p-content').each(function(){
  155.         var myDiv = $(this);
  156.         myDiv.text(myDiv.text().substring(0,250)+'....');
  157.     });
  158.     
  159. });
  160. </script>