I need to display different views of cards depending on the size of the device. The card style should adjust according to the width of the container. For larger devices, I have the following card style:
<div class="col-lg-3 col-md-4 col-sm-6 portfolio-item">
<div class="card h-100">
<a href="#"><img class="card-img-top" src="http://placehold.it/700x400" alt=""></a>
<div class="card-body">
<h4 class="card-title">
<a href="#">Project One</a>
</h4>
<p class="card-text">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Amet numquam aspernatur eum quasi sapiente nesciunt? Voluptatibus sit, repellat sequi itaque deserunt, dolores in, nesciunt, illum tempora ex quae? Nihil, dolorem!</p>
</div>
</div>
</div>
And for medium and small devices, I require the following layout:
<div class="row">
<div class="col-md-7">
<a href="#">
<img class="img-fluid rounded mb-3 mb-md-0" src="http://placehold.it/700x300" alt="">
</a>
</div>
<div class="col-md-5">
<h3>Project One</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Laudantium veniam exercitationem expedita laborum at voluptate. Labore, voluptates totam at aut nemo deserunt rem magni pariatur quos perspiciatis atque eveniet unde.</p>
<a class="btn btn-primary" href="#">View Project</a>
</div>
</div>
I am looking for suggestions on how to achieve this efficiently. Any guidance would be appreciated!