Skip to content

Commit

Permalink
add a loading gif when clicking see more on home
Browse files Browse the repository at this point in the history
  • Loading branch information
SurajBhari committed Jul 9, 2024
1 parent e5b7f8e commit 64901c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion templates/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ <h6 class="card-title" id="{{ channel['id'] }}">{{ channel['name'] }}</h6>
<div class="col-3" id="more-card">
<a href="#a" onclick="set_all()">
<div class="card noborder">
<img class="card-img-top rounded" src="/static/right.png" alt="Card image cap" load="lazy">
<img class="card-img-top rounded" src="/static/right.png" alt="Card image cap" load="lazy" id="more-img">
<div class="card-body card-no-left-right-padding">
<h6 class="card-title"> See More </h6>
</div>
Expand Down
2 changes: 2 additions & 0 deletions templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v6.5.1/css/all.css">
<link rel="preload" href="https://media.tenor.com/wpSo-8CrXqUAAAAi/loading-loading-forever.gif" as="image">
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
<link href="https://fonts.googleapis.com/css2?family=Exo+2:wght@400;700&display=swap" rel="stylesheet">
Expand All @@ -19,6 +20,7 @@

function set_all(){
all = true;
document.getElementById("more-img").src = "https://media.tenor.com/wpSo-8CrXqUAAAAi/loading-loading-forever.gif";
update_mini_stats();
}
function timeSince(previous) {
Expand Down

0 comments on commit 64901c8

Please sign in to comment.