Skip to content

Instantly share code, notes, and snippets.

@johnteee
Created February 9, 2018 09:18
Show Gist options
  • Select an option

  • Save johnteee/686b9dc51ff000d4da49923c361b06ae to your computer and use it in GitHub Desktop.

Select an option

Save johnteee/686b9dc51ff000d4da49923c361b06ae to your computer and use it in GitHub Desktop.
Siema - perPage (object)
<div class="container">
<div class="siema_wrapper">
<div class="siema">
<div class="item">&nbsp;</div>
<div><img src="https://pawelgrzybek.com/siema/assets/siema--pink.svg" alt="Siema image" /></div>
<div><img src="https://pawelgrzybek.com/siema/assets/siema--yellow.svg" alt="Siema image" /></div>
<div><img src="https://pawelgrzybek.com/siema/assets/siema--pink.svg" alt="Siema image" /></div>
<div><img src="https://pawelgrzybek.com/siema/assets/siema--yellow.svg" alt="Siema image" /></div>
<div></div>
</div>
</div>
</div>
const mySiema = new Siema({
perPage: {
800: 3, // 3 items for viewport wider than 800px
1240: 3 // 3 items for viewport wider than 1240px
}
});
<script src="https://pawelgrzybek.com/siema/assets/siema.min.js"></script>
body {
width: 100%;
margin: 0 auto;
}
img {
width: 100%;
}
.container {
width: 15rem;
margin: auto;
overflow-x: hidden;
display: flex;
align-items: center;
justify-content: center;
}
.siema_wrapper {
width: 30rem;
}
.siema {
width: 100%;
margin: 1rem 0;
align-self: center;
position: aboslute;
left: 50%;
}
.item {
width: 100%;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment