templates/includes/blocks/instagramSection.html.twig line 1

Open in your IDE?
  1. <section class="instagram-section overflow-hidden"
  2.   section-shade="light">
  3.   <div class="lg:hidden p-8 border-t border-gray"
  4.     fade
  5.     fade-trigger="scroll">
  6.     <a class="flex justify-between items-center text-[2rem] text-blue font-extrabold"
  7.       href="{{ content.InstagramAccountUrl }}"
  8.       target="blank">
  9.       <span>#{{ content.InstagramAccountName }}</span>
  10.       <svg class="w-6 h-6">
  11.         <use xlink:href="#instagram"></use>
  12.       </svg>
  13.     </a>
  14.   </div>
  15.   {% set posts = [
  16.   {
  17.   'img': './assets/oaks-lane/home/insta-1.webp',
  18.   'title': 'Oaks Lane Instagram',
  19.   'href': '#'
  20.   }, {
  21.   'img': './assets/oaks-lane/home/insta-2.webp',
  22.   'title': 'Oaks Lane Instagram',
  23.   'href': '#'
  24.   }, {
  25.   'img': './assets/oaks-lane/home/insta-3.webp',
  26.   'title': 'Oaks Lane Instagram',
  27.   'href': '#'
  28.   }, {
  29.   'img': './assets/oaks-lane/home/insta-4.webp',
  30.   'title': 'Oaks Lane Instagram',
  31.   'href': '#'
  32.   }, {
  33.   'img': './assets/oaks-lane/home/insta-5.webp',
  34.   'title': 'Oaks Lane Instagram',
  35.   'href': '#'
  36.   }, {
  37.   'img': './assets/oaks-lane/home/insta-6.webp',
  38.   'title': 'Oaks Lane Instagram',
  39.   'href': '#'
  40.   }
  41.   ]
  42.   %}
  43.   <div
  44.     class="relative grid grid-cols-3 divide-x divide-gray border-t border-gray w-[180vw] lg:w-full left-1/2 lg:left-0 -translate-x-1/2 lg:translate-x-0">
  45.     {% set n = 0 %}
  46.     {% for post in medias.data %}
  47.     {% if n <= 5 %}
  48.     <div class="instagram-post relative aspect-[1.28_/_1] p-6 md:p-8 xl:p-12 border-b border-gray">
  49.       <div class="relative w-full h-full overflow-hidden group">
  50.         {# Image size 570*450 #}
  51.         <img class="object-cover w-full h-full scale-[1.4] opacity-0"
  52.           src="{{post.media_url}}"
  53.           target="_blank"
  54.           alt="okas"
  55.           loading="lazy">
  56.         <div
  57.           class="absolute inset-0 flex items-center justify-center bg-blue/40 opacity-0 group-hover:opacity-100 duration-500 ease-basic-ease">
  58.           <a class="absolute inset-0 z-10 text-[0px]"
  59.             href="{{post.media_url}}" target="_blank">okas</a>
  60.           <div class="w-4 h-4 text-white overflow-hidden">
  61.             <svg
  62.               class="w-full h-full translate-y-full group-hover:translate-y-0 delay-200 duration-500 ease-basic-ease">
  63.               <use xlink:href="#instagram"></use>
  64.             </svg>
  65.           </div>
  66.         </div>
  67.       </div>
  68.     </div>
  69.     {% set n = n + 1 %}
  70.     {% endif %}
  71.     {% endfor %}
  72.   </div>
  73. </section>