Looking for a way to loop the content in a card multiple times within a container? You can use the v-for directive to render a list of items based on an array and change the data during looping. Here's an example code snippet:
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css" rel="stylesheet">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link rel="stylesheet" href="https://the-allstars.com/vue2-animate/dist/vue2-animate.css">
</head>
<body>
<div id="app">
<div class="container">
<div class="row">
<div v-for="(card, index) in cardinfo" class="col-lg-3 col-md-3 col-sm-3 col-xs-12">
<div class="card text-center">
<img class="card-img-top" :src="card.image" alt="" width="100%">
<div class="card-block">
<h4 class="card-title">{{ card.title }}</h4>
<p class="card-text">{{ card.details }}</p>
<a class="btn btn-primary" href="#">Read More</a>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<!-- vue code start from here -->
<script>
var dummyData = [{
title: "This is the blog title",
details: "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa",
image: "https://images.pexels.com/photos/39811/pexels-photo-39811.jpeg?h=350&auto=compress&cs=tinysrgb",
}, {
title: "This is the blog title2",
details: "alrazy ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa",
image: "https://images.pexels.com/photos/39811/pexels-photo-39811.jpeg?h=350&auto=compress&cs=tinysrgb",
} {
title: "This is the blog title3",
details: "mohim ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa",
image: "https://images.pexels.com/photos/39811/pexels-photo-39811.jpeg?h=350&auto=compress&cs=tinysrgb",
}]
var app = new Vue({
el: '#app',
data: {
cardinfo: dummyData,
currentIdx: 0
},
methods: {
}
})
</script>
</body>
</html>