Replies: 1 comment 2 replies
-
It might all depend on your carousel code. ---
title: OK
pagination:
data: users
size: 4
---
<aside data-carousel>
{% for item in pagination.items %}
<article>
<h1>{{ item.name }}</h1>
<h2>{{ item.jobTitle }}</h2>
<p>{{ item.bio }}</p>
</article>
{% endfor %}
<nav>
{% for nav in pagination.links %}
<a href="{{ nav }}">·</a>
{% endfor %}
</nav>
</aside> … where my src/_data/users.js file populates the user data from faker-js and looks like this: const { faker } = require('@faker-js/faker');
module.exports = Array.from({ length:17 }, () => ({
name: faker.person.fullName(),
jobTitle: faker.person.jobTitle(),
bio: faker.person.bio(),
})); |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to accomplish something like this:
What would be the best way to do it? It will be a sidebar on the home page. I have collection for a list of articles and already have the layout for each done but am having trouble with wrapping my head out doing a carrousel type feature for something like that. I wasn't sure if pagination would be involved here or not.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions