-
Notifications
You must be signed in to change notification settings - Fork 369
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add skeleton loading screen in home page
- Loading branch information
1 parent
e926330
commit cabf83c
Showing
2 changed files
with
82 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,53 +57,32 @@ | |
<link rel="stylesheet" href="https://unpkg.com/aos@next/dist/aos.css" /> | ||
<link rel="stylesheet" href="registor_btn.css" /> | ||
|
||
<body> | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>SkillWise Homepage</title> | ||
<link rel="stylesheet" href="style.css"> <!-- Link to your CSS file --> | ||
</head> | ||
<body> | ||
|
||
<!-- Skeleton loader section --> | ||
<div class="skeleton-loader"> | ||
<div class="skeleton skeleton-text"></div> | ||
<div class="skeleton skeleton-text short"></div> | ||
<div class="skeleton skeleton-image"></div> | ||
<div class="skeleton skeleton-card"></div> | ||
</div> | ||
<div id="skeleton-loader" style="display: flex; flex-direction: column; gap: 1rem; padding: 1rem;"> | ||
<!-- Hero Section Placeholder --> | ||
<div class="skeleton skeleton-hero"></div> | ||
|
||
<!-- Category Cards Placeholder --> | ||
<div class="skeleton-category-section"> | ||
<div class="skeleton skeleton-category"></div> | ||
<div class="skeleton skeleton-category"></div> | ||
<div class="skeleton skeleton-category"></div> | ||
</div> | ||
|
||
<!-- Actual content, initially hidden --> | ||
<div class="content" style="display: none;"> | ||
<h1>Welcome to SkillWise!</h1> | ||
<p>This is the actual content that will appear after loading.</p> | ||
<img src="path/to/image.jpg" alt="SkillWise image"> | ||
<!-- Featured Courses Placeholder --> | ||
<div class="skeleton-courses-section"> | ||
<div class="skeleton skeleton-course"></div> | ||
<div class="skeleton skeleton-course"></div> | ||
<div class="skeleton skeleton-course"></div> | ||
</div> | ||
</div> | ||
|
||
<script> | ||
// Simulate loading time, toggle skeleton and content visibility | ||
document.addEventListener("DOMContentLoaded", () => { | ||
setTimeout(() => { | ||
document.querySelector('.skeleton-loader').style.display = 'none'; | ||
document.querySelector('.content').style.display = 'block'; | ||
}, 2000); // Adjust delay based on loading time | ||
}); | ||
</script> | ||
|
||
</body> | ||
</html> | ||
|
||
<!-- Main Content --> | ||
<div id="main-content" style="display: none;"> | ||
|
||
|
||
<!-- | ||
- PRELOADER | ||
--> | ||
|
||
<div class="preloader" data-preloader> | ||
<div class="circle" data-circle></div> | ||
</div> | ||
|
||
|
||
|
||
|
@@ -1712,7 +1691,7 @@ <h3 class="event-title">Creative Design Thinking</h3> | |
|
||
</footer> | ||
|
||
|
||
</div> | ||
|
||
<!--JS for searching courses --> | ||
<script> | ||
|
@@ -1802,6 +1781,15 @@ <h3 class="event-title">Creative Design Thinking</h3> | |
<!-- Bootstrap JS Bundle (Optional) --> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script> | ||
|
||
<script> | ||
window.addEventListener("load", function() { | ||
setTimeout(() => { | ||
document.getElementById("skeleton-loader").style.display = "none"; | ||
document.getElementById("main-content").style.display = "block"; | ||
}, 1000); // 1 second delay | ||
}); | ||
</script> | ||
|
||
</body> | ||
|
||
</html> |