diff --git a/assets/css/style.css b/assets/css/style.css index f0ca458..ef582bd 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -2376,3 +2376,56 @@ body { } } +.skeleton { + background-color: #e0e0e0; + border-radius: 4px; + overflow: hidden; + position: relative; +} + +/* Hero section */ +.skeleton-hero { + width: 100%; + height: 250px; + margin-bottom: 1.5rem; +} + +/* Category cards */ +.skeleton-category-section { + display: flex; + gap: 1rem; +} +.skeleton-category { + width: 30%; + height: 100px; +} + +/* Featured courses */ +.skeleton-courses-section { + display: flex; + flex-wrap: wrap; + gap: 1rem; +} +.skeleton-course { + width: 48%; + height: 150px; + margin-bottom: 1rem; +} + +/* Loading animation */ +.skeleton::after { + content: ""; + position: absolute; + top: 0; + left: -100%; + width: 100%; + height: 100%; + background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent); + animation: loading 1.5s infinite; +} + +@keyframes loading { + 0% { left: -100%; } + 100% { left: 100%; } +} + diff --git a/index.html b/index.html index 692afe7..2b8d35c 100644 --- a/index.html +++ b/index.html @@ -59,13 +59,30 @@ - +
+ +
+ + +
+
+
+
+
+ + +
+
+
+
+
+
+ + + + + diff --git a/style.css b/style.css index 52a7261..b113e7b 100644 --- a/style.css +++ b/style.css @@ -237,4 +237,62 @@ background-color: rgba(0, 0, 0, 0.977); transform: scale(1.3); color: white; -} \ No newline at end of file +} +/* Basic styles for the skeleton loader */ +.skeleton-loader { + display: flex; + flex-direction: column; + gap: 1rem; + padding: 2rem; +} + +.skeleton { + background-color: #e0e0e0; + position: relative; + overflow: hidden; + border-radius: 4px; +} + +/* Different skeleton shapes */ +.skeleton-text { + width: 100%; + height: 16px; +} + +.skeleton-text.short { + width: 60%; +} + +.skeleton-image { + width: 100%; + height: 200px; + border-radius: 8px; +} + +.skeleton-card { + width: 100%; + height: 150px; + border-radius: 8px; +} + +/* Shimmer animation for loading effect */ +.skeleton::before { + content: ''; + position: absolute; + top: 0; + left: -150px; + height: 100%; + width: 150px; + background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent); + animation: shimmer 1.5s infinite; +} + +@keyframes shimmer { + 0% { transform: translateX(-100%); } + 100% { transform: translateX(100%); } +} + +/* Style for the actual content (hidden initially) */ +.content { + padding: 2rem; +}