Optimize list API payloads and replace homepage swiper with a lighter slider.

Skip unused HTML and metadata from client/admin list queries so pages load less data, and load banner detail by id.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-05 15:27:42 +05:00
parent ca0692d190
commit 8d7390894e
8 changed files with 3827 additions and 250 deletions

View File

@@ -168,152 +168,70 @@ blockquote {
}
/* END Basic styles */
/* CAROUSEL */
.image {
width: 100%;
height: 70%;
}
/* CAROUSEL / custom homepage slider (matches tbbank.gov.tm) */
.images {
overflow: hidden;
top: 0;
bottom: 0;
left: 0;
right: 0;
width: 100%;
}
.images-inner {
width: 500%;
transition: all 800ms cubic-bezier(0.770, 0.000, 0.175, 1.000);
transition-timing-function: cubic-bezier(0.770, 0.000, 0.175, 1.000);
.custom-slider,
.images {
overflow: hidden;
width: 100%;
}
.image-slide {
width: 20%;
float: left;
.custom-slider {
position: relative;
touch-action: pan-y;
cursor: grab;
max-height: 640px;
max-width: 1280px;
margin: 0 auto;
transition: height 0.35s ease;
}
.image-slide,
.fake-radio,
.radio-btn {
transition: all 0.5s ease-out;
.custom-slider:active {
cursor: grabbing;
}
.fake-radio {
float: right;
.custom-slider .slider-track {
display: flex;
align-items: flex-start;
width: 100%;
transition: transform 0.6s ease;
will-change: transform;
}
/* Move slides overflowed container */
#slide1:checked~.images .images-inner {
margin-left: 0;
.custom-slider .slider-track.is-dragging {
transition: none;
}
#slide2:checked~.images .images-inner {
margin-left: -100%;
.custom-slider .slider-slide {
flex: 0 0 100%;
width: 100%;
min-width: 100%;
max-height: 640px;
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
-webkit-user-drag: none;
}
#slide3:checked~.images .images-inner {
margin-left: -200%;
.custom-slider .slider-slide img {
width: 100%;
max-width: 100%;
max-height: 640px;
height: auto;
-o-object-fit: contain;
object-fit: contain;
margin: 0 auto;
pointer-events: none;
}
/* Color of bullets */
#slide1:checked~div .fake-radio .radio-btn:nth-child(1),
#slide2:checked~div .fake-radio .radio-btn:nth-child(2),
#slide3:checked~div .fake-radio .radio-btn:nth-child(3) {
background: red;
}
.radio-btn {
width: 9px;
height: 9px;
border-radius: 5px;
background: gray;
display: inline-block !important;
margin: 0 1px;
cursor: pointer;
}
/* Color of bullets - END */
/* Text of slides */
#slide1:checked~.labels .label:nth-child(1),
#slide2:checked~.labels .label:nth-child(2),
#slide3:checked~.labels .label:nth-child(3) {
opacity: 1;
}
.label {
opacity: 0;
position: absolute;
}
/* Text of slides - END */
#play1:checked~div .fake-radio .radio-btn:nth-child(1) {
animation: bullet 12300ms infinite -1000ms;
}
#play1:checked~div .fake-radio .radio-btn:nth-child(2) {
animation: bullet 12300ms infinite 3100ms;
}
#play1:checked~div .fake-radio .radio-btn:nth-child(3) {
animation: bullet 12300ms infinite 7200ms;
}
/* Calculate AUTOPLAY for BULLETS - END */
/* Calculate AUTOPLAY for SLIDES */
@keyframes slide {
0%,
25.203252032520325% {
margin-left: 0;
}
33.333333333333336%,
58.53658536585366% {
margin-left: -100%;
}
66.66666666666667%,
91.869918699187% {
margin-left: -200%;
}
}
.st-slider>#play1:checked~.images .images-inner {
animation: slide 12300ms infinite;
}
/* Calculate AUTOPLAY for SLIDES - END */
/* Calculate AUTOPLAY for CAPTION */
@keyframes caption {
0%,
33.32333333333334% {
opacity: 1;
}
33.333333333333336%,
100% {
opacity: 0;
}
}
#play1:checked~.labels .label:nth-child(1) {
animation: caption 12300ms infinite -1000ms;
}
#play1:checked~.labels .label:nth-child(2) {
animation: caption 12300ms infinite 3100ms;
}
#play1:checked~.labels .label:nth-child(3) {
animation: caption 12300ms infinite 7200ms;
.custom-slider .slider-slide a,
.custom-slider .slider-slide img {
display: block;
-webkit-user-drag: none;
}
/* END CAROUSEL */