Sha256: 84839e2b0a8d49132732116f4c2cb9873f6854ccbf65309ceadee3b65639bb55

Contents?: true

Size: 1.23 KB

Versions: 1

Compression:

Stored size: 1.23 KB

Contents

{% if site.original -%}
  {% assign classes = "col-sm-1 col-md-1" %}
{% else -%}
  {% assign classes = "col-sm-6 col-md-6" %}
{% endif -%}

<div class="col-xs-12 {{ classes }}">
  <a href="#" class="up">
    <span class="glyphicon glyphicon-arrow-up"></span>
  </a>

  <a href="javascript:switchLang()" class="lang-switcher">
    <span class="flag-icon flag-icon-squared" id="lang-switcher"></span>
  </a>

  <script type="text/javascript">
    if (!window.location.href.includes('grupopv')) {
      document.querySelector('.lang-switcher').classList.add('hide');
    }

    currentLang = document.getElementsByTagName("html")[0].getAttribute("lang");

    if (currentLang == 'en') {
      document.querySelector('#lang-switcher').classList.add('flag-icon-mx');
    } else {
      document.querySelector('#lang-switcher').classList.add('flag-icon-us');
    }

    function switchLang(){
      if (currentLang == 'en') {
        url = window.location.href.replace('localhost:4000','grupopv.mx').replace('grupopv.us','grupopv.mx');
        window.location.href = url;
      } else {
        url = window.location.href.replace('localhost:4000','grupopv.us').replace('grupopv.mx','grupopv.us');
        window.location.href = url;
      }
    }
  </script>

</div>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jekyll-theme-marketing-0.5.0 _includes/body/footer/buttons.html