Files
school_compare/nextjs-app/components/LoadingSkeleton.module.css

128 lines
1.9 KiB
CSS
Raw Normal View History

.grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
gap: 1.5rem;
}
.skeletonCard {
background: var(--bg-card, white);
border: 1px solid var(--border-color, #e5dfd5);
border-radius: 12px;
padding: 1.5rem;
box-shadow: var(--shadow-soft, 0 2px 8px rgba(26, 22, 18, 0.06));
}
.skeleton {
background: linear-gradient(
90deg,
var(--bg-secondary, #f3ede4) 25%,
rgba(224, 114, 86, 0.08) 50%,
var(--bg-secondary, #f3ede4) 75%
);
background-size: 200% 100%;
animation: shimmer 1.5s ease-in-out infinite;
border-radius: 6px;
}
@keyframes shimmer {
0% {
background-position: 200% 0;
}
100% {
background-position: -200% 0;
}
}
.title {
height: 1.5rem;
width: 80%;
margin-bottom: 1rem;
}
.meta {
display: flex;
gap: 0.5rem;
margin-bottom: 1rem;
}
.tag {
height: 1.5rem;
width: 5rem;
}
.metrics {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 1rem;
margin-bottom: 1.5rem;
padding: 1rem;
background: var(--bg-secondary, #f3ede4);
border-radius: 8px;
}
.metric {
height: 3rem;
}
.actions {
display: flex;
gap: 0.75rem;
}
.button {
flex: 1;
height: 2.5rem;
}
/* List skeleton */
.list {
display: flex;
flex-direction: column;
gap: 1rem;
}
.skeletonListItem {
background: var(--bg-card, white);
border: 1px solid var(--border-color, #e5dfd5);
border-radius: 12px;
padding: 1.5rem;
box-shadow: var(--shadow-soft, 0 2px 8px rgba(26, 22, 18, 0.06));
}
.listTitle {
height: 1.5rem;
width: 60%;
margin-bottom: 0.75rem;
}
.listText {
height: 1rem;
width: 40%;
}
/* Text skeleton */
.textContainer {
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.text {
height: 1rem;
width: 100%;
}
.text:last-child {
width: 70%;
}
@media (max-width: 640px) {
.grid {
grid-template-columns: 1fr;
}
.metrics {
grid-template-columns: 1fr;
}
}