uawdijnntqw1x1x1
IP : 216.73.216.46
Hostname : toronto-dev2
Kernel : Linux toronto-dev2 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
srv
/
users
/
craft4
/
apps
/
craft4-newsite-space
/
templates
/
shop
/
..
/
shop
/
_private
/
.
/
.
/
layouts
/
index.twig
/
/
{# Common, top-level layout template. @var cart \craft\commerce\elements\Cart @var extraHead string @var flashNotice string @var flashError string #} <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <meta http-equiv="x-ua-compatible" content="ie=edge"> <title>{{ siteName ~ ' Shop' }}</title> <link href="https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css" rel="stylesheet"> {% if extraHead is defined %} {{ extraHead }} {% endif %} </head> <body class="relative text-gray-800 flex flex-col min-h-screen leading-relaxed"> <div id="body" > {% if cart is not defined %} {% set cart = craft.commerce.carts.cart %} {% endif %} {% set flashNotice = craft.app.session.getFlash('notice') %} {% set flashError = craft.app.session.getFlash('error') %} <header> <div class="bg-gray-900"> <div class="container mx-auto p-6"> <h1 class="text-3xl"> <a href="{{ url('/shop') }}" class="text-white"> {{- siteName ~ ' Shop' -}} </a> </h1> </div> </div> {{ include('shop/_private/layouts/includes/nav-main') }} {{ include('shop/_private/layouts/includes/nav-checkout') }} </header> <div id="main"> {% if flashNotice %} <div class="bg-blue-500 text-white"> <div class="container mx-auto px-6 py-4"> {{ flashNotice ?? 'Test flash notice' }} </div> </div> {% endif %} {% if flashError %} <div class="bg-red-500 text-white"> <div class="container mx-auto px-6 py-4"> {{ flashError ?? 'Test flash error' }} </div> </div> {% endif %} {% if cart and cart.hasNotices() %} <div class="bg-blue-400 text-white"> <div class="container mx-auto px-6 py-4 relative"> <span>{{ 'Cart Notices'|t }}</span> {% set entriesByType = cart.getNotices()|group('type') %} {% for type, notices in entriesByType %} {% for notice in notices %} <li class="list-disc" data-type="{{ notice.type }}" data-attribute="{{ notice.attribute }}" data-message="{{ notice.message }}" > {{- notice -}} </li> {% endfor %} {% endfor %} <form method="post"> {{ actionInput('commerce/cart/update-cart') }} {{ successMessageInput('Notices dismissed') }} {{ hiddenInput('clearNotices') }} {{ csrfInput() }} {{ tag('button', { type: 'submit', class: ['absolute', 'mt-4', 'mr-4', 'top-0', 'right-0', 'cursor-pointer rounded px-2 py-1 text-sm inline-block', '[[classes.btn.blue]]'], text: 'Dismiss'|t }) }} </form> </div> </div> {% endif %} {% if cart and cart.errors|length %} <div class="bg-red-500 text-white"> <div class="container mx-auto px-6 py-4"> {% for attribute, errors in cart.errors %} {% if loop.first %}<ul>{% endif %} {% for key, error in errors %} <li>{{ attribute }}: {{ error }}</li> {% endfor %} {% if loop.last %}</ul>{% endif %} {% endfor %} </div> </div> {% endif %} {% block body %} <div class="container mx-auto p-6 flex-grow"> {% block main %}{% endblock %} </div> {% endblock %} </div> <footer> {{ include('shop/_private/layouts/includes/footer') }} </footer> {% do craft.carebot.registerCarebotAssets() %} </div> </body> </html> {% js at head %} let states = {{ craft.commerce.store.getStore().getAdministrativeAreasListByCountryCode()|json_encode|raw }}; {% set usedFields = {} %} {% for countryCode in craft.app.addresses.getCountryRepository().getAll()|keys %} {% set usedFields = usedFields|merge({ (countryCode): craft.app.addresses.getAddressFormatRepository().get(countryCode).getUsedFields()|merge([ 'fullName', 'latLong', 'organizationTaxId', 'organization', 'countryCode', ]) }) %} {% endfor %} let usedAddressFieldsByCountryCode = {{ usedFields|json_encode|raw }}; function hideAddressFields(selectorTemplate) { const fields = document.querySelectorAll('.' + selectorTemplate.replace('placeHolder', 'js-address-field')); if (!fields.length) { return; } for (let i = 0; i < fields.length; i++) { fields[i].classList.add('hidden'); } } function showAddressField(fieldName, selectorTemplate) { const closestSelector = selectorTemplate; const field = document.querySelector('#' + selectorTemplate.replace('placeHolder', fieldName)); if (!field) { return; } const fieldWrapper = field.closest('.' + closestSelector.replace('placeHolder', 'js-address-field')); if (!fieldWrapper) { return; } fieldWrapper.classList.remove('hidden'); } {% endjs %}
/srv/users/craft4/apps/craft4-newsite-space/templates/shop/../shop/_private/././layouts/index.twig