Adding Nunjucks
✍️ Objective - To integrate dukaan categories data with the category cards we have created so far
<!-- layout.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible"
content="IE=edge"/>
<meta name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
{% include './../../dukaan/common/theme-fonts.html' %}
{{ 'splide.min.css' | css | static }}
{{ 'layout.css' | css | static }}
{{ 'styles.css' | css | static }}
{% include './../../dukaan/common/seo_tags/commonSeoTags.html' %}
{% include './../../dukaan/common/theme-colors.html' %}
{% block head %}
{% endblock head %}
{{ 'head' | DukaanBlocks }}
</head>
{% include './../../dukaan/common/spinner-loader.html' %}
<body class="flex d-column">
{% include './../../dukaan/common/hellobar.html' %}
<main class="flex flex-1 d-column">
<div class="container">
{% for category in DUKAAN_CATEGORY_LIST %}
<div class="category-card">
<a href="#" class="category-link">
<div class="category-image-wrapper">
<img src="{{ category.image }}" alt="{{ category.name }}" class="category-image">
</div>
<div class="category-name">{{ category.name }}</div>
</a>
</div>
{% endfor %}
</div>
{% block content %}
{% endblock content %}
</main>
{% include '../../dukaan/common/bxgy-sticky-footer.html' %}
{% include '../../dukaan/common/store-open-sticky.html' %}
{% block postfooter %}
{% endblock postfooter %}
{{ 'footer' | DukaanBlocks }}
{% include './product-variant-templates.html' %}
{{ 'variant-utils.js' | js | static }}
{{ 'dukaan-utils.js' | js | static }}
{{ 'layout.js' | js | static }}
{{ 'dukaan-coupons.js' | js | static({ defer: true }) }}
{{ 'dukaan-offers.js' | js | static({ defer: true }) }}
{{ 'axios.min.js' | js | static({ defer: true }) }}
{{ 'splide.min.js' | js | static }}
{{ 'common-components.css' | css | static }}
{% include './../../dukaan/common/auth.html' %}
{% include '../../dukaan/common/multilanguage.html' %}
{% include './../../dukaan/common/common-scripts.html' %}
{% include '../../dukaan/common/snackbar.html' %}
{% block script %}
{% endblock script %}
</body>
</html>
Last updated