{% assign file = page.fileName %} {% assign lang = page.lang %} {% assign folder
= page.folderName %} {% assign homeData= site.data[folder][lang][file] %}
<!DOCTYPE html>
<html lang="{{page.lang}}">
{% include head/index.html %}

<body>
  {% include header/index.html %} {%- if homeData.nofileupload -%}
  <div id="safeui-alert" class="alert alert-{{homeData.variant | default: 'info'}} fade show text-center" role="alert">
    <div class="container">
      {%- if homeData.alertmsg -%} {{homeData.alertmsg}} {%- else -%} We do
      not upload any files to server, hence your data is 100% secure. {%-
      endif -%}
    </div>
  </div>
  {%- endif -%} {%- if homeData.h1 or homeData.h2 -%}
  <div class="flex-container mb-1">
    <div class="flex-class py-5">
      <div class="d-flex justify-content-center align-items-center">
        <span class="fHhdVc">
          <div class="div-cont feature-img mr-2">
            {%- if homeData.img -%}
            <img loading="lazy" style="width:{{homeData.imgwidth}};height:{{homeData.imgheight}};"
              src="{{homeData.img}}" alt="{{homeData.imgalt}}" {%- if site.crossorigin -%} crossorigin {%- endif -%} />
            {%- endif -%}
          </div>
        </span>
        <h1 class="home-top-h1">
          {%- for word in homeData.h1 -%} {%- if forloop.first == true -%}
          {{word | capitalize }} {%- else -%} {{word}} {%- endif -%} {%-
          endfor -%}
        </h1>
      </div>
      <h2 class="home-top-h2">
        {%- for word in homeData.h2 -%} {%- if forloop.first == true -%}
        {{word | capitalize }} {%- else -%} {{word}} {%- endif -%} {%- endfor
        -%}
      </h2>
    </div>
  </div>
  {%- endif -%} {%- if homeData.features -%} {%- if site.monumetricId and
  page.url != '/' and page.lang == "en" -%}
  <div class="container">
    <div class="row">
      <div class="col-md-9 mx-auto">
        {%- endif -%}
        <div class="flex-container">
          <div class="flex-class">
            <ul class="home-features">
              {% for product in homeData.features %}
              <li style="background:{{product.color}}" class="home-feature-box">
                <div class="home-inner-box">
                  <div class="div-cont feature-img" height="36px" width="36px">
                    <img loading="lazy" src="{{product.icon}}" height="36px" width="36px" alt="star icon" {%- if
                      site.crossorigin -%} crossorigin {%- endif -%} />
                  </div>
                </div>
                <div class="home-feature-desc">{{product.description}}</div>
                <a class="home-feature-name" href="{{product.url}}">{{product.name}}</a>
              </li>
              {% endfor %}
            </ul>
          </div>
        </div>
        {%- if site.monumetricId and page.url != '/' and page.lang == "en" -%}
      </div>
    </div>
  </div>
  {%- endif -%} {%- endif -%}
  <div class="home-content-box" id="theme-content-box">{{content}}</div>
  {%- if homeData.TEXTUAL_CONTENT -%}
  <div class="container mt-4 mb-4">
    <div class="row px-0">
      {%- if site.monumetricId and page.url != '/' and page.lang == "en" -%}
      <div class="col-md-9 mx-auto">
        <div class="row">
          {%- endif -%} {% assign totalHeaderCount = 0 %} {% for data in
          homeData.TEXTUAL_CONTENT %} {% assign words = data.header | split: "
          " %} {% assign word_count = words | size %} {% assign
          totalHeaderCount = totalHeaderCount | plus: word_count %} {% endfor
          %} {% for data in homeData.TEXTUAL_CONTENT %}
          <div
            class="{%- if site.monumetricId and page.url != '/' and page.lang == 'en' -%} col-md-6 my-4 {%- else -%} col-md-4 my-4 {%- endif -%}">
            <div>
              <img class="feature-card-img" height="48px" width="48px" loading="lazy" src="{{data.logoUrl}}"
                alt="{{data.header}}" {%- if site.crossorigin -%} crossorigin {%- endif -%} />

              {%- if totalHeaderCount > site.count_of_words_in_headings -%}
              <h2 class="feature-card-title">
                {{data.header | replace: "$variable", page.value}}
              </h2>
              {%- else -%}
              <div class="feature-card-title">
                {{data.header | replace: "$variable", page.value}}
              </div>
              {%- endif -%}
              <div class="feature-card-desc">
                {{data.content | replace: "$variable", page.value}}
              </div>
            </div>
          </div>
          {% endfor %} {%- if site.monumetricId and page.url != '/' and
          page.lang == "en" -%}
        </div>
      </div>
      {%- endif -%}
    </div>
  </div>
  {%- endif -%} {%- if homeData.HOW_TO_CONTENT -%}
  <section class="how-to-section">
    <div class="container">
      <div class="row">
        {%- if site.monumetricId and page.url != '/' and page.lang == "en" -%}
        <div class="col-md-9 mx-auto">
          <div class="row">
            {%- endif -%}
            <div class="col-md-6 order-0">
              {%- if homeData.HOW_TO_CONTENT.YoutubeVideoUrl.size > 0 -%}
              <div class="how-to-video-wrapper">
                {% assign video_url = homeData.HOW_TO_CONTENT.YoutubeVideoUrl %}
                {% assign video_id = "" %}
                {% if video_url contains "youtu.be/" %}
                {% assign parts = video_url | split: "/" %}
                {% assign video_id = parts[3] %}
                {% elsif video_url contains "youtube.com/watch" %}
                {% assign params = video_url | split: "?" | last | split: "&" %}
                {% for param in params %}
                {% if param contains "v=" %}
                {% assign video_id = param | split: "=" | last %}
                {% endif %}
                {% endfor %}
                {% endif %}
                
                {%- if site.monumetricId -%}
                <div class="how-to-video h-100 w-100" data-videoid="{{video_id}}">
                  <img class="youtubeVideoPlayer" width="100%" height="100%" id="thumbnail-img" alt="thumbnail-img" />
                  <div class="youtube-play-btn-wrapper">
                    <button class="play-btn btn btn-primary" onClick="loadVideo()">►</button>
                  </div>
                </div>
                {%- else -%}
                <div class="how-to-video h-100 w-100" data-videoid="{{video_id}}">
                  <img class="youtubeVideoPlayer" width="100%" height="100%" id="thumbnail-img" alt="thumbnail-img" />
                  <div class="youtube-play-btn-wrapper">
                    <button class="play-btn btn btn-primary" onClick="loadVideo()">►</button>
                  </div>
                </div>
                {%- endif -%}
              </div>
              {%- else -%}
              <div class="how-to-img-wrapper">
                <img class="how-to-leftimg" height="180px" width="300px" src="{{homeData.HOW_TO_CONTENT.logoImageUrl}}"
                  loading="lazy" alt="{{homeData.HOW_TO_CONTENT.logoImageAlt | default: 'how to image' }}" {%- if
                  site.crossorigin -%} crossorigin {%- endif -%} />
              </div>
              {%- endif -%}
            </div>
            <div class="col-md-6 order-1">
              <div class="how-to-right">
                <h3 class="how-to-title text-left">
                  {{homeData.HOW_TO_CONTENT.heading | replace: "$variable",
                  page.value}}
                </h3>
                <ol class="how-to-list">
                  {% for data in homeData.HOW_TO_CONTENT.steps %}

                  <li id="step{{forloop.index}}" class="how-to-list-item">
                    <span>{{forloop.index}}.</span>{{data | replace:
                    "$variable", page.value}}
                  </li>
                  {% endfor %}
                </ol>
              </div>
            </div>
            {%- if site.monumetricId and page.url != '/' and page.lang == 'en'
            -%}
          </div>
        </div>
        {%- endif -%}
      </div>
    </div>
  </section>
  {%- endif -%} {%- assign showFaqs = true -%} {%- for item in site.noFaqsList
  -%} {%- if item == page.lang -%} {%- assign showFaqs = false -%} {%- break
  -%} {%- else -%} {%- assign showFaqs = true -%} {%- endif -%} {%- endfor -%}
  {%- if showFaqs == true -%} {%- if homeData.FAQ -%}
  <section class="faq-section">
    <div class="container">
      <div class="row">
        <div class="col-md-8 mx-auto">
          <div class="faq">
            {%- if homeData.FAQ.size>0 -%}
            <h3 class="feature-h1 text-center mb-4">
              {{homeData.faqheading | default: 'Frequently Asked Questions'}}
            </h3>
            {%- endif -%}
            <ul class="list-unstyled">
              {% for data in homeData.FAQ %}
              <li>
                <h3 class="faq-question" itemprop="name">
                  {{data.question | replace: "$variable", page.value}}<em style="transform: rotate(-135deg)">
                    <i></i></em>
                </h3>
                <div style="display: block">
                  <p class="faq-answer" itemprop="text">
                    {{data.answer | replace: "$variable", page.value}}
                  </p>
                </div>
              </li>
              {% endfor %}
            </ul>
          </div>
        </div>
      </div>
    </div>
  </section>
  {%- endif -%} {%- endif -%} {%- include share/socialshare.html -%} {%-
  include Rating/rating.html -%}
  {%- if homeData.infographics.size > 0 -%}
  {%- include infographics/infographics.html -%}
  {%- endif -%}

  {%- if homeData.USPS -%} {%- include
  /Usp/usp.html -%} {%- endif -%} {%- if homeData.display_formats -%}
  <div class="container file-detail-table">
    {%- include fileformat/fileformatdetail.html -%}
  </div>
  {%- endif -%} {%- if homeData.compare_formats -%}
  <div class="container compare-table">
    {%- include fileformat/comparisonfiles.html -%}
  </div>
  {%- endif -%} {%- assign langen = "en" -%} {%- if
  site.data[folder][langen][file].categories -%} {%- assign categories =
  site.data[folder][langen][file].categories -%} {%- else -%} {%- assign
  categories = page.categories -%} {%- endif -%} {%- if
  site.data[folder][langen][file].tags -%} {%- assign tags =
  site.data[folder][langen][file].tags -%} {%- else -%} {%- assign tags =
  page.tags -%} {%- endif -%} {%- if homeData.posts.size > 0 -%} {%- include
  customblog/pageRelatedPosts.html -%} {%- else -%} {%- if categories.size > 0
  or tags.size > 0 -%} {%- include section/related_categories_post.html -%}
  {%- else -%} {%- include section/recent_posts.html -%} {%- endif -%} {%-
  endif -%} {%- if site.customblogdata -%} {%- if categories.size > 0 or
  tags.size > 0 -%} {%- include customblog/relatedposts.html -%} {%- else -%}
  {%- include customblog/recentposts.html -%} {%- endif -%} {%- endif -%} {%-
  if homeData.author.size > 0 -%} {%- include
  featurePageAuthors/featurePageAuthors.html -%} {%- endif -%} {%- include
  footer/index.html -%} {%- if site.customCode -%} {%- include customCode.html
  -%} {%- endif -%} {%- include script.html -%}
