{% set leftCards = [{
name: "Jenell D. Matney",
title: "Founder and CEO",
image: "assets/images/256_rsz_nicolas-horn-689011-unsplash.jpg"
}, {
name: "Sherri J. Cardenas",
title: "Software Engineer",
image: "assets/images/256_rsz_sharina-mae-agellon-377466-unsplash.jpg"
}, {
name: "Joseph S. Ferland",
title: "Web Designer",
image: "assets/images/256_rsz_karl-s-973833-unsplash.jpg"
}] %}
{% set rightCards = [{
name: "Bryan K. Davis",
title: "Web Developer",
image: "assets/images/256_rsz_90-jiang-640827-unsplash.jpg"
}, {
name: "Elizabeth J. Ohara",
title: "Business Analyst",
image: "assets/images/256_rsz_florian-perennes-594195-unsplash.jpg"
}, {
name: "Kaci M. Langston",
title: "Human Resources",
image: "assets/images/256_rsz_james-gillespie-714755-unsplash.jpg"
}] %}
Containers
Add the data attribute data-dragula-containers='["#cards-left", "#cards-right"]' to allow the user to drag an element in any of the containers and drop it in any other container in the list.
{% import "components/user-feedback.html" as feedback %}
Container #1
{% for card in leftCards %}
{{ feedback.component(card) }}
{% endfor %}
Container #2
{% for card in rightCards %}
{{ feedback.component(card) }}
{% endfor %}
Handles
Add the data attribute data-dragula-moves="js-dragula-handle" to allow the user to drag an element in any of the containers and drop it in any other container in the list using a handle.
{% import "components/user-handle.html" as user %}
Container #1
{% for card in leftCards %}
{{ user.component(card) }}
{% endfor %}
Container #2
{% for card in rightCards %}
{{ user.component(card) }}
{% endfor %}