@@ -45,6 +45,7 @@ public static function views($mode = null)
4545 'bootstrap ' => 'bootstrap ' ,
4646 'simple ' => 'simple ' ,
4747 'cursor ' => 'cursor ' ,
48+ 'loading ' => 'loading ' ,
4849 ];
4950
5051 return $ data [$ mode ] ?? $ data ;
@@ -80,15 +81,21 @@ public static function getStyles(?string $mode = 'simple')
8081 return self ::getSimpleCss ();
8182 } elseif ($ mode == self ::views ('bootstrap ' )){
8283 return self ::getBootstrapCss ();
83- }
84- return self ::getCursorCss ();
84+ } elseif ($ mode == self ::views ('loading ' )){
85+ return self ::getLoadingCss ();
86+ } else {
87+ return self ::getCursorCss ();
88+ }
8589 } elseif (STYLE_EXISTS != $ mode ){
8690 if ($ mode == self ::views ('simple ' )){
8791 return self ::getSimpleCss ();
8892 } elseif ($ mode == self ::views ('bootstrap ' )){
8993 return self ::getBootstrapCss ();
90- }
91- return self ::getCursorCss ();
94+ } elseif ($ mode == self ::views ('loading ' )){
95+ return self ::getLoadingCss ();
96+ } else {
97+ return self ::getCursorCss ();
98+ }
9299 }
93100 }
94101
@@ -128,6 +135,18 @@ public static function getCursorCss()
128135 </style> " );
129136 }
130137
138+ /**
139+ * Return loading pagination css style
140+ *
141+ * @return string
142+ */
143+ public static function getLoadingCss ()
144+ {
145+ return self ::compressCss ("<style>
146+ .load-more-container{text-align: center;margin: 20px 0;}.load-more-btn{background-color: #1098ad;color: #fff;border: none;padding: 10px 20px;border-radius: 5px;cursor: pointer;font-weight: 600;}.load-more-btn:hover{background-color: #0e7a8a;}
147+ </style> " );
148+ }
149+
131150 /**
132151 * Compresses CSS by removing comments, compressing spaces, and trimming the resulting string.
133152 *
@@ -157,3 +176,5 @@ private static function compressCss(string $string)
157176 return trim ($ string );
158177 }
159178}
179+
180+
0 commit comments