2021-03-26 16:14:46 +00:00
|
|
|
---
|
|
|
|
---
|
|
|
|
|
|
|
|
window.env = {
|
|
|
|
AIRBRAKE_PROJECT_ID: {{ site.env.AIRBRAKE_PROJECT_ID | default: 0 }},
|
|
|
|
AIRBRAKE_PROJECT_KEY: '{{ site.env.AIRBRAKE_PROJECT_KEY }}',
|
2021-06-01 21:33:49 +00:00
|
|
|
JEKYLL_ENV: '{{ site.env.JEKYLL_ENV }}',
|
|
|
|
SPREE_URL: '{{ site.env.SPREE_URL }}'
|
2021-03-26 16:14:46 +00:00
|
|
|
}
|
2021-10-27 18:22:44 +00:00
|
|
|
|
|
|
|
window.site = {
|
|
|
|
"i18n": {{ site.i18n | jsonify }}
|
|
|
|
}
|
2021-10-27 18:18:05 +00:00
|
|
|
|
|
|
|
{%- comment -%}
|
|
|
|
Para agregar plantillas que se procesan con JS, las agregamos en
|
|
|
|
Liquid dentro de assets/templates/ y luego las importamos acá, de forma
|
|
|
|
que estén disponibles para JS sin tener que descargarlas.
|
|
|
|
|
|
|
|
Es importante que la plantilla esté envuelta por el tag `{% raw %}`,
|
|
|
|
para que no sea procesado en el momento de generar env.js, sino en el
|
|
|
|
navegador.
|
|
|
|
{%- endcomment -%}
|
|
|
|
{%- capture alert %}{% include_relative assets/templates/alert.html %}{% endcapture -%}
|
|
|
|
{%- capture results %}{% include_relative assets/templates/results.html %}{% endcapture -%}
|
2021-10-28 13:00:00 +00:00
|
|
|
{%- capture cart %}{% include_relative assets/templates/cart.html %}{% endcapture -%}
|
|
|
|
{%- capture payment_methods %}{% include_relative assets/templates/payment_methods.html %}{% endcapture -%}
|
|
|
|
{%- capture recover_order %}{% include_relative assets/templates/recover_order.html %}{% endcapture -%}
|
|
|
|
{%- capture shipping_methods %}{% include_relative assets/templates/shipping_methods.html %}{% endcapture -%}
|
2021-10-27 18:18:05 +00:00
|
|
|
|
|
|
|
window.templates = {
|
2021-10-27 19:47:18 +00:00
|
|
|
"alert": {{ alert | jsonify }},
|
|
|
|
"results": {{ results | jsonify }},
|
2021-10-28 13:00:00 +00:00
|
|
|
"cart": {{ cart | jsonify }},
|
|
|
|
"payment_methods": {{ payment_methods | jsonify }},
|
|
|
|
"recover_order": {{ recover_order | jsonify }},
|
|
|
|
"shipping_methods": {{ shipping_methods | jsonify }},
|
2021-10-27 18:18:05 +00:00
|
|
|
}
|