Advertisement
Guest User

Code currency header Brooklyn

a guest
Jul 2nd, 2021
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.61 KB | None | 0 0
  1. <li class="site-nav__item site-nav__item--compressed" data-section-type="footer-section">
  2.                   {%- form 'localization', class: 'site-header__currency-form', data-disclosure-form: '' -%}
  3.                   <div class="selectors-form__item">
  4.                     <h2 class="visually-hidden" id="country-heading">
  5.                       {{ 'general.country.dropdown_label' | t }}
  6.                     </h2>
  7.                     {%- assign current_currency_symbol = localization.country.currency.symbol -%}
  8.                     {%- assign current_currency_iso_code = localization.country.currency.iso_code -%}
  9.                     <div class="disclosure" data-disclosure-country>
  10.                       <button type="button" class="disclosure__toggle" aria-expanded="false" aria-controls="country-list" aria-describedby="country-heading" data-disclosure-toggle>
  11.                         {%- if current_currency_symbol -%}
  12.                         {{ localization.country.name }} ({{ current_currency_iso_code }} {{ current_currency_symbol }})
  13.                         {%- else -%}
  14.                         {{ localization.country.name }} ({{ current_currency_iso_code }})
  15.                         {%- endif -%}
  16.                       </button>
  17.                       <ul id="country-list" class="disclosure-list" data-disclosure-list>
  18.                         {% for country in form.available_countries %}
  19.                         {%- assign currency_symbol = country.currency.symbol -%}
  20.                         {%- assign currency_iso_code = country.currency.iso_code -%}
  21.                         <li class="disclosure-list__item {% if country.iso_code == localization.country.iso_code %}disclosure-list__item--current{% endif %}">
  22.                           <a class="disclosure-list__option" href="#" {% if country.iso_code == localization.country.iso_code %}aria-current="true"{% endif %} data-value="{{ country.iso_code }}" data-disclosure-option>
  23.                             {%- if currency_symbol -%}
  24.                             {{ country.name }} ({{ currency_iso_code }} {{ currency_symbol }})
  25.                             {%- else -%}
  26.                             {{ country.name }} ({{ currency_iso_code }})
  27.                             {%- endif -%}
  28.                           </a>
  29.                         </li>
  30.                         {%- endfor -%}
  31.                       </ul>
  32.                       <input type="hidden" name="country_code" id="CountrySelector" value="{{ localization.country.iso_code }}" data-disclosure-input/>
  33.                     </div>
  34.                   </div>
  35.                   {%- endform -%}
  36.                 </li>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement