BLog Pagination for dynamic data - asp.net-mvc

I have to implement pagination for a dynamically binded data for blogs on a page. On the click of the next button the next blog should come and so on.
Below is the code. It is done in asp.net mvc.
</div>
<div class="absolute cust-movetext">
<!-- <small class="text-xs font-semibold text-white">Pet Care</small> -->
#*<h1 class="text-6xl font-semibold text-white">Your Dog’s Best Life In Every Bite.fe In Every Bife In Every Bi</h1>*#
<h1 class="lg:text-4xl md:text-xl text-xl font-semibold text-white mb-2 ">#Model.BlogTitle.ToString()</h1>
<p class="text-sm font-semibold text-white ml-6px"> #Model.BloggerName</p>
</div>
</div>
</section>
<div id="wrapper">
<section>
<div id="pet_offline">
<div class="container mx-auto">
<div class="lg:pt-16 md:pt-8 pt-8 lg:px-12 md:px-12 px-4">
<div class="custp font-weightlow">
<p type="hidden" class="text-3d3d3d font-normal opac-84 lh-33px custp">
#Html.Hidden("BlogId")
#*#Html.Hidden(Model.BlogId)*#
#Html.Raw(Server.HtmlDecode(Model.BlogContent))
</p>
</div>
</div>
</div>
</div>
<div >
<button id="prebtn" class="btn">PREVIOUS</button>
<button id="nexbtn" class="btn" align="right">NEXT</button>
<img src="../content/images/bg-city.png" alt="city" class="w-full" />
</div>
</section>
</div>
Here is the code that has the data binded and I need to add pagination on this. How to do that?

Related

The next section is below previous section

I make card wrap by container
here is my code
i make new section next to this section.. but next section is below this section..
what makes next section is below previous section, btw i am using bootstrap 5
<div class="container-fluid room">
<h2 class="room-section-title text-center"> Our Rooms</h2>
<div class="container d-flex justify-content-evenly align-items-center flex-md-column flex-lg-row flex-column ">
<div class="card mx-3">
<img src="/assets/images/room/Deluxe.jpg" class="card-img-top" alt="...">
<div class="card-body">
<h5 class="card-title">Superior Room</h5>
<p class="card-text">
Some quick example text to build on the card title and make up the bulk of the card's content.
</p>
<div class="btn">
<a class="text-primary text-decoration-none" href="#">Room detail</a>
</div>
</div>
</div>
<div class="card mx-3">
<img src="/assets/images/room/Deluxe.jpg" class="card-img-top" alt="...">
<div class="card-body">
<h5 class="card-title">Deluxe Room</h5>
<p class="card-text">
Some quick example text to build on the card title and make up the bulk of the card's content.
</p>
<div class="btn">
<a class="text-primary text-decoration-none" href="#">Room detail</a>
</div>
</div>
</div>
<div class="card mx-3">
<img src="/assets/images/room/Deluxe.jpg" class="card-img-top" alt="...">
<div class="card-body">
<h5 class="card-title">Suite Room</h5>
<p class="card-text">
Some quick example text to build on the card title and make up the bulk of the card's content.
</p>
<div class="btn">
<a class="text-primary text-decoration-none" href="#">Room detail</a>
</div>
</div>
</div>
</div>
</div>
You have to provide the whole file. Then only we can answer it.

How can I change the order of the parahraph and image on Boostrap 5 only on mobile?

I have tried with both order-xs-1 and order-xs-first, but none is working and i don't know why. I want on mobile the image to be first and the paragraph second.
<div class="container"> <div class="row bg-white g-0"> <div class="col-xs-12 col-sm-12 col-md-6 col-lg-6 col-xl-6 col-xxl-6 pt-5 ps-5 "> <h2 class="fs-1 fw-light">Make It The Best</h2> <h4 class="fs-3 my-3 fw-bold">Unseen experience. Join Us !</h4> <p>A wonderful serenity has taken.</p> <button type="button" class="button px-4 py-3 me-3 mt-2 fs-5">Learn More</button> </div> <div class="col-xs-12 col-sm-12 col-md-6 col-lg-6 col-xl-6 col-xxl-6 "> <img src="/images/section3/drink.jpg" class="img-fluid" alt=""> </div> </div> </div>
There are a lot of things wrong with your code. I would go back and have a proper read of the way bootstrap handles breakpoints. If you have specified col-md-6 you don't need all the other col-SZ-6, as breakpoints work from a resolution UP.
As for your exact problem, it is easily fixed by putting the column first in the HTML and then letting bootstrap move it at the iPad breakpoint with order-md-last:
<div class="container">
<div class="row bg-white g-0">
<div class="col-12 col-md-6 order-md-last mb-3">
<img src="/images/section3/drink.jpg" class="img-fluid" alt="">
</div>
<div class="col-12 col-md-6">
<h1 class="h2 fs-1 fw-light">Make It The Best</h2>
<h2 class="h4 fs-3 my-3 fw-bold">Unseen experience. Join Us !</h4>
<p>A wonderful serenity has taken.</p>
<button type="button" class="button px-4 py-3 me-3 mt-2 fs-5">Learn More</button>
</div>
</div>
</div>
You should also not use H tags to style headings, either apply a H class like I have or use CSS to change the size of your headings. Heading tags should also go in order H1->H2 etc...

Put a link on the right of a card - bootstap

I have a page (show route) that looks like this:
and i would like to position the link to "All Camgrounds" to the right of the card. I tried several things like adding classes like "text-right" or "justify-content-end", but it did not work.
I am using the framework Boostrap-5.
Any help would be much appreciated. Here is the code for the SHOW page :
<% layout('layouts/boilerplate') %>
<div class="row">
<div class="col-6 offset-3">
<div class="card">
<div class="card-header">
<h2>
<%= campground.title %>
</h2>
</div>
<img src="<%= campground.image %>" class="card-img-top" alt="...">
<div class="card-body">
<p class="card-text">
<%= campground.description %>
</p>
</div>
<ul class="list-group list-group-flush">
<li class="list-group-item text-muted">
<%= campground.location %>
</li>
<li class="list-group-item">
$ <%= campground.price %> /night
</li>
</ul>
<div class="card-body">
<a class="card-link btn btn-warning" href="/campgrounds/<%= campground._id %>/edit">Edit</a>
<form class="d-inline" action="/campgrounds/<%= campground._id %>?_method=DELETE" method="post">
<button class="btn btn-danger">Delete</button>
</form>
<a class="card-link d-inline text-right" href="/campgrounds">All
campgrounds</a>
</div>
</div>
</div>
</div>
There are many different ways to align right in Bootstrap 5.
In your case it's probably easiest to use float-end.
<div class="row">
<div class="col-6 offset-3">
<div class="card">
<div class="card-header">
<h2> Title </h2>
</div>
<img src="//via.placeholder.com/500" class="card-img-top" alt="...">
<div class="card-body">
<p class="card-text"> campground.description </p>
</div>
<ul class="list-group list-group-flush">
<li class="list-group-item text-muted"> campground.location </li>
<li class="list-group-item"> $ 39/night </li>
</ul>
<div class="card-body">
<a class="card-link btn btn-warning" href="/campgrounds/<%= campground._id %>/edit">Edit</a>
<form class="d-inline" action="/campgrounds/<%= campground._id %>?_method=DELETE" method="post">
<button class="btn btn-danger">Delete</button>
</form>
<a class="card-link float-end" href="/campgrounds">All campgrounds</a>
</div>
</div>
</div>
</div>
https://codeply.com/p/S9PyKHZC9y
Also note, left and right have been replaced with start and end in Bootstrap 5.

Apply styling for iphone

I am having a issue with the styling for the iphone.
I have this form where it displays list of doctors base on a list of doctors from the db and it it generates the results correctly.
However, when the results are generated, you need to swipe from right to left to see the info.
How can I target only Iphone users so the information is within the frame of the iphone?
Here is the following form I used. Ignore the "##", I am using coldfusion and bootstrap.
$(function(){
$('##myModal').modal('show');
});
<div class="widthResults">
<nav class="hidden-xs visible-md visible-lg" ng-show="ShowResults"><uib-pagination boundary-links="true" max-size="maxPageNumbersToShow" ng-model="currentPage" total-items="resultsCount"> </uib-pagination></nav>
<nav class="visible-xs hidden-md hidden-lg" ng-show="ShowResults"><uib-pager ng-model="currentPage" total-items="resultsCount"> </uib-pager></nav>
<div class="container">
<div id="searchResults" ng-repeat="e in providers" ng-show="ShowResults">
<div class="row">
<hr />
<h4>{{e.FullName}}</h4>
</div>
<div class="row">
<div class="col-md-4 no-margin padding"><strong>Specialty: </strong>{{e.Specialty}}<br />
<span class="padding"><strong>Gender:</strong> {{e.Gender}}</span><br />
<strong>Language(s):</strong> {{e.Languages}}</div>
<div class="col-md-4 no-margin"><strong>Clinic: </strong> <i class="glyphicon glyphicon-map-marker"></i> {{e.Address1}}<br />
<span class="shiftAdd padding">{{e.Address2}} </span><br />
<strong>Phone:</strong> <i class="glyphicon glyphicon-earphone"></i> {{e.Phone | PhoneNumber}}</div>
</div>
</div>
</div>
<nav class="visible-xs hidden-md hidden-lg" ng-show="ShowResults">
<hr /><uib-pager ng-model="currentPage" total-items="resultsCount"> </uib-pager></nav>
</div>

i need help getting ratchet push.js fade transition to work?

this is a basic example calling "two.html", with the fade transition
<div class="content">
<div class="medium-6 columns text-center top">
POSPAId
</div>
</div>
and this is two.html
<div class="content">
<div class="medium-6 columns text-center top">
<a href="index.html" data-transition="slide-out">
back
</a>
</div>
</div>

Resources