templates/layout/includes/settings.html.twig line 1

Open in your IDE?
  1. {% set currentLanguage = app.request.locale %}
  2. {#<style>#}
  3. {#    .shadow-1 {#}
  4. {#        box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);#}
  5. {#    }#}
  6. {#    .shadow-2 {#}
  7. {#        box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);#}
  8. {#    }#}
  9. {#    .shadow-3 {#}
  10. {#        box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);#}
  11. {#    }#}
  12. {#    .shadow-4 {#}
  13. {#        box-shadow: 0 14px 28px rgba(0,0,0,0.25), 0 10px 10px rgba(0,0,0,0.22);#}
  14. {#    }#}
  15. {#    .shadow-5 {#}
  16. {#        box-shadow: 0 19px 38px rgba(0,0,0,0.30), 0 15px 12px rgba(0,0,0,0.22);#}
  17. {#    }#}
  18. {#    .language-dropdown {#}
  19. {#        display: inline-block;#}
  20. {#        margin: 5px 5px;#}
  21. {#        position: relative; /* Agregamos posición relativa para que el menú desplegable se posicione en relación a este elemento */#}
  22. {#    }#}
  23. {#    .language-dropdown .lang-en {#}
  24. {#        border-left: 4px solid #E2162C;#}
  25. {#    }#}
  26. {#    .language-dropdown .lang-en .flag {#}
  27. {#        background-image: url("https://icons.iconarchive.com/icons/twitter/twemoji-flags/48/United-Kingdom-Flag-icon.png");#}
  28. {#    }#}
  29. {#    .language-dropdown .lang-es {#}
  30. {#        border-left: 4px solid #106eea;#}
  31. {#    }#}
  32. {#    .language-dropdown .lang-es .flag {#}
  33. {#        background-image: url("https://icons.iconarchive.com/icons/wikipedia/flags/48/ES-Spain-Flag-icon.png");#}
  34. {#    }#}
  35. {#    .language-dropdown label,#}
  36. {#    .language-dropdown ul li {#}
  37. {#        display: block;#}
  38. {#        width: 50px;#}
  39. {#        height: 38px;#}
  40. {#        background: #fff;#}
  41. {#        padding: 0px 6px;#}
  42. {#        cursor: pointer;#}
  43. {#    }#}
  44. {#    .language-dropdown ul.lang-list {#}
  45. {#        position: absolute; /* Cambiamos la posición a absoluta para que el menú desplegable aparezca por encima de otros elementos */#}
  46. {#        display: none;#}
  47. {#        z-index: 10; /* Establecemos un z-index alto para asegurarnos de que el menú desplegable esté en la parte superior */#}
  48. {#    }#}
  49. {#    .language-dropdown ul.lang-list li {#}
  50. {#        border-bottom: 1px solid #ECECEC;#}
  51. {#    }#}
  52. {#    .language-dropdown ul.lang-list li:last-child {#}
  53. {#        border-bottom-right-radius: 2px;#}
  54. {#        border-bottom-left-radius: 2px;#}
  55. {#    }#}
  56. {#    .language-dropdown ul.lang-list li.selected {#}
  57. {#        display: none;#}
  58. {#    }#}
  59. {#    .language-dropdown label {#}
  60. {#        position: relative;#}
  61. {#        border-bottom: 1px solid #ECECEC;#}
  62. {#        border-radius: 3px;#}
  63. {#        z-index: 2;#}
  64. {#    }#}
  65. {#    .language-dropdown .lang-flag .flag,#}
  66. {#    .language-dropdown .lang-list .lang .flag {#}
  67. {#        float: left;#}
  68. {#        width: 100%;#}
  69. {#        height: 100%;#}
  70. {#        cursor: pointer;#}
  71. {#        background-size: 35px 35px;#}
  72. {#        background-repeat: no-repeat;#}
  73. {#        background-position: center;#}
  74. {#    }#}
  75. {#    .language-dropdown.open ul.lang-list {#}
  76. {#        display: block;#}
  77. {#    }#}
  78. {#    .language-dropdown.open label {#}
  79. {#        border-bottom-left-radius: 0px;#}
  80. {#        border-bottom-right-radius: 0px;#}
  81. {#    }#}
  82. {#    .animate {#}
  83. {#        cursor: pointer;#}
  84. {#        transition: all .5s;#}
  85. {#        backface-visibility: hidden;#}
  86. {#    }#}
  87. {#    .language-dropdown .lang-flag,#}
  88. {#    .language-dropdown .lang-list {#}
  89. {#        transition: all .5s;#}
  90. {#        backface-visibility: hidden;#}
  91. {#    }#}
  92. {#</style>#}
  93. <div class="setting-link iconset pe-0">
  94.     {% if currentLanguage == 'es' %}
  95.     <a href="{{ pimcore_document(1) ~ 'en'}}">
  96.     <img class="lang-image" src="{{ asset('assets/images/icons8-great-britain-48.png') }}" alt=""/></a>
  97.     <span class="tooltip-label">English</span>
  98.     {% elseif currentLanguage == 'en' %}
  99.     <a href="{{ pimcore_document(1) ~ 'es'}}">
  100.         <img class="lang-image" src="{{ asset('assets/images/icons8-spain-48.png') }}" alt=""/></a>
  101.     <span class="tooltip-label">Español</span>
  102.     {% endif %}
  103. </div>
  104. {#<div id="settingsBox">#}
  105. {#    <div class="language-picker">#}
  106. {#        <span class="ttl">{{ "SELECT LANGUAGE" | trans | upper }}</span>#}
  107. {#        <ul id="language" class="cnrLangList">#}
  108. {#            <li><a href="{{ pimcore_document(1) ~ 'es' }}" class="{{ currentLanguage == 'es' ? 'active':'' }}">Español</a></li>#}
  109. {#            <li><a href="{{ pimcore_document(1) ~ 'en' }}" class="{{ currentLanguage == 'en' ? 'active':'' }}" >English</a></li>#}
  110. {#        </ul>#}
  111. {#    </div>#}
  112. {#</div>#}
  113. {#<div id="lang_selector" class="language-dropdown">#}
  114. {#    <label for="toggle" class="lang-flag lang-{{currentLanguage}}" title="Click to select the language">#}
  115. {#        <span class="flag"></span>#}
  116. {#    </label>#}
  117. {#    <ul class="lang-list">#}
  118. {#        <li class="lang lang-es" title="ES">#}
  119. {#            <span class="flag"></span>#}
  120. {#        </li>#}
  121. {#        <li class="lang lang-en" title="EN">#}
  122. {#            <span class="flag"></span>#}
  123. {#        </li>#}
  124. {#    </ul>#}
  125. {#</div>#}
  126. {#<script>#}
  127. {#    $(document).ready(function(){#}
  128. {#        $(".lang-flag").click(function(){#}
  129. {#            $(".language-dropdown").toggleClass("open");#}
  130. {#        });#}
  131. {#        $("ul.lang-list li").click(function(){#}
  132. {#            var selectedLang = 'en';#}
  133. {#            if($(this).hasClass('lang-es')){#}
  134. {#                selectedLang = 'es';#}
  135. {#            }#}
  136. {#            window.location.href = "/" + selectedLang;#}
  137. {#        });#}
  138. {#    })#}
  139. {#</script>#}