</body>

{%- if homeData.HOW_TO_CONTENT.YoutubeVideoUrl.size > 0 -%}
<script>
  let videoContainer = document.querySelector('.how-to-video');
  let thumbnail = document.getElementById('thumbnail-img');
  let videoId = videoContainer.getAttribute("data-videoid")
  let thumbnailUrl = 'https://img.youtube.com/vi/' + videoId + '/maxresdefault.jpg';
  console.log(videoId)

  // Function to load video
  function loadVideo() {
    videoContainer.innerHTML = '<iframe loading="lazy" class="youtubeVideoPlayer" width="100%" height="100%" src="https://www.youtube.com/embed/' + videoId + '?autoplay=1&mute=1" allowfullscreen></iframe>';
  }
  // Function to handle lazy loading of the thumbnail
  function lazyLoadThumbnail(entries, observer) {
    entries.forEach(entry => {
      if (entry.isIntersecting) {
        // Load thumbnail when it becomes visible
        thumbnail.src = thumbnailUrl;
        // Stop observing once loaded
        observer.unobserve(entry.target);
      }
    });
  }
  // Set up the Intersection Observer
  var observer = new IntersectionObserver(lazyLoadThumbnail, { threshold: 0.1 });
  observer.observe(thumbnail);
  // Optionally, you can add an event listener to trigger video loading on click or other interactions
  thumbnail.addEventListener('click', loadVideo);
</script>
{%- endif -%}

</html>