learning-opportunities done
Signed-off-by: Jeff <jeff@gotenzing.com>
Showing
12 changed files
with
715 additions
and
460 deletions
| ... | @@ -14571,6 +14571,9 @@ input[type=checkbox] { | ... | @@ -14571,6 +14571,9 @@ input[type=checkbox] { |
| 14571 | display: block; | 14571 | display: block; |
| 14572 | font-size: 18px; | 14572 | font-size: 18px; |
| 14573 | } | 14573 | } |
| 14574 | .wpcf7 .contact-form input[type=submit]:hover { | ||
| 14575 | background-color: #2C2C2C; | ||
| 14576 | } | ||
| 14574 | 14577 | ||
| 14575 | .no-bullets { | 14578 | .no-bullets { |
| 14576 | list-style: none; | 14579 | list-style: none; |
| ... | @@ -15152,11 +15155,140 @@ input[type=checkbox] { | ... | @@ -15152,11 +15155,140 @@ input[type=checkbox] { |
| 15152 | content: "" !important; | 15155 | content: "" !important; |
| 15153 | } | 15156 | } |
| 15154 | 15157 | ||
| 15155 | .thumbnail { | 15158 | label[for=quicksearch] { |
| 15159 | font-size: 18px; | ||
| 15160 | line-height: 24px; | ||
| 15161 | color: #0484B8; | ||
| 15162 | text-transform: uppercase; | ||
| 15163 | } | ||
| 15164 | |||
| 15165 | #quicksearch { | ||
| 15166 | width: 600px; | ||
| 15167 | border-bottom: 1px solid #8E908F !important; | ||
| 15168 | } | ||
| 15169 | |||
| 15170 | .filters { | ||
| 15171 | border-bottom: 1px solid #FFA300 !important; | ||
| 15172 | border-top: 1px solid #FFA300 !important; | ||
| 15173 | padding: 10px 0px 10px 0px; | ||
| 15174 | } | ||
| 15175 | .filters .glyphicon-chevron-up::after { | ||
| 15176 | content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='19.432' height='11.567' viewBox='0 0 19.432 11.567'%3E%3Cpath id='Path_1875' data-name='Path 1875' d='M395.235 274.525a1.19 1.19 0 0 0 1.681.063l9.188-8.526a1.19 1.19 0 0 0 0-1.744l-9.187-8.526a1.19 1.19 0 1 0-1.619 1.744l8.248 7.654-8.248 7.654a1.19 1.19 0 0 0-.063 1.681Z' transform='translate(274.905 -394.917) rotate(90)' fill='%230484b8'/%3E%3C/svg%3E"); | ||
| 15177 | } | ||
| 15178 | .filters .glyphicon-chevron-down::after { | ||
| 15179 | content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='19.631' height='11.905' viewBox='0 0 19.631 11.905'%3E%3Cpath id='Path_1875' data-name='Path 1875' d='M395.235 274.525a1.19 1.19 0 0 0 1.681.063l9.188-8.526a1.19 1.19 0 0 0 0-1.744l-9.187-8.526a1.19 1.19 0 1 0-1.619 1.744l8.248 7.654-8.248 7.654a1.19 1.19 0 0 0-.063 1.681Z' transform='matrix(-0.017 -1 1 -0.017 -248.34 411.22)' fill='%230484b8'/%3E%3C/svg%3E"); | ||
| 15180 | } | ||
| 15181 | .filters #filter-more { | ||
| 15182 | font-size: 18px; | ||
| 15183 | line-height: 24px; | ||
| 15184 | color: #0484B8; | ||
| 15185 | text-transform: uppercase; | ||
| 15186 | text-decoration: none; | ||
| 15187 | padding: 10px 0px; | ||
| 15188 | display: block; | ||
| 15189 | } | ||
| 15190 | .filters .filter-group { | ||
| 15191 | display: none; | ||
| 15192 | flex-direction: row; | ||
| 15193 | justify-content: space-between; | ||
| 15194 | margin-bottom: 20px; | ||
| 15195 | } | ||
| 15196 | .filters .filter-group .sort-button-group .btn, .filters .filter-group .sort-button-group .wpcf7 input[type=submit], .wpcf7 .filters .filter-group .sort-button-group input[type=submit], .filters .filter-group .sort-button-group .woocommerce-notices-wrapper .woocommerce-message a.button, .woocommerce-notices-wrapper .woocommerce-message .filters .filter-group .sort-button-group a.button, .filters .filter-group .sort-button-group .woocommerce-info a.button, .woocommerce-info .filters .filter-group .sort-button-group a.button { | ||
| 15197 | border: 1px solid #0081BC; | ||
| 15198 | } | ||
| 15199 | .filters .filter-group.open { | ||
| 15200 | display: flex; | ||
| 15201 | } | ||
| 15202 | |||
| 15203 | .category-filter-group { | ||
| 15204 | display: flex; | ||
| 15205 | flex-direction: row; | ||
| 15206 | } | ||
| 15207 | |||
| 15208 | .category-filter { | ||
| 15209 | display: flex; | ||
| 15210 | flex-direction: row; | ||
| 15211 | font-size: 18px; | ||
| 15212 | font-size: 1.125rem; | ||
| 15213 | color: #515151; | ||
| 15214 | margin: 0.25rem 0; | ||
| 15215 | margin-right: 1rem; | ||
| 15216 | } | ||
| 15217 | .category-filter label { | ||
| 15218 | padding-left: 30px; | ||
| 15219 | padding-right: 10px; | ||
| 15220 | white-space: nowrap; | ||
| 15221 | cursor: pointer; | ||
| 15222 | color: #2C2C2C; | ||
| 15223 | } | ||
| 15224 | .category-filter input[type=checkbox] { | ||
| 15225 | display: inline-block; | ||
| 15226 | margin-left: 30px; | ||
| 15227 | margin-left: 0; | ||
| 15228 | } | ||
| 15229 | .category-filter input[type=checkbox]:focus + label { | ||
| 15230 | outline: -webkit-focus-ring-color auto 1px; | ||
| 15231 | } | ||
| 15232 | .category-filter label:before { | ||
| 15233 | content: ""; | ||
| 15234 | cursor: pointer; | ||
| 15235 | height: 25px; | ||
| 15236 | width: 25px; | ||
| 15237 | padding: 2.5px; | ||
| 15238 | display: inline-block; | ||
| 15239 | position: absolute; | ||
| 15240 | background: #FFF; | ||
| 15241 | margin-left: -30px; | ||
| 15242 | border: 2px solid #0081BC; | ||
| 15243 | border-radius: 4px; | ||
| 15244 | } | ||
| 15245 | .category-filter input:checked + label:before { | ||
| 15246 | background: #0081BC !important; | ||
| 15247 | border: 2px solid #0081BC; | ||
| 15248 | content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15.078' height='18.352' viewBox='0 0 15.078 18.352'%3E%3Cpath id='Path_1871' data-name='Path 1871' d='M137.622 43.1l1.28 2.211 6.924-11.987a1.837 1.837 0 0 1 3.2 1.8l-8.5 14.722a1.931 1.931 0 0 1-3.259 0L134.48 44.9a1.812 1.812 0 1 1 3.142-1.8Z' transform='translate(-134.203 -32.392)' fill='%23fff' fill-rule='evenodd'/%3E%3C/svg%3E"); | ||
| 15249 | height: 25px; | ||
| 15250 | width: 25px; | ||
| 15251 | padding: 2px 4px; | ||
| 15252 | background-position: 4px; | ||
| 15253 | background-size: 22px; | ||
| 15254 | background-repeat: no-repeat; | ||
| 15255 | position: absolute; | ||
| 15256 | cursor: pointer; | ||
| 15257 | } | ||
| 15258 | .category-filter input[type=checkbox] { | ||
| 15259 | background-color: initial; | ||
| 15260 | cursor: default; | ||
| 15261 | -webkit-appearance: auto; | ||
| 15262 | -moz-appearance: auto; | ||
| 15263 | appearance: auto; | ||
| 15264 | box-sizing: border-box; | ||
| 15265 | margin: 3px 3px 3px 4px; | ||
| 15266 | padding: initial; | ||
| 15267 | border: initial; | ||
| 15268 | position: relative; | ||
| 15269 | } | ||
| 15270 | .category-filter .sr-only { | ||
| 15271 | position: absolute !important; | ||
| 15272 | clip: rect(1px, 1px, 1px, 1px); | ||
| 15273 | padding: 0; | ||
| 15274 | border: 0; | ||
| 15275 | height: 1px; | ||
| 15276 | width: 1px; | ||
| 15277 | overflow: hidden; | ||
| 15278 | } | ||
| 15279 | |||
| 15280 | .card { | ||
| 15281 | background: var(--unnamed-color-ffffff) 0% 0% no-repeat padding-box; | ||
| 15282 | background: #FFFFFF 0% 0% no-repeat padding-box; | ||
| 15283 | box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.1607843137); | ||
| 15284 | border-radius: 0px; | ||
| 15285 | border-width: 0px; | ||
| 15286 | min-height: 526px; | ||
| 15287 | } | ||
| 15288 | .card .thumbnail { | ||
| 15156 | line-height: 1.428571429; | 15289 | line-height: 1.428571429; |
| 15157 | background-color: #ffffff; | 15290 | background-color: #ffffff; |
| 15158 | border: 1px solid #dddddd; | 15291 | border: 1px solid #dddddd; |
| 15159 | border-radius: 4px; | ||
| 15160 | transition: all 0.2s ease-in-out; | 15292 | transition: all 0.2s ease-in-out; |
| 15161 | display: inline-block; | 15293 | display: inline-block; |
| 15162 | max-width: 100%; | 15294 | max-width: 100%; |
| ... | @@ -15166,14 +15298,13 @@ input[type=checkbox] { | ... | @@ -15166,14 +15298,13 @@ input[type=checkbox] { |
| 15166 | padding: 0; | 15298 | padding: 0; |
| 15167 | margin: 0; | 15299 | margin: 0; |
| 15168 | } | 15300 | } |
| 15169 | 15301 | .card .thumbnail .ribbon { | |
| 15170 | .thumbnail .ribbon { | 15302 | background: #E8D44B; |
| 15171 | background: #5cb85c; | ||
| 15172 | box-shadow: 0 1px rgba(0, 0, 0, 0.2); | 15303 | box-shadow: 0 1px rgba(0, 0, 0, 0.2); |
| 15173 | -moz-box-shadow: 0 1px rgba(0, 0, 0, 0.2); | 15304 | -moz-box-shadow: 0 1px rgba(0, 0, 0, 0.2); |
| 15174 | -webkit-box-shadow: 0 1px rgba(0, 0, 0, 0.2); | 15305 | -webkit-box-shadow: 0 1px rgba(0, 0, 0, 0.2); |
| 15175 | color: #fff; | 15306 | color: #2C2C2C; |
| 15176 | text-shadow: 0 1px rgba(0, 0, 0, 0.3); | 15307 | text-transform: uppercase; |
| 15177 | position: absolute; | 15308 | position: absolute; |
| 15178 | font-size: 14px; | 15309 | font-size: 14px; |
| 15179 | left: -8px; | 15310 | left: -8px; |
| ... | @@ -15182,17 +15313,11 @@ input[type=checkbox] { | ... | @@ -15182,17 +15313,11 @@ input[type=checkbox] { |
| 15182 | padding: 3px 10px; | 15313 | padding: 3px 10px; |
| 15183 | z-index: 2; | 15314 | z-index: 2; |
| 15184 | border-radius: 0px; | 15315 | border-radius: 0px; |
| 15185 | font-weight: bold; | ||
| 15186 | } | ||
| 15187 | |||
| 15188 | .thumbnail .ribbon.enrolled { | ||
| 15189 | background: #428bca; | ||
| 15190 | } | 15316 | } |
| 15191 | 15317 | .card .thumbnail .ribbon:before { | |
| 15192 | .thumbnail .ribbon:before { | ||
| 15193 | border: 4px solid transparent; | 15318 | border: 4px solid transparent; |
| 15194 | border-top: 4px solid #348c34; | 15319 | border-top: 4px solid #C3B241; |
| 15195 | border-right: 4px solid #348c34; | 15320 | border-right: 4px solid #C3B241; |
| 15196 | content: ""; | 15321 | content: ""; |
| 15197 | position: absolute; | 15322 | position: absolute; |
| 15198 | left: 0; | 15323 | left: 0; |
| ... | @@ -15200,97 +15325,7 @@ input[type=checkbox] { | ... | @@ -15200,97 +15325,7 @@ input[type=checkbox] { |
| 15200 | border-radius: 0px; | 15325 | border-radius: 0px; |
| 15201 | bottom: -8px; | 15326 | bottom: -8px; |
| 15202 | } | 15327 | } |
| 15203 | 15328 | .card .thumbnail img { | |
| 15204 | .thumbnail .ribbon.enrolled:before { | ||
| 15205 | border-top: 4px solid #357ebd; | ||
| 15206 | border-right: 4px solid #357ebd; | ||
| 15207 | } | ||
| 15208 | |||
| 15209 | .entry-title { | ||
| 15210 | margin: 0 !important; | ||
| 15211 | } | ||
| 15212 | |||
| 15213 | .entry-content { | ||
| 15214 | margin-bottom: 10px; | ||
| 15215 | padding: 0; | ||
| 15216 | } | ||
| 15217 | |||
| 15218 | .items-wrapper_button { | ||
| 15219 | margin: 5px 0 !important; | ||
| 15220 | width: 100%; | ||
| 15221 | } | ||
| 15222 | |||
| 15223 | .items-wrapper_button a { | ||
| 15224 | text-decoration: none !important; | ||
| 15225 | width: 100%; | ||
| 15226 | } | ||
| 15227 | |||
| 15228 | .thumbnail a.btn-primary { | ||
| 15229 | color: white; | ||
| 15230 | } | ||
| 15231 | |||
| 15232 | .btn, .wpcf7 input[type=submit], .woocommerce-notices-wrapper .woocommerce-message a.button, .woocommerce-info a.button { | ||
| 15233 | display: inline-block; | ||
| 15234 | padding: 6px 12px; | ||
| 15235 | margin-bottom: 0; | ||
| 15236 | font-size: 14px; | ||
| 15237 | font-weight: normal; | ||
| 15238 | line-height: 1.428571429; | ||
| 15239 | text-align: center; | ||
| 15240 | vertical-align: middle; | ||
| 15241 | cursor: pointer; | ||
| 15242 | border: 1px solid transparent; | ||
| 15243 | border-radius: 4px; | ||
| 15244 | white-space: nowrap; | ||
| 15245 | -webkit-user-select: none; | ||
| 15246 | -moz-user-select: none; | ||
| 15247 | -o-user-select: none; | ||
| 15248 | user-select: none; | ||
| 15249 | } | ||
| 15250 | |||
| 15251 | .btn:focus, .wpcf7 input[type=submit]:focus, .woocommerce-notices-wrapper .woocommerce-message a.button:focus, .woocommerce-info a.button:focus { | ||
| 15252 | outline: thin dotted #333; | ||
| 15253 | outline: 5px auto -webkit-focus-ring-color; | ||
| 15254 | outline-offset: -2px; | ||
| 15255 | } | ||
| 15256 | |||
| 15257 | .btn:hover, .wpcf7 input[type=submit]:hover, .woocommerce-notices-wrapper .woocommerce-message a.button:hover, .woocommerce-info a.button:hover, .learndash-course-grid .btn:focus, .learndash-course-grid .wpcf7 input[type=submit]:focus, .wpcf7 .learndash-course-grid input[type=submit]:focus, .learndash-course-grid .woocommerce-notices-wrapper .woocommerce-message a.button:focus, .woocommerce-notices-wrapper .woocommerce-message .learndash-course-grid a.button:focus, .learndash-course-grid .woocommerce-info a.button:focus, .woocommerce-info .learndash-course-grid a.button:focus { | ||
| 15258 | color: #333333; | ||
| 15259 | text-decoration: none; | ||
| 15260 | } | ||
| 15261 | |||
| 15262 | .btn:active, .wpcf7 input[type=submit]:active, .woocommerce-notices-wrapper .woocommerce-message a.button:active, .woocommerce-info a.button:active { | ||
| 15263 | outline: 0; | ||
| 15264 | background-image: none; | ||
| 15265 | box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); | ||
| 15266 | } | ||
| 15267 | |||
| 15268 | .btn-primary { | ||
| 15269 | color: #ffffff; | ||
| 15270 | background-color: #428bca; | ||
| 15271 | border-color: #357ebd; | ||
| 15272 | } | ||
| 15273 | |||
| 15274 | .btn-primary:hover, .learndash-course-grid .btn-primary:focus, .learndash-course-grid .btn-primary:active { | ||
| 15275 | color: #ffffff; | ||
| 15276 | background-color: #3276b1; | ||
| 15277 | border-color: #285e8e; | ||
| 15278 | } | ||
| 15279 | |||
| 15280 | .btn-primary:active { | ||
| 15281 | background-image: none; | ||
| 15282 | } | ||
| 15283 | |||
| 15284 | .btn-primary { | ||
| 15285 | color: white; | ||
| 15286 | text-decoration: none; | ||
| 15287 | } | ||
| 15288 | |||
| 15289 | .btn-primary:hover { | ||
| 15290 | color: white; | ||
| 15291 | } | ||
| 15292 | |||
| 15293 | .thumbnail img { | ||
| 15294 | display: block; | 15329 | display: block; |
| 15295 | max-width: 100%; | 15330 | max-width: 100%; |
| 15296 | width: 100%; | 15331 | width: 100%; |
| ... | @@ -15300,43 +15335,63 @@ input[type=checkbox] { | ... | @@ -15300,43 +15335,63 @@ input[type=checkbox] { |
| 15300 | box-shadow: none; | 15335 | box-shadow: none; |
| 15301 | max-height: 400px; | 15336 | max-height: 400px; |
| 15302 | } | 15337 | } |
| 15303 | 15338 | .card .content { | |
| 15304 | .thumbnail a, .learndash-course-grid .thumbnail a:hover { | 15339 | padding: 15px; |
| 15305 | box-shadow: none; | 15340 | display: flex; |
| 15341 | flex-direction: column; | ||
| 15342 | flex: 1; | ||
| 15306 | } | 15343 | } |
| 15307 | 15344 | .card .content .entry-title { | |
| 15308 | .thumbnail .caption { | 15345 | margin-top: 0px; |
| 15309 | padding: 9px; | 15346 | text-transform: uppercase; |
| 15310 | color: #333333; | 15347 | text-align: center; |
| 15348 | font-size: 18px; | ||
| 15349 | line-height: 24px; | ||
| 15311 | } | 15350 | } |
| 15312 | 15351 | .card .content .entry-content { | |
| 15313 | .thumbnail .caption a { | 15352 | text-align: center; |
| 15314 | text-decoration: none !important; | 15353 | font-size: 16px; |
| 15354 | line-height: 24px; | ||
| 15315 | } | 15355 | } |
| 15316 | 15356 | .card .content .btn, .card .content .wpcf7 input[type=submit], .wpcf7 .card .content input[type=submit], .card .content .woocommerce-notices-wrapper .woocommerce-message a.button, .woocommerce-notices-wrapper .woocommerce-message .card .content a.button, .card .content .woocommerce-info a.button, .woocommerce-info .card .content a.button { | |
| 15317 | .thumbnail .caption p { | 15357 | display: flex; |
| 15318 | float: none !important; | 15358 | align-self: center; |
| 15319 | margin: 15px 0 0 !important; | 15359 | background-color: #0484B8; |
| 15320 | width: 100% !important; | 15360 | color: #fff; |
| 15361 | border-radius: 0px; | ||
| 15362 | font-size: 18px; | ||
| 15363 | margin-top: auto; | ||
| 15364 | margin-bottom: 20px; | ||
| 15365 | } | ||
| 15366 | .card .content .btn:hover, .card .content .wpcf7 input[type=submit]:hover, .wpcf7 .card .content input[type=submit]:hover, .card .content .woocommerce-notices-wrapper .woocommerce-message a.button:hover, .woocommerce-notices-wrapper .woocommerce-message .card .content a.button:hover, .card .content .woocommerce-info a.button:hover, .woocommerce-info .card .content a.button:hover { | ||
| 15367 | background-color: #2C2C2C; | ||
| 15321 | } | 15368 | } |
| 15322 | 15369 | ||
| 15323 | .element-item { | 15370 | .course-list .element-item { |
| 15324 | position: relative; | 15371 | position: relative; |
| 15325 | float: left; | 15372 | float: left; |
| 15326 | width: calc(33% - 30px); | 15373 | width: calc(33.33% - 30px); |
| 15327 | height: 600px; | 15374 | height: 600px; |
| 15328 | margin: 5px; | 15375 | margin: 15px; |
| 15329 | padding: 10px; | 15376 | padding: 10px; |
| 15330 | } | 15377 | } |
| 15331 | 15378 | ||
| 15332 | .element-item > * { | 15379 | .view-plan { |
| 15333 | margin: 0; | 15380 | width: 100%; |
| 15334 | padding: 0; | 15381 | text-align: center; |
| 15335 | } | 15382 | } |
| 15336 | 15383 | .view-plan #load-more { | |
| 15337 | #load-more { | 15384 | margin: auto; |
| 15338 | float: right; | 15385 | background-color: #0484B8; |
| 15339 | margin: 5px; | 15386 | color: #fff; |
| 15387 | border-radius: 0px; | ||
| 15388 | font-size: 18px; | ||
| 15389 | margin-top: auto; | ||
| 15390 | margin-bottom: 20px; | ||
| 15391 | text-transform: uppercase; | ||
| 15392 | } | ||
| 15393 | .view-plan #load-more:hover { | ||
| 15394 | background-color: #2C2C2C; | ||
| 15340 | } | 15395 | } |
| 15341 | 15396 | ||
| 15342 | .hidden { | 15397 | .hidden { | ... | ... |
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
| ... | @@ -4,8 +4,8 @@ | ... | @@ -4,8 +4,8 @@ |
| 4 | add_shortcode( 'promos', 'promos' ); | 4 | add_shortcode( 'promos', 'promos' ); |
| 5 | 5 | ||
| 6 | 6 | ||
| 7 | function promos() | 7 | function promos(){ |
| 8 | { | 8 | |
| 9 | $custom_args = array( | 9 | $custom_args = array( |
| 10 | 'post_type' => 'promo', | 10 | 'post_type' => 'promo', |
| 11 | 'posts_per_page' => 3, | 11 | 'posts_per_page' => 3, |
| ... | @@ -13,10 +13,11 @@ function promos() | ... | @@ -13,10 +13,11 @@ function promos() |
| 13 | ); | 13 | ); |
| 14 | $custom_query = new \WP_Query($custom_args); | 14 | $custom_query = new \WP_Query($custom_args); |
| 15 | 15 | ||
| 16 | ob_start(); | 16 | ob_start(); |
| 17 | $uniqid = uniqid(); | 17 | $uniqid = uniqid(); |
| 18 | if ($custom_query->have_posts()):?> | 18 | if ($custom_query->have_posts()):?> |
| 19 | <div class="carousel"> | 19 | |
| 20 | <div class="carousel"> | ||
| 20 | <div id="<?php echo $uniqid; ?>" class="promo-carousel carousel-items"> | 21 | <div id="<?php echo $uniqid; ?>" class="promo-carousel carousel-items"> |
| 21 | <div class='swiper-wrapper'> | 22 | <div class='swiper-wrapper'> |
| 22 | <?php while ($custom_query->have_posts()): $custom_query->the_post(); | 23 | <?php while ($custom_query->have_posts()): $custom_query->the_post(); |
| ... | @@ -28,15 +29,15 @@ function promos() | ... | @@ -28,15 +29,15 @@ function promos() |
| 28 | <div class="swiper-button-next" data-id="<?= $uniqid; ?>"></div> | 29 | <div class="swiper-button-next" data-id="<?= $uniqid; ?>"></div> |
| 29 | </div> | 30 | </div> |
| 30 | </div> | 31 | </div> |
| 31 | <?php endif; ?> | 32 | |
| 32 | <?php wp_reset_query(); ?> | 33 | <?php endif; |
| 33 | <?php $output = ob_get_clean(); | 34 | wp_reset_query(); |
| 34 | 35 | $output = ob_get_clean(); | |
| 35 | return $output; | 36 | return $output; |
| 36 | } | 37 | } |
| 37 | 38 | ||
| 38 | function promos_slides($id) | 39 | function promos_slides($id){ |
| 39 | { | 40 | |
| 40 | ob_start(); | 41 | ob_start(); |
| 41 | $post = get_post($id); | 42 | $post = get_post($id); |
| 42 | $link = get_permalink($id); | 43 | $link = get_permalink($id); |
| ... | @@ -49,8 +50,8 @@ function promos_slides($id) | ... | @@ -49,8 +50,8 @@ function promos_slides($id) |
| 49 | } | 50 | } |
| 50 | $text = str_replace(']]>', ']]>', apply_filters( 'the_content', strip_shortcodes($post->post_content))); | 51 | $text = str_replace(']]>', ']]>', apply_filters( 'the_content', strip_shortcodes($post->post_content))); |
| 51 | $excerpt_length = apply_filters( 'excerpt_length', 40 ); | 52 | $excerpt_length = apply_filters( 'excerpt_length', 40 ); |
| 52 | $text = wp_trim_words( $text, $excerpt_length, ' ...' ); | 53 | $text = wp_trim_words( $text, $excerpt_length, ' ...' );?> |
| 53 | ?> | 54 | |
| 54 | <div class="swiper-slide container"> | 55 | <div class="swiper-slide container"> |
| 55 | <div class="promo row align-items-center"> | 56 | <div class="promo row align-items-center"> |
| 56 | <div class="col-lg-4 col-md-12"> | 57 | <div class="col-lg-4 col-md-12"> |
| ... | @@ -75,8 +76,8 @@ return $output; | ... | @@ -75,8 +76,8 @@ return $output; |
| 75 | add_shortcode('share-this', 'share_this'); | 76 | add_shortcode('share-this', 'share_this'); |
| 76 | 77 | ||
| 77 | 78 | ||
| 78 | function share_this($atts) | 79 | function share_this($atts){ |
| 79 | { | 80 | |
| 80 | $atts = shortcode_atts(array( | 81 | $atts = shortcode_atts(array( |
| 81 | 'post_id' => '', | 82 | 'post_id' => '', |
| 82 | ), $atts, 'current-cover-articles'); | 83 | ), $atts, 'current-cover-articles'); |
| ... | @@ -107,8 +108,8 @@ return ob_get_clean(); | ... | @@ -107,8 +108,8 @@ return ob_get_clean(); |
| 107 | add_shortcode('course-list', 'course_list'); | 108 | add_shortcode('course-list', 'course_list'); |
| 108 | 109 | ||
| 109 | 110 | ||
| 110 | function course_list() | 111 | function course_list(){ |
| 111 | { | 112 | |
| 112 | $custom_args = array( | 113 | $custom_args = array( |
| 113 | 'post_type' => 'sfwd-courses', | 114 | 'post_type' => 'sfwd-courses', |
| 114 | 'posts_per_page' => -1, | 115 | 'posts_per_page' => -1, |
| ... | @@ -119,58 +120,68 @@ function course_list() | ... | @@ -119,58 +120,68 @@ function course_list() |
| 119 | ob_start(); | 120 | ob_start(); |
| 120 | $uniqid = uniqid(); | 121 | $uniqid = uniqid(); |
| 121 | if ($custom_query->have_posts()):?> | 122 | if ($custom_query->have_posts()):?> |
| 122 | <p><input type="text" class="quicksearch" placeholder="Search" /></p> | 123 | <div class="course-list"> |
| 123 | 124 | <label for="quicksearch">Search programs:</label><input type="text" id="quicksearch" placeholder="" /> | |
| 124 | <div class="button-group filters-button-group"> | 125 | <div class="filters"> |
| 125 | <button class="button is-checked" data-filter="*">Clear</button> | 126 | <a href="#" id="filter-more">FILTERS <span aria-hidden="true" class="glyphicon glyphicon-chevron-up"></span></a> |
| 126 | <button class="button" data-filter=".resilience-and-well-being">Resilience and Well-Being</button> | 127 | <div class="filter-group"> |
| 127 | <button class="button" data-filter=".leadership-and-teamwork">Leadership and Teamwork</button> | 128 | <div class="category-filter-group"> |
| 128 | <button class="button" data-filter=".clinical-skills">Clinical Skills</button> | 129 | <?php $terms = get_terms( array( 'taxonomy' => 'ld_course_category' ,'parent' => 0) ); |
| 129 | <button class="button" data-filter=".coaching-and-mentoring">Coaching and Mentoring</button> | 130 | foreach($terms as $term){ ?> |
| 131 | <div class="category-filter"> <input id="<?php echo $term->slug ; ?>" value=".<?php echo $term->slug ; ?>" type="checkbox" class="sr-only"><label for="<?php echo $term->slug ; ?>"><?php echo $term->name ; ?></label></div> | ||
| 132 | <?php }; ?> | ||
| 133 | </div> | ||
| 134 | <div class="btn-group sort-button-group align-self-end"> | ||
| 135 | <button class="btn btn-light" data-sort-direction="asc" data-sort-value="coursename" type="button">Name <span aria-hidden="true" class="glyphicon glyphicon-chevron-up"></span></button> | ||
| 136 | <button class="btn btn-light" data-sort-direction="asc" data-sort-value="coursedate" type="button">Date <span aria-hidden="true" class="glyphicon glyphicon-chevron-up"></span></button> | ||
| 137 | </div> | ||
| 138 | </div> | ||
| 130 | </div> | 139 | </div> |
| 131 | <div class="grid"> | 140 | <div class="grid"> |
| 132 | <?php while ($custom_query->have_posts()): $custom_query->the_post(); | 141 | <?php while ($custom_query->have_posts()): $custom_query->the_post(); |
| 133 | echo course_card(get_the_ID()); | 142 | echo course_card(get_the_ID()); |
| 134 | endwhile; ?> | 143 | endwhile; ?> |
| 135 | </div> | 144 | </div> |
| 145 | </div> | ||
| 136 | <?php endif; | 146 | <?php endif; |
| 137 | wp_reset_query(); | 147 | wp_reset_query(); |
| 138 | $output = ob_get_clean(); | 148 | $output = ob_get_clean(); |
| 139 | return $output; | 149 | return $output; |
| 140 | } | 150 | } |
| 141 | 151 | ||
| 142 | 152 | ||
| 143 | 153 | ||
| 144 | function course_card($id) | 154 | function course_card($id){ |
| 145 | { | 155 | |
| 146 | ob_start(); | 156 | ob_start(); |
| 147 | $post = get_post($id); | 157 | $post = get_post($id); |
| 148 | $link = get_permalink($id); | ||
| 149 | $text = str_replace(']]>', ']]>', apply_filters( 'the_content', strip_shortcodes($post->post_content))); | 158 | $text = str_replace(']]>', ']]>', apply_filters( 'the_content', strip_shortcodes($post->post_content))); |
| 150 | $excerpt_length = apply_filters( 'excerpt_length', 40 ); | 159 | $excerpt_length = apply_filters( 'excerpt_length', 20 ); |
| 151 | $text = wp_trim_words( $text, $excerpt_length, ' ...' ); | 160 | $text = wp_trim_words( $text, $excerpt_length, ' ...' ); |
| 152 | $categories = get_the_terms( $id, 'ld_course_category' ); | 161 | $categories = get_the_terms( $id, 'ld_course_category' ); |
| 153 | $cat =""; | 162 | $cat =""; foreach( $categories as $category ) { $cat .= " ".$category->slug; }; ?> |
| 154 | foreach( $categories as $category ) { $cat .= " ".$category->slug; }; ?> | 163 | |
| 155 | <div class="element-item <?php echo $cat; ?> " data-category="<?php echo $cat; ?>"> | 164 | <div class="element-item <?php echo $cat; ?> " data-category="<?php echo $cat; ?>"> |
| 156 | <article id="post-<?php echo $id; ?>" class="post post-<?php echo $id; ?> sfwd-courses type-sfwd-courses"> | 165 | <article id="post-<?php echo $id; ?>" class="post post-<?php echo $id; ?> sfwd-courses type-sfwd-courses"> |
| 157 | <div class="thumbnail"><div class="ribbon"><?php echo get_post_meta( $id, '_learndash_course_grid_custom_ribbon_text', true);?></div> | 166 | <div class="card"> |
| 158 | <div class="image"> | 167 | <div class="thumbnail"><div class="ribbon"><?php echo get_post_meta( $id, '_learndash_course_grid_custom_ribbon_text', true);?></div> |
| 159 | <a href="<?php echo $link; ?>" rel="bookmark"> <?php echo get_the_post_thumbnail($id, 'full' ); ?></a> | 168 | <div class="image"> |
| 160 | </div> | 169 | <?php echo get_the_post_thumbnail($id, 'full' ); ?> |
| 161 | </div> | 170 | </div> |
| 162 | <div class="content"> | 171 | </div> |
| 163 | <h3 class="entry-title"><a href="<?php echo $link; ?>"><?php echo $post->post_title; ?></a></h3> | 172 | <div class="content"> |
| 164 | <div class="entry-content"> | 173 | <h3 class="entry-title"><?php echo $post->post_title; ?></h3> |
| 165 | <p><?php echo $text; ?></p> | 174 | <div class="entry-content"> |
| 166 | </div> | 175 | <p><?php echo $text; ?></p> |
| 167 | <div class="button"> | 176 | </div> |
| 168 | <a role="button" href="<?php echo $link; ?>" rel="bookmark"><?php echo get_post_meta( $id, '_learndash_course_grid_custom_button_text', true);?></a> | 177 | <a class="btn" role="button" href="<?php echo get_permalink($id); ?>" rel="bookmark">LEARN MORE</a> |
| 169 | </div> | 178 | |
| 170 | </div> | 179 | </div> |
| 180 | </div> | ||
| 171 | </article> | 181 | </article> |
| 172 | </div> | 182 | </div> |
| 183 | |||
| 173 | <?php | 184 | <?php |
| 174 | $output = ob_get_clean(); | 185 | $output = ob_get_clean(); |
| 175 | return $output; | 186 | return $output; |
| 176 | } | 187 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -17634,25 +17634,21 @@ | ... | @@ -17634,25 +17634,21 @@ |
| 17634 | var $grid = $('.grid').isotope({ | 17634 | var $grid = $('.grid').isotope({ |
| 17635 | itemSelector: '.element-item', | 17635 | itemSelector: '.element-item', |
| 17636 | layoutMode: 'fitRows', | 17636 | layoutMode: 'fitRows', |
| 17637 | getSortData: { | ||
| 17638 | coursename: '.name', | ||
| 17639 | date: '[data-ticks]' | ||
| 17640 | }, | ||
| 17637 | filter: function () { | 17641 | filter: function () { |
| 17638 | return qsRegex ? $(this).text().match(qsRegex) : true; | 17642 | var $this = $(this); |
| 17643 | var filterText = qsRegex ? $(this).text().match(qsRegex) : true; | ||
| 17644 | var buttonResult = filterValue ? $this.is(filterValue) : true; | ||
| 17645 | return filterText && buttonResult; | ||
| 17639 | } | 17646 | } |
| 17640 | }); | 17647 | }); |
| 17641 | var filterFns = { | ||
| 17642 | // show if number is greater than 50 | ||
| 17643 | numberGreaterThan50: function () { | ||
| 17644 | var number = $(this).find('.number').text(); | ||
| 17645 | return parseInt(number, 10) > 50; | ||
| 17646 | }, | ||
| 17647 | // show if name ends with -ium | ||
| 17648 | ium: function () { | ||
| 17649 | var name = $(this).find('.name').text(); | ||
| 17650 | return name.match(/ium$/); | ||
| 17651 | } | ||
| 17652 | }; | ||
| 17653 | 17648 | ||
| 17654 | // use value of search field to filter | 17649 | // use value of search field to filter |
| 17655 | var $quicksearch = $('.quicksearch').keyup(debounce(function () { | 17650 | var $quicksearch = $('#quicksearch').keyup(debounce(function () { |
| 17651 | console.log($quicksearch.val()); | ||
| 17656 | qsRegex = new RegExp($quicksearch.val(), 'gi'); | 17652 | qsRegex = new RegExp($quicksearch.val(), 'gi'); |
| 17657 | $grid.isotope(); | 17653 | $grid.isotope(); |
| 17658 | }, 200)); | 17654 | }, 200)); |
| ... | @@ -17672,24 +17668,65 @@ | ... | @@ -17672,24 +17668,65 @@ |
| 17672 | }; | 17668 | }; |
| 17673 | } | 17669 | } |
| 17674 | 17670 | ||
| 17675 | // bind filter button click | 17671 | // filter with selects and checkboxes |
| 17676 | $('.filters-button-group').on('click', 'button', function () { | 17672 | var $checkboxes = $('.category-filter input'); |
| 17677 | var filterValue = $(this).attr('data-filter'); | 17673 | var filterValue; |
| 17678 | // use filterFn if matches value | 17674 | $checkboxes.change(function () { |
| 17679 | filterValue = filterFns[filterValue] || filterValue; | 17675 | // map input values to an array |
| 17680 | $grid.isotope({ | 17676 | var inclusives = []; |
| 17681 | filter: filterValue | 17677 | // inclusive filters from checkboxes |
| 17678 | $checkboxes.each(function (i, elem) { | ||
| 17679 | // if checkbox, use value if checked | ||
| 17680 | if (elem.checked) { | ||
| 17681 | inclusives.push(elem.value); | ||
| 17682 | } | ||
| 17682 | }); | 17683 | }); |
| 17683 | }); | ||
| 17684 | 17684 | ||
| 17685 | // change is-checked class on buttons | 17685 | // combine inclusive filters |
| 17686 | $('.button-group').each(function (i, buttonGroup) { | 17686 | filterValue = inclusives.length ? inclusives.join(', ') : '*'; |
| 17687 | var $buttonGroup = $(buttonGroup); | 17687 | $grid.isotope(); |
| 17688 | $buttonGroup.on('click', 'button', function () { | 17688 | updateFilterCounts(); |
| 17689 | $buttonGroup.find('.is-checked').removeClass('is-checked'); | 17689 | }); |
| 17690 | $(this).addClass('is-checked'); | 17690 | $('.sort-button-group').on('click', 'button', function () { |
| 17691 | var sortValue = $(this).attr('data-sort-value'); | ||
| 17692 | var direction = $(this).attr('data-sort-direction'); | ||
| 17693 | var isAscending = direction == 'asc'; | ||
| 17694 | var newDirection = isAscending ? 'desc' : 'asc'; | ||
| 17695 | $grid.isotope({ | ||
| 17696 | sortBy: sortValue, | ||
| 17697 | sortAscending: isAscending | ||
| 17691 | }); | 17698 | }); |
| 17699 | $(this).attr('data-sort-direction', newDirection); | ||
| 17700 | var span = $(this).find('.glyphicon'); | ||
| 17701 | span.toggleClass('glyphicon-chevron-up glyphicon-chevron-down'); | ||
| 17692 | }); | 17702 | }); |
| 17703 | function updateFilterCounts() { | ||
| 17704 | var itemElems = $grid.isotope('getFilteredItemElements'); | ||
| 17705 | var count_items = $(itemElems).length; | ||
| 17706 | if (count_items > counter) { | ||
| 17707 | $("#load-more").hide(); | ||
| 17708 | } else { | ||
| 17709 | $("#load-more").show(); | ||
| 17710 | } | ||
| 17711 | if ($('.element-item').hasClass('hidden')) { | ||
| 17712 | $('.element-item').removeClass('hidden'); | ||
| 17713 | } | ||
| 17714 | var index = 0; | ||
| 17715 | $(itemElems).each(function () { | ||
| 17716 | if (index >= counter) { | ||
| 17717 | $(this).addClass('hidden'); | ||
| 17718 | } | ||
| 17719 | index++; | ||
| 17720 | }); | ||
| 17721 | console.log('updateFilterCounts'); | ||
| 17722 | console.log(index); | ||
| 17723 | if (index === 0) { | ||
| 17724 | $("#load-more").hide(); | ||
| 17725 | } else { | ||
| 17726 | $("#load-more").show(); | ||
| 17727 | } | ||
| 17728 | $grid.isotope('layout'); | ||
| 17729 | } | ||
| 17693 | 17730 | ||
| 17694 | //**************************** | 17731 | //**************************** |
| 17695 | // Isotope Load more button | 17732 | // Isotope Load more button |
| ... | @@ -17722,7 +17759,7 @@ | ... | @@ -17722,7 +17759,7 @@ |
| 17722 | } | 17759 | } |
| 17723 | 17760 | ||
| 17724 | //append load more button | 17761 | //append load more button |
| 17725 | $grid.after('<div class="viewPlan"><a href="#" id="load-more">Load More</a></div>'); | 17762 | $grid.after('<div class="view-plan"><a class="btn" href="#" id="load-more">LOAD MORE programs</a></div>'); |
| 17726 | 17763 | ||
| 17727 | //when load more button clicked | 17764 | //when load more button clicked |
| 17728 | $(document).on("click", "#load-more", function (e) { | 17765 | $(document).on("click", "#load-more", function (e) { |
| ... | @@ -17737,6 +17774,12 @@ | ... | @@ -17737,6 +17774,12 @@ |
| 17737 | counter = counter + initShow; | 17774 | counter = counter + initShow; |
| 17738 | loadMore(counter); | 17775 | loadMore(counter); |
| 17739 | }); | 17776 | }); |
| 17777 | $(document).on("click", "#filter-more", function (e) { | ||
| 17778 | e.preventDefault(); | ||
| 17779 | $('.filter-group').toggleClass('open'); | ||
| 17780 | var span = $(this).find('.glyphicon'); | ||
| 17781 | span.toggleClass('glyphicon-chevron-up glyphicon-chevron-down'); | ||
| 17782 | }); | ||
| 17740 | }); | 17783 | }); |
| 17741 | 17784 | ||
| 17742 | // Add your custom JS here. | 17785 | // Add your custom JS here. | ... | ... |
This diff could not be displayed because it is too large.
| ... | @@ -173,5 +173,5 @@ function(t){!function(e,i){t.exports?t.exports=i(Hs.exports,Ys.exports):i(e.Isot | ... | @@ -173,5 +173,5 @@ function(t){!function(e,i){t.exports?t.exports=i(Hs.exports,Ys.exports):i(e.Isot |
| 173 | * https://isotope.metafizzy.co | 173 | * https://isotope.metafizzy.co |
| 174 | * Copyright 2010-2018 Metafizzy | 174 | * Copyright 2010-2018 Metafizzy |
| 175 | */ | 175 | */ |
| 176 | function(t){!function(e,i){t.exports?t.exports=i(e,zs.exports,js.exports,Ws.exports,Bs.exports,Fs.exports,Hs.exports,Gs.exports,Vs.exports,qs.exports):e.Isotope=i(e,e.Outlayer,e.getSize,e.matchesSelector,e.fizzyUIUtils,e.Isotope.Item,e.Isotope.LayoutMode)}(window,(function(t,e,i,n,s,r,o){var a=t.jQuery;var l=String.prototype.trim?function(t){return t.trim()}:function(t){return t.replace(/^\s+|\s+$/g,"")};var c=e.create("isotope",{layoutMode:"masonry",isJQueryFiltering:!0,sortAscending:!0});c.Item=r,c.LayoutMode=o;var d=c.prototype;d._create=function(){for(var t in this.itemGUID=0,this._sorters={},this._getSorters(),e.prototype._create.call(this),this.modes={},this.filteredItems=this.items,this.sortHistory=["original-order"],o.modes)this._initLayoutMode(t)},d.reloadItems=function(){this.itemGUID=0,e.prototype.reloadItems.call(this)},d._itemize=function(){var t=e.prototype._itemize.apply(this,arguments);for(var i=0;i<t.length;i++){t[i].id=this.itemGUID++}return this._updateItemsSortData(t),t},d._initLayoutMode=function(t){var e=o.modes[t];var i=this.options[t]||{};this.options[t]=e.options?s.extend(e.options,i):i,this.modes[t]=new e(this)},d.layout=function(){this._isLayoutInited||!this._getOption("initLayout")?this._layout():this.arrange()},d._layout=function(){var t=this._getIsInstant();this._resetLayout(),this._manageStamps(),this.layoutItems(this.filteredItems,t),this._isLayoutInited=!0},d.arrange=function(t){this.option(t),this._getIsInstant();var e=this._filter(this.items);this.filteredItems=e.matches,this._bindArrangeComplete(),this._isInstant?this._noTransition(this._hideReveal,[e]):this._hideReveal(e),this._sort(),this._layout()},d._init=d.arrange,d._hideReveal=function(t){this.reveal(t.needReveal),this.hide(t.needHide)},d._getIsInstant=function(){var t=this._getOption("layoutInstant");var e=void 0!==t?t:!this._isLayoutInited;return this._isInstant=e,e},d._bindArrangeComplete=function(){var t,e,i;var n=this;function s(){t&&e&&i&&n.dispatchEvent("arrangeComplete",null,[n.filteredItems])}this.once("layoutComplete",(function(){t=!0,s()})),this.once("hideComplete",(function(){e=!0,s()})),this.once("revealComplete",(function(){i=!0,s()}))},d._filter=function(t){var e=this.options.filter;e=e||"*";var i=[];var n=[];var s=[];var r=this._getFilterTest(e);for(var o=0;o<t.length;o++){var a=t[o];if(!a.isIgnored){var l=r(a);l&&i.push(a),l&&a.isHidden?n.push(a):l||a.isHidden||s.push(a)}}return{matches:i,needReveal:n,needHide:s}},d._getFilterTest=function(t){return a&&this.options.isJQueryFiltering?function(e){return a(e.element).is(t)}:"function"==typeof t?function(e){return t(e.element)}:function(e){return n(e.element,t)}},d.updateSortData=function(t){var e;t?(t=s.makeArray(t),e=this.getItems(t)):e=this.items,this._getSorters(),this._updateItemsSortData(e)},d._getSorters=function(){var t=this.options.getSortData;for(var e in t){var i=t[e];this._sorters[e]=u(i)}},d._updateItemsSortData=function(t){var e=t&&t.length;for(var i=0;e&&i<e;i++){t[i].updateSortData()}};var u=function(){function t(t){if("string"!=typeof t)return t;var i=l(t).split(" ");var n=i[0];var s=n.match(/^\[(.+)\]$/);var r=e(s&&s[1],n);var o=c.sortDataParsers[i[1]];return t=o?function(t){return t&&o(r(t))}:function(t){return t&&r(t)}}function e(t,e){return t?function(e){return e.getAttribute(t)}:function(t){var i=t.querySelector(e);return i&&i.textContent}}return t}();function p(t,e){return function(i,n){for(var s=0;s<t.length;s++){var r=t[s];var o=i.sortData[r];var a=n.sortData[r];if(o>a||o<a)return(o>a?1:-1)*((void 0!==e[r]?e[r]:e)?1:-1)}return 0}}c.sortDataParsers={parseInt:function(t){return parseInt(t,10)},parseFloat:function(t){return parseFloat(t)}},d._sort=function(){if(this.options.sortBy){var t=s.makeArray(this.options.sortBy);this._getIsSameSortBy(t)||(this.sortHistory=t.concat(this.sortHistory));var e=p(this.sortHistory,this.options.sortAscending);this.filteredItems.sort(e)}},d._getIsSameSortBy=function(t){for(var e=0;e<t.length;e++)if(t[e]!=this.sortHistory[e])return!1;return!0},d._mode=function(){var t=this.options.layoutMode;var e=this.modes[t];if(!e)throw new Error("No layout mode: "+t);return e.options=this.options[t],e},d._resetLayout=function(){e.prototype._resetLayout.call(this),this._mode()._resetLayout()},d._getItemLayoutPosition=function(t){return this._mode()._getItemLayoutPosition(t)},d._manageStamp=function(t){this._mode()._manageStamp(t)},d._getContainerSize=function(){return this._mode()._getContainerSize()},d.needsResizeLayout=function(){return this._mode().needsResizeLayout()},d.appended=function(t){var e=this.addItems(t);if(e.length){var i=this._filterRevealAdded(e);this.filteredItems=this.filteredItems.concat(i)}},d.prepended=function(t){var e=this._itemize(t);if(e.length){this._resetLayout(),this._manageStamps();var i=this._filterRevealAdded(e);this.layoutItems(this.filteredItems),this.filteredItems=i.concat(this.filteredItems),this.items=e.concat(this.items)}},d._filterRevealAdded=function(t){var e=this._filter(t);return this.hide(e.needHide),this.reveal(e.matches),this.layoutItems(e.matches,!0),e.matches},d.insert=function(t){var e=this.addItems(t);if(e.length){var i,n;var s=e.length;for(i=0;i<s;i++)n=e[i],this.element.appendChild(n.element);var r=this._filter(e).matches;for(i=0;i<s;i++)e[i].isLayoutInstant=!0;for(this.arrange(),i=0;i<s;i++)delete e[i].isLayoutInstant;this.reveal(r)}};var h=d.remove;return d.remove=function(t){t=s.makeArray(t);var e=this.getItems(t);h.call(this,t);var i=e&&e.length;for(var n=0;i&&n<i;n++){var r=e[n];s.removeFrom(this.filteredItems,r)}},d.shuffle=function(){for(var t=0;t<this.items.length;t++){this.items[t].sortData.random=Math.random()}this.options.sortBy="random",this._sort(),this._layout()},d._noTransition=function(t,e){var i=this.options.transitionDuration;this.options.transitionDuration=0;var n=t.apply(this,e);return this.options.transitionDuration=i,n},d.getFilteredItemElements=function(){return this.filteredItems.map((function(t){return t.element}))},c}))}(Ds),$s("isotope",Ds.exports,$),n.default(document).ready((function(t){var e;var i=t(".grid").isotope({itemSelector:".element-item",layoutMode:"fitRows",filter:function(){return!e||t(this).text().match(e)}});var n={numberGreaterThan50:function(){var e=t(this).find(".number").text();return parseInt(e,10)>50},ium:function(){return t(this).find(".name").text().match(/ium$/)}};var s=t(".quicksearch").keyup(r((function(){e=new RegExp(s.val(),"gi"),i.isotope()}),200));function r(t,e){var i;return e=e||100,function(){clearTimeout(i);var n=arguments;var s=this;function r(){t.apply(s,n)}i=setTimeout(r,e)}}t(".filters-button-group").on("click","button",(function(){var e=t(this).attr("data-filter");e=n[e]||e,i.isotope({filter:e})})),t(".button-group").each((function(e,i){var n=t(i);n.on("click","button",(function(){n.find(".is-checked").removeClass("is-checked"),t(this).addClass("is-checked")}))}));var o=3;var a=o;var l=i.data("isotope");function c(e){i.find(".hidden").removeClass("hidden");var n=l.filteredItems.slice(e,l.filteredItems.length).map((function(t){return console.log("hiddenElem"),console.log(t.element),t.element}));t(n).addClass("hidden"),i.isotope("layout"),0==n.length?t("#load-more").hide():t("#load-more").show()}console.log("iso"),console.log(l),console.log(l.elemCount),c(o),i.after('<div class="viewPlan"><a href="#" id="load-more">Load More</a></div>'),t(document).on("click","#load-more",(function(e){e.preventDefault(),t("#filters").data("clicked")&&(a=o,j$("#filters").data("clicked",!1)),c(a+=o)}))}));var Us=document.querySelector(".blur-image");document.addEventListener("DOMContentLoaded",(function(){if(!Us)return!1;var t=Us.getAttribute("data-src"),e=document.querySelector(".full-image"),i=new Image;i.src=t,i.onload=function(){e.classList.add("image-loaded"),e.style.backgroundImage="url("+t+")"}})),document.addEventListener("DOMContentLoaded",(function(){window.addEventListener("scroll",(function(){window.scrollY>57?document.getElementById("main-nav").classList.add("fixed-top"):document.getElementById("main-nav").classList.remove("fixed-top")}))}));let Qs=document.getElementById("btn-back-to-top");function Xs(){document.body.scrollTop>20||document.documentElement.scrollTop>20?Qs.style.display="block":Qs.style.display="none"}function Ks(){document.body.scrollTop=0,document.documentElement.scrollTop=0}window.onscroll=function(){Xs()},Qs.addEventListener("click",Ks),t.Alert=g,t.Button=v,t.Carousel=_,t.Collapse=C,t.Dropdown=$e,t.Modal=Be,t.Offcanvas=Re,t.Popover=qe,t.Scrollspy=Qe,t.Tab=Ke,t.Toast=Je,t.Tooltip=Ve,Object.defineProperty(t,"__esModule",{value:!0})})); | 176 | function(t){!function(e,i){t.exports?t.exports=i(e,zs.exports,js.exports,Ws.exports,Bs.exports,Fs.exports,Hs.exports,Gs.exports,Vs.exports,qs.exports):e.Isotope=i(e,e.Outlayer,e.getSize,e.matchesSelector,e.fizzyUIUtils,e.Isotope.Item,e.Isotope.LayoutMode)}(window,(function(t,e,i,n,s,r,o){var a=t.jQuery;var l=String.prototype.trim?function(t){return t.trim()}:function(t){return t.replace(/^\s+|\s+$/g,"")};var c=e.create("isotope",{layoutMode:"masonry",isJQueryFiltering:!0,sortAscending:!0});c.Item=r,c.LayoutMode=o;var d=c.prototype;d._create=function(){for(var t in this.itemGUID=0,this._sorters={},this._getSorters(),e.prototype._create.call(this),this.modes={},this.filteredItems=this.items,this.sortHistory=["original-order"],o.modes)this._initLayoutMode(t)},d.reloadItems=function(){this.itemGUID=0,e.prototype.reloadItems.call(this)},d._itemize=function(){var t=e.prototype._itemize.apply(this,arguments);for(var i=0;i<t.length;i++){t[i].id=this.itemGUID++}return this._updateItemsSortData(t),t},d._initLayoutMode=function(t){var e=o.modes[t];var i=this.options[t]||{};this.options[t]=e.options?s.extend(e.options,i):i,this.modes[t]=new e(this)},d.layout=function(){this._isLayoutInited||!this._getOption("initLayout")?this._layout():this.arrange()},d._layout=function(){var t=this._getIsInstant();this._resetLayout(),this._manageStamps(),this.layoutItems(this.filteredItems,t),this._isLayoutInited=!0},d.arrange=function(t){this.option(t),this._getIsInstant();var e=this._filter(this.items);this.filteredItems=e.matches,this._bindArrangeComplete(),this._isInstant?this._noTransition(this._hideReveal,[e]):this._hideReveal(e),this._sort(),this._layout()},d._init=d.arrange,d._hideReveal=function(t){this.reveal(t.needReveal),this.hide(t.needHide)},d._getIsInstant=function(){var t=this._getOption("layoutInstant");var e=void 0!==t?t:!this._isLayoutInited;return this._isInstant=e,e},d._bindArrangeComplete=function(){var t,e,i;var n=this;function s(){t&&e&&i&&n.dispatchEvent("arrangeComplete",null,[n.filteredItems])}this.once("layoutComplete",(function(){t=!0,s()})),this.once("hideComplete",(function(){e=!0,s()})),this.once("revealComplete",(function(){i=!0,s()}))},d._filter=function(t){var e=this.options.filter;e=e||"*";var i=[];var n=[];var s=[];var r=this._getFilterTest(e);for(var o=0;o<t.length;o++){var a=t[o];if(!a.isIgnored){var l=r(a);l&&i.push(a),l&&a.isHidden?n.push(a):l||a.isHidden||s.push(a)}}return{matches:i,needReveal:n,needHide:s}},d._getFilterTest=function(t){return a&&this.options.isJQueryFiltering?function(e){return a(e.element).is(t)}:"function"==typeof t?function(e){return t(e.element)}:function(e){return n(e.element,t)}},d.updateSortData=function(t){var e;t?(t=s.makeArray(t),e=this.getItems(t)):e=this.items,this._getSorters(),this._updateItemsSortData(e)},d._getSorters=function(){var t=this.options.getSortData;for(var e in t){var i=t[e];this._sorters[e]=u(i)}},d._updateItemsSortData=function(t){var e=t&&t.length;for(var i=0;e&&i<e;i++){t[i].updateSortData()}};var u=function(){function t(t){if("string"!=typeof t)return t;var i=l(t).split(" ");var n=i[0];var s=n.match(/^\[(.+)\]$/);var r=e(s&&s[1],n);var o=c.sortDataParsers[i[1]];return t=o?function(t){return t&&o(r(t))}:function(t){return t&&r(t)}}function e(t,e){return t?function(e){return e.getAttribute(t)}:function(t){var i=t.querySelector(e);return i&&i.textContent}}return t}();function p(t,e){return function(i,n){for(var s=0;s<t.length;s++){var r=t[s];var o=i.sortData[r];var a=n.sortData[r];if(o>a||o<a)return(o>a?1:-1)*((void 0!==e[r]?e[r]:e)?1:-1)}return 0}}c.sortDataParsers={parseInt:function(t){return parseInt(t,10)},parseFloat:function(t){return parseFloat(t)}},d._sort=function(){if(this.options.sortBy){var t=s.makeArray(this.options.sortBy);this._getIsSameSortBy(t)||(this.sortHistory=t.concat(this.sortHistory));var e=p(this.sortHistory,this.options.sortAscending);this.filteredItems.sort(e)}},d._getIsSameSortBy=function(t){for(var e=0;e<t.length;e++)if(t[e]!=this.sortHistory[e])return!1;return!0},d._mode=function(){var t=this.options.layoutMode;var e=this.modes[t];if(!e)throw new Error("No layout mode: "+t);return e.options=this.options[t],e},d._resetLayout=function(){e.prototype._resetLayout.call(this),this._mode()._resetLayout()},d._getItemLayoutPosition=function(t){return this._mode()._getItemLayoutPosition(t)},d._manageStamp=function(t){this._mode()._manageStamp(t)},d._getContainerSize=function(){return this._mode()._getContainerSize()},d.needsResizeLayout=function(){return this._mode().needsResizeLayout()},d.appended=function(t){var e=this.addItems(t);if(e.length){var i=this._filterRevealAdded(e);this.filteredItems=this.filteredItems.concat(i)}},d.prepended=function(t){var e=this._itemize(t);if(e.length){this._resetLayout(),this._manageStamps();var i=this._filterRevealAdded(e);this.layoutItems(this.filteredItems),this.filteredItems=i.concat(this.filteredItems),this.items=e.concat(this.items)}},d._filterRevealAdded=function(t){var e=this._filter(t);return this.hide(e.needHide),this.reveal(e.matches),this.layoutItems(e.matches,!0),e.matches},d.insert=function(t){var e=this.addItems(t);if(e.length){var i,n;var s=e.length;for(i=0;i<s;i++)n=e[i],this.element.appendChild(n.element);var r=this._filter(e).matches;for(i=0;i<s;i++)e[i].isLayoutInstant=!0;for(this.arrange(),i=0;i<s;i++)delete e[i].isLayoutInstant;this.reveal(r)}};var h=d.remove;return d.remove=function(t){t=s.makeArray(t);var e=this.getItems(t);h.call(this,t);var i=e&&e.length;for(var n=0;i&&n<i;n++){var r=e[n];s.removeFrom(this.filteredItems,r)}},d.shuffle=function(){for(var t=0;t<this.items.length;t++){this.items[t].sortData.random=Math.random()}this.options.sortBy="random",this._sort(),this._layout()},d._noTransition=function(t,e){var i=this.options.transitionDuration;this.options.transitionDuration=0;var n=t.apply(this,e);return this.options.transitionDuration=i,n},d.getFilteredItemElements=function(){return this.filteredItems.map((function(t){return t.element}))},c}))}(Ds),$s("isotope",Ds.exports,$),n.default(document).ready((function(t){var e;var i=t(".grid").isotope({itemSelector:".element-item",layoutMode:"fitRows",getSortData:{coursename:".name",date:"[data-ticks]"},filter:function(){var i=t(this);var n=!e||t(this).text().match(e);var s=!o||i.is(o);return n&&s}});var n=t("#quicksearch").keyup(s((function(){console.log(n.val()),e=new RegExp(n.val(),"gi"),i.isotope()}),200));function s(t,e){var i;return e=e||100,function(){clearTimeout(i);var n=arguments;var s=this;function r(){t.apply(s,n)}i=setTimeout(r,e)}}var r=t(".category-filter input");var o;function a(){var e=i.isotope("getFilteredItemElements");t(e).length>c?t("#load-more").hide():t("#load-more").show(),t(".element-item").hasClass("hidden")&&t(".element-item").removeClass("hidden");var n=0;t(e).each((function(){n>=c&&t(this).addClass("hidden"),n++})),console.log("updateFilterCounts"),console.log(n),0===n?t("#load-more").hide():t("#load-more").show(),i.isotope("layout")}r.change((function(){var t=[];r.each((function(e,i){i.checked&&t.push(i.value)})),o=t.length?t.join(", "):"*",i.isotope(),a()})),t(".sort-button-group").on("click","button",(function(){var e=t(this).attr("data-sort-value");var n="asc"==t(this).attr("data-sort-direction");var s=n?"desc":"asc";i.isotope({sortBy:e,sortAscending:n}),t(this).attr("data-sort-direction",s),t(this).find(".glyphicon").toggleClass("glyphicon-chevron-up glyphicon-chevron-down")}));var l=3;var c=l;var d=i.data("isotope");function u(e){i.find(".hidden").removeClass("hidden");var n=d.filteredItems.slice(e,d.filteredItems.length).map((function(t){return console.log("hiddenElem"),console.log(t.element),t.element}));t(n).addClass("hidden"),i.isotope("layout"),0==n.length?t("#load-more").hide():t("#load-more").show()}console.log("iso"),console.log(d),console.log(d.elemCount),u(l),i.after('<div class="view-plan"><a class="btn" href="#" id="load-more">LOAD MORE programs</a></div>'),t(document).on("click","#load-more",(function(e){e.preventDefault(),t("#filters").data("clicked")&&(c=l,j$("#filters").data("clicked",!1)),u(c+=l)})),t(document).on("click","#filter-more",(function(e){e.preventDefault(),t(".filter-group").toggleClass("open"),t(this).find(".glyphicon").toggleClass("glyphicon-chevron-up glyphicon-chevron-down")}))}));var Us=document.querySelector(".blur-image");document.addEventListener("DOMContentLoaded",(function(){if(!Us)return!1;var t=Us.getAttribute("data-src"),e=document.querySelector(".full-image"),i=new Image;i.src=t,i.onload=function(){e.classList.add("image-loaded"),e.style.backgroundImage="url("+t+")"}})),document.addEventListener("DOMContentLoaded",(function(){window.addEventListener("scroll",(function(){window.scrollY>57?document.getElementById("main-nav").classList.add("fixed-top"):document.getElementById("main-nav").classList.remove("fixed-top")}))}));let Qs=document.getElementById("btn-back-to-top");function Xs(){document.body.scrollTop>20||document.documentElement.scrollTop>20?Qs.style.display="block":Qs.style.display="none"}function Ks(){document.body.scrollTop=0,document.documentElement.scrollTop=0}window.onscroll=function(){Xs()},Qs.addEventListener("click",Ks),t.Alert=g,t.Button=v,t.Carousel=_,t.Collapse=C,t.Dropdown=$e,t.Modal=Be,t.Offcanvas=Re,t.Popover=qe,t.Scrollspy=Qe,t.Tab=Ke,t.Toast=Je,t.Tooltip=Ve,Object.defineProperty(t,"__esModule",{value:!0})})); |
| 177 | //# sourceMappingURL=child-theme.min.js.map | 177 | //# sourceMappingURL=child-theme.min.js.map |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
This diff could not be displayed because it is too large.
| ... | @@ -2,8 +2,6 @@ import jQuery from 'jquery'; | ... | @@ -2,8 +2,6 @@ import jQuery from 'jquery'; |
| 2 | import jQueryBridget from 'jquery-bridget'; | 2 | import jQueryBridget from 'jquery-bridget'; |
| 3 | import Isotope from "isotope-layout"; | 3 | import Isotope from "isotope-layout"; |
| 4 | 4 | ||
| 5 | |||
| 6 | |||
| 7 | jQueryBridget( 'isotope', Isotope, $ ); | 5 | jQueryBridget( 'isotope', Isotope, $ ); |
| 8 | 6 | ||
| 9 | jQuery( document ).ready(function($) { | 7 | jQuery( document ).ready(function($) { |
| ... | @@ -15,27 +13,23 @@ var qsRegex; | ... | @@ -15,27 +13,23 @@ var qsRegex; |
| 15 | var $grid = $('.grid').isotope({ | 13 | var $grid = $('.grid').isotope({ |
| 16 | itemSelector: '.element-item', | 14 | itemSelector: '.element-item', |
| 17 | layoutMode: 'fitRows', | 15 | layoutMode: 'fitRows', |
| 16 | getSortData: { | ||
| 17 | coursename: '.name', | ||
| 18 | date: '[data-ticks]', | ||
| 19 | }, | ||
| 18 | filter: function() { | 20 | filter: function() { |
| 19 | return qsRegex ? $(this).text().match( qsRegex ) : true; | 21 | var $this = $(this); |
| 22 | var filterText = qsRegex ? $(this).text().match( qsRegex ) : true; | ||
| 23 | var buttonResult = filterValue ? $this.is( filterValue ) : true; | ||
| 24 | return filterText && buttonResult; | ||
| 20 | } | 25 | } |
| 21 | }); | 26 | }); |
| 22 | 27 | ||
| 23 | 28 | ||
| 24 | var filterFns = { | ||
| 25 | // show if number is greater than 50 | ||
| 26 | numberGreaterThan50: function() { | ||
| 27 | var number = $(this).find('.number').text(); | ||
| 28 | return parseInt( number, 10 ) > 50; | ||
| 29 | }, | ||
| 30 | // show if name ends with -ium | ||
| 31 | ium: function() { | ||
| 32 | var name = $(this).find('.name').text(); | ||
| 33 | return name.match( /ium$/ ); | ||
| 34 | } | ||
| 35 | }; | ||
| 36 | 29 | ||
| 37 | // use value of search field to filter | 30 | // use value of search field to filter |
| 38 | var $quicksearch = $('.quicksearch').keyup( debounce( function() { | 31 | var $quicksearch = $('#quicksearch').keyup( debounce( function() { |
| 32 | console.log($quicksearch.val()); | ||
| 39 | qsRegex = new RegExp( $quicksearch.val(), 'gi' ); | 33 | qsRegex = new RegExp( $quicksearch.val(), 'gi' ); |
| 40 | $grid.isotope(); | 34 | $grid.isotope(); |
| 41 | }, 200 ) ); | 35 | }, 200 ) ); |
| ... | @@ -56,80 +50,141 @@ function debounce( fn, threshold ) { | ... | @@ -56,80 +50,141 @@ function debounce( fn, threshold ) { |
| 56 | } | 50 | } |
| 57 | 51 | ||
| 58 | 52 | ||
| 53 | // filter with selects and checkboxes | ||
| 54 | var $checkboxes = $('.category-filter input'); | ||
| 55 | var filterValue; | ||
| 56 | |||
| 57 | $checkboxes.change( function() { | ||
| 58 | // map input values to an array | ||
| 59 | var inclusives = []; | ||
| 60 | // inclusive filters from checkboxes | ||
| 61 | $checkboxes.each( function( i, elem ) { | ||
| 62 | // if checkbox, use value if checked | ||
| 63 | if ( elem.checked ) { | ||
| 64 | inclusives.push( elem.value ); | ||
| 65 | } | ||
| 66 | }); | ||
| 59 | 67 | ||
| 60 | // bind filter button click | 68 | // combine inclusive filters |
| 61 | $('.filters-button-group').on( 'click', 'button', function() { | 69 | filterValue = inclusives.length ? inclusives.join(', ') : '*'; |
| 62 | var filterValue = $( this ).attr('data-filter'); | 70 | $grid.isotope(); |
| 63 | // use filterFn if matches value | 71 | updateFilterCounts(); |
| 64 | filterValue = filterFns[ filterValue ] || filterValue; | ||
| 65 | $grid.isotope({ filter: filterValue }); | ||
| 66 | }); | 72 | }); |
| 67 | 73 | ||
| 68 | // change is-checked class on buttons | 74 | |
| 69 | $('.button-group').each( function( i, buttonGroup ) { | 75 | $('.sort-button-group').on( 'click', 'button', function() { |
| 70 | var $buttonGroup = $( buttonGroup ); | 76 | var sortValue = $(this).attr('data-sort-value'); |
| 71 | $buttonGroup.on( 'click', 'button', function() { | 77 | var direction = $(this).attr('data-sort-direction'); |
| 72 | $buttonGroup.find('.is-checked').removeClass('is-checked'); | 78 | var isAscending = (direction == 'asc'); |
| 73 | $( this ).addClass('is-checked'); | 79 | var newDirection = (isAscending) ? 'desc' : 'asc'; |
| 74 | }); | 80 | $grid.isotope({ sortBy: sortValue, sortAscending: isAscending }); |
| 81 | $(this).attr('data-sort-direction', newDirection); | ||
| 82 | var span = $(this).find('.glyphicon'); | ||
| 83 | span.toggleClass('glyphicon-chevron-up glyphicon-chevron-down'); | ||
| 75 | }); | 84 | }); |
| 76 | 85 | ||
| 86 | |||
| 87 | |||
| 88 | function updateFilterCounts() { | ||
| 89 | |||
| 90 | var itemElems = $grid.isotope('getFilteredItemElements'); | ||
| 91 | var count_items = $(itemElems).length; | ||
| 92 | |||
| 93 | if (count_items > counter) { | ||
| 94 | $("#load-more").hide(); | ||
| 95 | |||
| 96 | }else { | ||
| 97 | $("#load-more").show(); | ||
| 98 | } | ||
| 99 | if ($('.element-item').hasClass('hidden')) { | ||
| 100 | $('.element-item').removeClass('hidden'); | ||
| 101 | } | ||
| 102 | var index = 0; | ||
| 103 | |||
| 104 | $(itemElems).each(function () { | ||
| 105 | if (index >= counter) { | ||
| 106 | $(this).addClass('hidden'); | ||
| 107 | } | ||
| 108 | index++; | ||
| 109 | }); | ||
| 110 | console.log('updateFilterCounts'); | ||
| 111 | console.log(index); | ||
| 112 | if(index === 0){ | ||
| 113 | |||
| 114 | $("#load-more").hide(); | ||
| 115 | |||
| 116 | }else{ | ||
| 117 | $("#load-more").show(); | ||
| 118 | |||
| 119 | } | ||
| 120 | $grid.isotope('layout'); | ||
| 121 | |||
| 122 | } | ||
| 123 | |||
| 124 | |||
| 77 | 125 | ||
| 78 | 126 | ||
| 79 | //**************************** | 127 | //**************************** |
| 80 | // Isotope Load more button | 128 | // Isotope Load more button |
| 81 | //**************************** | 129 | //**************************** |
| 82 | 130 | ||
| 83 | var initShow = 3; //number of images loaded on init & onclick load more button | 131 | var initShow = 3; //number of images loaded on init & onclick load more button |
| 84 | var counter = initShow; //counter for load more button | 132 | var counter = initShow; //counter for load more button |
| 85 | var iso = $grid.data('isotope'); // get Isotope instance | 133 | var iso = $grid.data('isotope'); // get Isotope instance |
| 86 | console.log('iso'); | 134 | console.log('iso'); |
| 87 | console.log(iso); | 135 | console.log(iso); |
| 88 | console.log(iso.elemCount); | 136 | console.log(iso.elemCount); |
| 89 | 137 | ||
| 90 | loadMore(initShow); //execute function onload | 138 | loadMore(initShow); //execute function onload |
| 91 | 139 | ||
| 92 | function loadMore(toShow) { | 140 | function loadMore(toShow) { |
| 93 | 141 | ||
| 94 | $grid.find(".hidden").removeClass("hidden"); | 142 | $grid.find(".hidden").removeClass("hidden"); |
| 95 | 143 | ||
| 96 | var hiddenElems = iso.filteredItems.slice(toShow, iso.filteredItems.length).map(function(item) { | 144 | var hiddenElems = iso.filteredItems.slice(toShow, iso.filteredItems.length).map(function(item) { |
| 97 | console.log('hiddenElem'); | 145 | console.log('hiddenElem'); |
| 98 | console.log(item.element); | 146 | console.log(item.element); |
| 99 | return item.element; | 147 | return item.element; |
| 100 | }); | 148 | }); |
| 101 | $(hiddenElems).addClass('hidden'); | 149 | $(hiddenElems).addClass('hidden'); |
| 102 | $grid.isotope('layout'); | 150 | $grid.isotope('layout'); |
| 103 | 151 | ||
| 104 | //when no more to load, hide show more button | 152 | //when no more to load, hide show more button |
| 105 | if (hiddenElems.length == 0) { | 153 | if (hiddenElems.length == 0) { |
| 106 | $("#load-more").hide(); | 154 | $("#load-more").hide(); |
| 107 | } | 155 | } else { |
| 108 | else { | 156 | $("#load-more").show(); |
| 109 | $("#load-more").show(); | 157 | }; |
| 110 | }; | 158 | |
| 111 | 159 | } | |
| 112 | } | 160 | |
| 113 | 161 | ||
| 114 | 162 | //append load more button | |
| 115 | //append load more button | 163 | $grid.after('<div class="view-plan"><a class="btn" href="#" id="load-more">LOAD MORE programs</a></div>'); |
| 116 | $grid.after('<div class="viewPlan"><a href="#" id="load-more">Load More</a></div>'); | 164 | |
| 117 | 165 | //when load more button clicked | |
| 118 | //when load more button clicked | 166 | $(document).on("click", "#load-more", function(e) { |
| 119 | $(document).on("click", "#load-more", function(e) { | 167 | e.preventDefault(); |
| 120 | e.preventDefault(); | 168 | |
| 121 | 169 | if ($('#filters').data('clicked')) { | |
| 122 | if ($('#filters').data('clicked')) { | 170 | //when filter button clicked, set initial value for counter |
| 123 | //when filter button clicked, set initial value for counter | 171 | counter = initShow; |
| 124 | counter = initShow; | 172 | j$('#filters').data('clicked', false); |
| 125 | j$('#filters').data('clicked', false); | 173 | } else { |
| 126 | } else { | 174 | counter = counter; |
| 127 | counter = counter; | 175 | }; |
| 128 | }; | 176 | |
| 129 | 177 | counter = counter + initShow; | |
| 130 | counter = counter + initShow; | 178 | |
| 131 | 179 | loadMore(counter); | |
| 132 | loadMore(counter); | 180 | }); |
| 133 | }); | 181 | |
| 182 | $(document).on("click", "#filter-more", function(e) { | ||
| 183 | e.preventDefault(); | ||
| 184 | $('.filter-group').toggleClass('open'); | ||
| 185 | var span = $(this).find('.glyphicon'); | ||
| 186 | span.toggleClass('glyphicon-chevron-up glyphicon-chevron-down'); | ||
| 187 | }); | ||
| 188 | |||
| 134 | 189 | ||
| 135 | }); | 190 | }); | ... | ... |
| 1 | .thumbnail{ | 1 | label[for=quicksearch]{ |
| 2 | line-height:1.428571429; | 2 | font-size: 18px; |
| 3 | background-color:#ffffff; | 3 | line-height: 24px; |
| 4 | border:1px solid #dddddd; | 4 | color: #0484B8; |
| 5 | border-radius:4px; | 5 | text-transform: uppercase; |
| 6 | -webkit-transition:all 0.2s ease-in-out; | ||
| 7 | transition:all 0.2s ease-in-out; | ||
| 8 | display:inline-block; | ||
| 9 | max-width:100%; | ||
| 10 | height:auto; | ||
| 11 | display:block; | ||
| 12 | position:relative; | ||
| 13 | padding:0; | ||
| 14 | margin:0; | ||
| 15 | } | 6 | } |
| 16 | .thumbnail .ribbon{ | 7 | #quicksearch{ |
| 17 | background:#5cb85c; | 8 | width: 600px; |
| 18 | box-shadow:0 1px rgba(0,0,0,0.2); | 9 | border-bottom:1px solid #8E908F !important; |
| 19 | -moz-box-shadow:0 1px rgba(0,0,0,0.2); | ||
| 20 | -webkit-box-shadow:0 1px rgba(0,0,0,0.2); | ||
| 21 | color:#fff; | ||
| 22 | text-shadow:0 1px rgba(0,0,0,0.3); | ||
| 23 | position:absolute; | ||
| 24 | font-size:14px; | ||
| 25 | left:-8px; | ||
| 26 | right: unset; | ||
| 27 | top:10px; | ||
| 28 | padding:3px 10px; | ||
| 29 | z-index:2; | ||
| 30 | border-radius: 0px; | ||
| 31 | font-weight:bold; | ||
| 32 | } | 10 | } |
| 33 | .thumbnail .ribbon.enrolled{ | 11 | .filters{ |
| 34 | background:#428bca; | 12 | border-bottom:1px solid #FFA300 !important; |
| 35 | } | 13 | border-top:1px solid #FFA300 !important; |
| 36 | .thumbnail .ribbon:before{ | 14 | padding: 10px 0px 10px 0px; |
| 37 | border:4px solid transparent; | 15 | .glyphicon-chevron-up::after{ |
| 38 | border-top:4px solid #348c34; | 16 | content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='19.432' height='11.567' viewBox='0 0 19.432 11.567'%3E%3Cpath id='Path_1875' data-name='Path 1875' d='M395.235 274.525a1.19 1.19 0 0 0 1.681.063l9.188-8.526a1.19 1.19 0 0 0 0-1.744l-9.187-8.526a1.19 1.19 0 1 0-1.619 1.744l8.248 7.654-8.248 7.654a1.19 1.19 0 0 0-.063 1.681Z' transform='translate(274.905 -394.917) rotate(90)' fill='%230484b8'/%3E%3C/svg%3E"); |
| 39 | border-right:4px solid #348c34; | 17 | } |
| 40 | content:""; | 18 | .glyphicon-chevron-down::after{ |
| 41 | position:absolute; | 19 | content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='19.631' height='11.905' viewBox='0 0 19.631 11.905'%3E%3Cpath id='Path_1875' data-name='Path 1875' d='M395.235 274.525a1.19 1.19 0 0 0 1.681.063l9.188-8.526a1.19 1.19 0 0 0 0-1.744l-9.187-8.526a1.19 1.19 0 1 0-1.619 1.744l8.248 7.654-8.248 7.654a1.19 1.19 0 0 0-.063 1.681Z' transform='matrix(-0.017 -1 1 -0.017 -248.34 411.22)' fill='%230484b8'/%3E%3C/svg%3E"); |
| 42 | left:0; | 20 | } |
| 43 | right: unset; | 21 | #filter-more{ |
| 44 | border-radius: 0px; | 22 | font-size: 18px; |
| 45 | bottom:-8px; | 23 | line-height: 24px; |
| 46 | } | 24 | color: #0484B8; |
| 47 | .thumbnail .ribbon.enrolled:before{ | 25 | text-transform: uppercase; |
| 48 | border-top:4px solid #357ebd; | 26 | text-decoration: none; |
| 49 | border-right:4px solid #357ebd; | 27 | padding: 10px 0px; |
| 50 | } | 28 | display: block; |
| 51 | .entry-title{ | 29 | } |
| 52 | margin:0!important; | 30 | .filter-group{ |
| 53 | } | 31 | display:none; |
| 54 | .entry-content{ | 32 | flex-direction: row ; |
| 55 | margin-bottom:10px; | 33 | justify-content: space-between; |
| 56 | padding:0; | 34 | margin-bottom: 20px; |
| 57 | } | 35 | .sort-button-group { |
| 58 | .items-wrapper_button{ | 36 | .btn{ |
| 59 | margin:5px 0!important; | 37 | border:1px solid #0081BC; |
| 60 | width:100%; | 38 | |
| 61 | } | 39 | } |
| 62 | .items-wrapper_button a{ | 40 | |
| 63 | text-decoration:none!important; | 41 | } |
| 64 | width:100%; | 42 | } |
| 65 | } | 43 | .filter-group.open{ |
| 66 | .thumbnail a.btn-primary{ | 44 | display:flex; |
| 67 | color:white; | 45 | } |
| 68 | } | ||
| 69 | .btn{ | ||
| 70 | display:inline-block; | ||
| 71 | padding:6px 12px; | ||
| 72 | margin-bottom:0; | ||
| 73 | font-size:14px; | ||
| 74 | font-weight:normal; | ||
| 75 | line-height:1.428571429; | ||
| 76 | text-align:center; | ||
| 77 | vertical-align:middle; | ||
| 78 | cursor:pointer; | ||
| 79 | border:1px solid transparent; | ||
| 80 | border-radius:4px; | ||
| 81 | white-space:nowrap; | ||
| 82 | -webkit-user-select:none; | ||
| 83 | -moz-user-select:none; | ||
| 84 | -ms-user-select:none; | ||
| 85 | -o-user-select:none; | ||
| 86 | user-select:none; | ||
| 87 | } | ||
| 88 | .btn:focus{ | ||
| 89 | outline:thin dotted #333; | ||
| 90 | outline:5px auto -webkit-focus-ring-color; | ||
| 91 | outline-offset:-2px; | ||
| 92 | } | ||
| 93 | .btn:hover,.learndash-course-grid .btn:focus{ | ||
| 94 | color:#333333; | ||
| 95 | text-decoration:none; | ||
| 96 | } | ||
| 97 | .btn:active{ | ||
| 98 | outline:0; | ||
| 99 | background-image:none; | ||
| 100 | -webkit-box-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125); | ||
| 101 | box-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125); | ||
| 102 | } | ||
| 103 | .btn-primary{ | ||
| 104 | color:#ffffff; | ||
| 105 | background-color:#428bca; | ||
| 106 | border-color:#357ebd; | ||
| 107 | } | ||
| 108 | .btn-primary:hover,.learndash-course-grid .btn-primary:focus,.learndash-course-grid .btn-primary:active{ | ||
| 109 | color:#ffffff; | ||
| 110 | background-color:#3276b1; | ||
| 111 | border-color:#285e8e; | ||
| 112 | } | ||
| 113 | .btn-primary:active{ | ||
| 114 | background-image:none; | ||
| 115 | } | ||
| 116 | .btn-primary{ | ||
| 117 | color:white; | ||
| 118 | text-decoration:none; | ||
| 119 | } | ||
| 120 | .btn-primary:hover{ | ||
| 121 | color:white; | ||
| 122 | } | ||
| 123 | .thumbnail img{ | ||
| 124 | display:block; | ||
| 125 | max-width:100%; | ||
| 126 | width:100%; | ||
| 127 | height:auto; | ||
| 128 | margin-left:auto; | ||
| 129 | margin-right:auto; | ||
| 130 | box-shadow:none; | ||
| 131 | max-height: 400px; | ||
| 132 | } | ||
| 133 | .thumbnail a,.learndash-course-grid .thumbnail a:hover{ | ||
| 134 | box-shadow:none; | ||
| 135 | } | ||
| 136 | .thumbnail .caption{ | ||
| 137 | padding:9px; | ||
| 138 | color:#333333; | ||
| 139 | } | 46 | } |
| 140 | .thumbnail .caption a{ | 47 | .category-filter-group{ |
| 141 | text-decoration:none!important; | 48 | display:flex; |
| 49 | flex-direction: row ; | ||
| 142 | } | 50 | } |
| 143 | .thumbnail .caption p{ | 51 | .category-filter{ |
| 144 | float:none!important; | 52 | display:flex; |
| 145 | margin:15px 0 0!important; | 53 | flex-direction: row ; |
| 146 | width:100%!important; | 54 | font-size:18px; |
| 55 | font-size:1.125rem; | ||
| 56 | color:#515151; | ||
| 57 | margin:.25rem 0; | ||
| 58 | margin-right:1rem; | ||
| 59 | label{ | ||
| 60 | padding-left:30px; | ||
| 61 | padding-right:10px; | ||
| 62 | white-space:nowrap; | ||
| 63 | cursor:pointer; | ||
| 64 | color: #2C2C2C; | ||
| 65 | } | ||
| 66 | input[type=checkbox]{ | ||
| 67 | display:inline-block; | ||
| 68 | margin-left:30px; | ||
| 69 | margin-left:0; | ||
| 70 | } | ||
| 71 | input[type=checkbox]:focus+label{ | ||
| 72 | outline:-webkit-focus-ring-color auto 1px; | ||
| 73 | } | ||
| 74 | label:before{ | ||
| 75 | content:''; | ||
| 76 | cursor:pointer; | ||
| 77 | height:25px; | ||
| 78 | width:25px; | ||
| 79 | padding:2.5px; | ||
| 80 | display:inline-block; | ||
| 81 | position:absolute; | ||
| 82 | background:#FFF; | ||
| 83 | margin-left:-30px; | ||
| 84 | border:2px solid #0081BC; | ||
| 85 | border-radius: 4px; | ||
| 86 | } | ||
| 87 | input:checked+label:before{ | ||
| 88 | background:#0081BC !important; | ||
| 89 | border:2px solid #0081BC; | ||
| 90 | content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15.078' height='18.352' viewBox='0 0 15.078 18.352'%3E%3Cpath id='Path_1871' data-name='Path 1871' d='M137.622 43.1l1.28 2.211 6.924-11.987a1.837 1.837 0 0 1 3.2 1.8l-8.5 14.722a1.931 1.931 0 0 1-3.259 0L134.48 44.9a1.812 1.812 0 1 1 3.142-1.8Z' transform='translate(-134.203 -32.392)' fill='%23fff' fill-rule='evenodd'/%3E%3C/svg%3E"); | ||
| 91 | height:25px; | ||
| 92 | width:25px; | ||
| 93 | padding: 2px 4px; | ||
| 94 | background-position:4px; | ||
| 95 | background-size:22px; | ||
| 96 | background-repeat:no-repeat; | ||
| 97 | position:absolute; | ||
| 98 | cursor:pointer; | ||
| 99 | } | ||
| 100 | input[type=checkbox]{ | ||
| 101 | background-color:initial; | ||
| 102 | cursor:default; | ||
| 103 | -webkit-appearance:auto; | ||
| 104 | -moz-appearance:auto; | ||
| 105 | appearance:auto; | ||
| 106 | -webkit-box-sizing:border-box; | ||
| 107 | box-sizing:border-box; | ||
| 108 | margin:3px 3px 3px 4px; | ||
| 109 | padding:initial; | ||
| 110 | border:initial; | ||
| 111 | position:relative; | ||
| 112 | } | ||
| 113 | .sr-only{ | ||
| 114 | position: absolute !important; | ||
| 115 | clip:rect(1px,1px,1px,1px); | ||
| 116 | padding:0; | ||
| 117 | border:0; | ||
| 118 | height:1px; | ||
| 119 | width:1px; | ||
| 120 | overflow:hidden; | ||
| 121 | } | ||
| 147 | } | 122 | } |
| 148 | 123 | ||
| 149 | .element-item { | ||
| 150 | position: relative; | ||
| 151 | float: left; | ||
| 152 | width: calc(33% - 30px); | ||
| 153 | height: 600px; | ||
| 154 | margin: 5px; | ||
| 155 | padding: 10px; | ||
| 156 | 124 | ||
| 125 | |||
| 126 | .card{ | ||
| 127 | background: var(--unnamed-color-ffffff) 0% 0% no-repeat padding-box; | ||
| 128 | background: #FFFFFF 0% 0% no-repeat padding-box; | ||
| 129 | box-shadow: 0px 3px 6px #00000029; | ||
| 130 | border-radius: 0px; | ||
| 131 | border-width: 0px; | ||
| 132 | min-height: 526px; | ||
| 133 | .thumbnail{ | ||
| 134 | line-height:1.428571429; | ||
| 135 | background-color:#ffffff; | ||
| 136 | border:1px solid #dddddd; | ||
| 137 | -webkit-transition:all 0.2s ease-in-out; | ||
| 138 | transition:all 0.2s ease-in-out; | ||
| 139 | display:inline-block; | ||
| 140 | max-width:100%; | ||
| 141 | height:auto; | ||
| 142 | display:block; | ||
| 143 | position:relative; | ||
| 144 | padding:0; | ||
| 145 | margin:0; | ||
| 146 | |||
| 147 | .ribbon{ | ||
| 148 | background:#E8D44B; | ||
| 149 | box-shadow:0 1px rgba(0,0,0,0.2); | ||
| 150 | -moz-box-shadow:0 1px rgba(0,0,0,0.2); | ||
| 151 | -webkit-box-shadow:0 1px rgba(0,0,0,0.2); | ||
| 152 | color:#2C2C2C; | ||
| 153 | text-transform: uppercase; | ||
| 154 | |||
| 155 | position:absolute; | ||
| 156 | font-size:14px; | ||
| 157 | left:-8px; | ||
| 158 | right: unset; | ||
| 159 | top:10px; | ||
| 160 | padding:3px 10px; | ||
| 161 | z-index:2; | ||
| 162 | border-radius: 0px; | ||
| 163 | |||
| 164 | } | ||
| 165 | .ribbon:before{ | ||
| 166 | border:4px solid transparent; | ||
| 167 | border-top:4px solid #C3B241; | ||
| 168 | border-right:4px solid #C3B241; | ||
| 169 | content:""; | ||
| 170 | position:absolute; | ||
| 171 | left:0; | ||
| 172 | right: unset; | ||
| 173 | border-radius: 0px; | ||
| 174 | bottom:-8px; | ||
| 175 | } | ||
| 176 | img{ | ||
| 177 | display:block; | ||
| 178 | max-width:100%; | ||
| 179 | width:100%; | ||
| 180 | height:auto; | ||
| 181 | margin-left:auto; | ||
| 182 | margin-right:auto; | ||
| 183 | box-shadow:none; | ||
| 184 | max-height: 400px; | ||
| 185 | } | ||
| 186 | } | ||
| 187 | .content{ | ||
| 188 | padding: 15px; | ||
| 189 | display: flex; | ||
| 190 | flex-direction: column; | ||
| 191 | flex: 1; | ||
| 192 | .entry-title{ | ||
| 193 | margin-top: 0px; | ||
| 194 | text-transform: uppercase; | ||
| 195 | text-align: center; | ||
| 196 | font-size: 18px; | ||
| 197 | line-height: 24px; | ||
| 198 | } | ||
| 199 | .entry-content{ | ||
| 200 | text-align: center; | ||
| 201 | font-size: 16px; | ||
| 202 | line-height: 24px; | ||
| 203 | } | ||
| 204 | |||
| 205 | .btn{ | ||
| 206 | display: flex; | ||
| 207 | align-self:center; | ||
| 208 | background-color: #0484B8; | ||
| 209 | color: #fff; | ||
| 210 | border-radius: 0px; | ||
| 211 | font-size: 18px; | ||
| 212 | margin-top: auto; | ||
| 213 | margin-bottom: 20px; | ||
| 214 | } | ||
| 215 | .btn:hover{ | ||
| 216 | background-color: #2C2C2C; | ||
| 217 | } | ||
| 218 | |||
| 219 | } | ||
| 157 | } | 220 | } |
| 158 | 221 | ||
| 159 | .element-item > * { | 222 | |
| 160 | margin: 0; | 223 | |
| 161 | padding: 0; | 224 | |
| 225 | |||
| 226 | .course-list{ | ||
| 227 | .element-item { | ||
| 228 | position: relative; | ||
| 229 | float: left; | ||
| 230 | width: calc(33.33% - 30px); | ||
| 231 | height: 600px; | ||
| 232 | margin: 15px; | ||
| 233 | padding: 10px; | ||
| 234 | } | ||
| 162 | } | 235 | } |
| 163 | #load-more{ | 236 | |
| 164 | float:right; | 237 | |
| 165 | margin:5px; | 238 | .view-plan{ |
| 239 | width: 100%; | ||
| 240 | text-align: center; | ||
| 241 | #load-more{ | ||
| 242 | margin: auto; | ||
| 243 | background-color: #0484B8; | ||
| 244 | color: #fff; | ||
| 245 | border-radius: 0px; | ||
| 246 | font-size: 18px; | ||
| 247 | margin-top: auto; | ||
| 248 | margin-bottom: 20px; | ||
| 249 | text-transform: uppercase; | ||
| 250 | } | ||
| 251 | #load-more:hover{ | ||
| 252 | background-color: #2C2C2C; | ||
| 253 | } | ||
| 166 | } | 254 | } |
| 167 | .hidden{ | 255 | .hidden{ |
| 168 | visibility:hidden; | 256 | visibility:hidden; |
| 169 | width:0px!important; | 257 | width:0px!important; |
| 170 | height:0px!important; | 258 | height:0px!important; |
| 171 | margin:0px!important; | 259 | margin:0px!important; |
| 172 | padding:0px!important; | 260 | padding:0px!important; |
| 173 | display:none; | 261 | display:none; |
| 174 | } | 262 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or sign in to post a comment