f4d8be57 by Jeff Balicki

certs

Signed-off-by: Jeff <jeff@gotenzing.com>
1 parent 577b4694
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.
......@@ -5,6 +5,8 @@ add_shortcode('course-list', 'course_list');
function course_list(){
try{
$custom_args = array(
'post_type' => 'sfwd-courses',
'posts_per_page' => -1,
......@@ -42,6 +44,10 @@ function course_list(){
wp_reset_query();
$output = ob_get_clean();
return $output;
}catch(Throwable $e) {
error_log("course_list()". $e->getMessage()) ;
}
}
add_shortcode('my-course-list', 'my_course_list');
......@@ -55,7 +61,7 @@ $enrolled_courses = learndash_user_get_enrolled_courses(get_current_user_id());
if (is_array($enrolled_courses)): ?>
<div class="carousel course">
<div id="<?php echo $uniqid; ?>" class="course-carousel carousel-items">
<div class='swiper-wrapper'>
<div class='swiper-wrapper container'>
<?php foreach($enrolled_courses as $enrolled){
echo course_card($enrolled);
}; ?>
......
......@@ -5,6 +5,8 @@ add_shortcode('resources-list', 'resources_list');
function resources_list(){
try{
$custom_args = array(
'post_type' => 'resource',
'posts_per_page' => -1,
......@@ -57,6 +59,11 @@ function resources_list(){
wp_reset_query();
$output = ob_get_clean();
return $output;
}catch(Throwable $e) {
error_log("resources_list()". $e->getMessage()) ;
}
}
......
......@@ -4,6 +4,7 @@ add_shortcode( 'promos', 'promos' );
function promos(){
try{
$custom_args = array(
'post_type' => 'promo',
'posts_per_page' => 3,
......@@ -32,6 +33,9 @@ function promos(){
wp_reset_query();
$output = ob_get_clean();
return $output;
}catch(Throwable $e) {
error_log("promos()". $e->getMessage()) ;
}
}
function promos_slides($id){
......@@ -108,3 +112,50 @@ function firstname(){
return $user->first_name;;
}
add_shortcode( 'certs', 'certs' );
function certs(){
try{
$enrolled_courses = learndash_user_get_enrolled_courses( get_current_user_id(), array(), false);
ob_start();
if (is_array($enrolled_courses)):?>
<div class="carousel">
<div id="cert" class="cert-carousel carousel-items">
<div class='swiper-wrapper'>
<?php foreach($enrolled_courses as $enrolled_course){
$cert = learndash_get_course_certificate_link($enrolled_course, get_current_user_id());
if(!empty($cert)){
$sfwd_course = get_post_meta($enrolled_course , '_sfwd-courses', true );
$thumbnail_id = "911"; ?>
<div class="swiper-slide container">
<div class="cert">
<?php echo '<a target="_blank" style="background-image:url('.wp_get_attachment_url( $thumbnail_id).')" class="cert_link" href="'.$cert.'"><p><strong>'
.get_user_meta(get_current_user_id(), 'first_name', true )." ". get_user_meta(get_current_user_id(), 'last_name', true ).'</strong></p>'
.get_the_title( $enrolled_course ).'</a>';
?>
</div>
</div>
<?php }
}; ?>
</div>
<div class="swiper-pagination"></div>
<div class="swiper-button-prev" data-id="cert"></div>
<div class="swiper-button-next" data-id="cert"></div>
</div>
</div>
<?php endif;
wp_reset_query();
$output = ob_get_clean();
return $output;
}catch(Throwable $e) {
error_log("certs()". $e->getMessage()) ;
}
}
\ No newline at end of file
......
......@@ -32984,18 +32984,26 @@
_id = jQuery(this).attr('id');
}
if (jQuery(this).hasClass('course-carousel')) {
offset = (window.innerWidth - $('.entry-content').width()) / 2 - 28;
offset = 0;
PerView = 3;
space = 0;
SlidesPerGroup = 3;
offsetAfter = (window.innerWidth - $('.entry-content').width()) / 2 - 28;
space = 45;
SlidesPerGroup = 1;
offsetAfter = 0;
_id = jQuery(this).attr('id');
}
if (jQuery(this).hasClass('cert-carousel')) {
offset = 0;
PerView = 3;
space = 40;
SlidesPerGroup = 1;
offsetAfter = 0;
_id = jQuery(this).attr('id');
}
if ($(window).width() < 600) {
offset = 0;
PerView = 1;
SlidesPerGroup = 1;
space = 0;
SlidesPerGroup = 0;
space = 40;
offsetAfter = 0;
}
var swiper_params = {
......@@ -33632,6 +33640,8 @@
document.getElementById('main-nav').classList.add('fixed-top');
} else {
document.getElementById('main-nav').classList.remove('fixed-top');
document.getElementById('search').classList.remove('open');
document.getElementById('search-button').classList.remove('open');
}
});
});
......@@ -33659,9 +33669,12 @@
$__default["default"](document).ready(function ($) {
var $search = $('.search').clone();
$search.addClass('mobile');
$('.search').attr('id', 'search');
$('.search-button').attr('id', 'search-button');
$('#navbarNavDropdown').prepend($search);
$(document).on("click", ".search-button a, .close", function (e) {
e.preventDefault();
$('.search-button').toggleClass('open');
$('.search').toggleClass('open');
});
});
......
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.
......@@ -33,20 +33,33 @@ jQuery(document).ready(function($) {
_id = jQuery(this).attr('id');
}
if (jQuery(this).hasClass('course-carousel')) {
offset = ((window.innerWidth - $('.entry-content').width()) / 2) - 28;
offset =0;
PerView = 3;
space = 0;
SlidesPerGroup = 3;
offsetAfter = ((window.innerWidth - $('.entry-content').width()) / 2) - 28;
space = 45;
SlidesPerGroup = 1;
offsetAfter = 0;
_id = jQuery(this).attr('id');
}
if (jQuery(this).hasClass('cert-carousel')) {
offset = 0;
PerView = 3;
space = 40;
SlidesPerGroup = 1;
offsetAfter = 0;
_id = jQuery(this).attr('id');
}
if ($(window).width() < 600) {
offset = 0;
PerView = 1;
SlidesPerGroup = 1;
space = 0;
SlidesPerGroup = 0;
space = 40;
offsetAfter = 0;
}
......
......@@ -35,8 +35,11 @@ document.addEventListener("DOMContentLoaded", function() {
window.addEventListener('scroll', function() {
if (window.scrollY > 57) {
document.getElementById('main-nav').classList.add('fixed-top');
} else {
document.getElementById('main-nav').classList.remove('fixed-top');
document.getElementById('search').classList.remove('open');
document.getElementById('search-button').classList.remove('open');
}
});
});
......@@ -72,10 +75,14 @@ function backToTop() {
jQuery(document).ready(function($) {
var $search = $('.search').clone();
$search.addClass('mobile');
$('.search').attr('id','search');
$('.search-button').attr('id','search-button');
$('#navbarNavDropdown').prepend($search);
$(document).on("click", ".search-button a, .close", function(e) {
e.preventDefault();
$('.search-button').toggleClass('open');
$('.search').toggleClass('open');
......
......@@ -4,22 +4,22 @@
height: 13px !important;
width: 13px !important;
opacity: 1 !important;
}
.swiper-pagination-bullet-active {
}
.swiper-pagination-bullet-active {
background: #3f9c35 !important;
border: 2px solid #3f9c35 !important;
}
}
// carousel css
.carousel:not(.is-admin) {
// carousel css
.carousel:not(.is-admin) {
background-color: transparent !important;
left: -20px;
width: 100vw;
margin-top: 30px;
margin-bottom: 30px;
}
}
.carousel-items {
.carousel-items {
list-style: none;
margin-block-start: 0em;
margin-block-end: 0em;
......@@ -30,18 +30,18 @@
@media only screen and (max-width: 768px) {
padding-inline-start: 0px;
}
}
}
.swiper-button-next.swiper-button-disabled,
.swiper-button-prev.swiper-button-disabled {
.swiper-button-next.swiper-button-disabled,
.swiper-button-prev.swiper-button-disabled {
pointer-events: all !important;
}
}
.carousel-items.slick-initialized.slick-slider {
.carousel-items.slick-initialized.slick-slider {
margin-right: 15px; //for the scroll bar
}
}
.carousel {
.carousel {
width: 100vw;
margin-left: calc((100% - 100vw) / 2);
@media only screen and (max-width: 768px) {
......@@ -68,10 +68,51 @@
.swiper-wrapper {
gap: 1rem;
}
}
.cert-carousel {
@media only screen and (max-width: 768px) {
margin-left: 0px !important;
}
.swiper-slide {
width: 100% !important;
@media only screen and (max-width: 768px) {
width: 100% !important;
padding-left: 0px;
}
.cert-cont {
background-color: #e2f2f9;
margin-left: -50%;
margin-right: -50%;
padding-left: 50%;
padding-right: 50%;
}
// testimonials carousel css
.testimonials-carousel {
.cert_link {
display: block;
width: 300px;
height: 232px;
background-size: contain;
text-decoration: none;
font-size: 10px;
margin: auto;
text-align: center;
padding-top: 100px;
color: #156570;
p {
line-height: 10px;
color: #156570;
strong {
color: #156570;
}
}
}
}
}
// testimonials carousel css
.testimonials-carousel {
@media only screen and (max-width: 768px) {
margin-left: 0px !important;
}
......@@ -79,7 +120,7 @@
width: 890px !important;
@media only screen and (max-width: 768px) {
width: 100% !important;
padding-left:0px;
padding-left: 0px;
}
.testimonials {
width: 890px;
......@@ -152,9 +193,10 @@
border-bottom: 20px solid #e04e39;
}
}
}
}
.promo-carousel {
.promo-carousel {
width: 100% !important;
margin-left: 0px !important;
position: relative;
......@@ -227,28 +269,23 @@
border-bottom: 20px solid #e04e39;
}
}
}
}
.course-carousel {
.course-carousel {
width: 100% !important;
margin-left: 0px !important;
position: relative;
@media only screen and (min-width: 1400px) {
max-width: 100% !important;
}
.swiper-wrapper{
.swiper-wrapper {
// max-width: 1344px;
margin: auto;
}
.swiper-slide {
margin-left: 0px !important;
width: 333px !important;
}
.card{
.card {
min-height: 540px;
}
.swiper-button-next {
......@@ -260,6 +297,4 @@
.swiper-pagination {
bottom: -40px !important;
}
}
\ No newline at end of file
}
......
......@@ -113,8 +113,12 @@
.admin-bar .fixed-top {
top: 32px;
@media only screen and (max-width: 768px) {
top: 0px;
}
}
#main-nav.fixed-top {
height: 80px !important;
#main-menu {
......@@ -160,6 +164,11 @@
right: 0px;
width: 200px;
height: 200px;
@media only screen and (max-width: 900px) {
width: 140px;
height: 140px;
}
background-image: url("../images/logo-border.png");
}
......@@ -218,20 +227,32 @@
.search-button a {
text-indent: 99999px;
position: relative;
background-repeat: no-repeat;
width: 35px;
height: 35px;
background-image: url("data:image/svg+xml,%3Csvg id='Component_33_1' data-name='Component 33 %E2%80%93 1' xmlns='http://www.w3.org/2000/svg' width='35' height='35' viewBox='0 0 35 35'%3E%3Ccircle id='Ellipse_8' data-name='Ellipse 8' cx='17.5' cy='17.5' r='17.5' fill='%230484b8'/%3E%3Cg id='Group_1454' data-name='Group 1454' transform='translate(-1077.417 -15.667)'%3E%3Ccircle id='Ellipse_7' data-name='Ellipse 7' cx='6.701' cy='6.701' r='6.701' transform='translate(1086.75 25)' fill='none' stroke='%23fff' stroke-width='3'/%3E%3Cline id='Line_39' data-name='Line 39' x2='4.188' y2='4.188' transform='translate(1098.896 37.146)' fill='none' stroke='%23fff' stroke-linecap='round' stroke-width='3'/%3E%3C/g%3E%3C/svg%3E");
}
.search{
display: none;
.search-button.open{
display:none;
}
.search{
top:57px;
height: 128px;
background-color:rgba(255,255,255,0.9);
position: fixed;
right:0px;
visibility: hidden;
transition: 0.4s;
width: 100%;
right: -100%;
.search-form{
width: 60%;
margin: auto;
margin-top: 40px;
margin-top: 20px;
@media only screen and (max-width: 768px) {
width: 99%;
margin-top: 0px;
......@@ -245,6 +266,7 @@
@media only screen and (max-width: 768px) {
width: 98%;
}
}
.search-field{
......@@ -252,6 +274,7 @@
width: 100%;
margin: auto;
border-bottom:1px solid #2c2c2c;
}
.search-submit{
......@@ -274,6 +297,7 @@
background-color: #2c2c2c;
}
}
.close{
all: unset;
position: relative;
......@@ -293,13 +317,29 @@
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='33.996' height='33.996' viewBox='0 0 33.996 33.996'%3E%3Cg id='Group_1499' data-name='Group 1499' transform='translate(2.121 2.121)' opacity='0.997'%3E%3Cpath id='Path_1922' data-name='Path 1922' d='M0 0 29.754 29.754' transform='translate(0 0)' fill='none' stroke='%232c2c2c' stroke-linecap='round' stroke-width='3'/%3E%3Cline id='Line_4' data-name='Line 4' x1='29.754' y2='29.754' transform='translate(0 0)' fill='none' stroke='%232c2c2c' stroke-linecap='round' stroke-width='3'/%3E%3C/g%3E%3C/svg%3E");
}
}
.search .search-form label::before{
content: "";
opacity: 0;
transition: 0.8s;
position: absolute;
width: 35px;
height: 35px;
margin-left: -65px;
margin-top: -5px;
background-image: url("data:image/svg+xml,%3Csvg id='Component_33_1' data-name='Component 33 %E2%80%93 1' xmlns='http://www.w3.org/2000/svg' width='35' height='35' viewBox='0 0 35 35'%3E%3Ccircle id='Ellipse_8' data-name='Ellipse 8' cx='17.5' cy='17.5' r='17.5' fill='%230484b8'/%3E%3Cg id='Group_1454' data-name='Group 1454' transform='translate(-1077.417 -15.667)'%3E%3Ccircle id='Ellipse_7' data-name='Ellipse 7' cx='6.701' cy='6.701' r='6.701' transform='translate(1086.75 25)' fill='none' stroke='%23fff' stroke-width='3'/%3E%3Cline id='Line_39' data-name='Line 39' x2='4.188' y2='4.188' transform='translate(1098.896 37.146)' fill='none' stroke='%23fff' stroke-linecap='round' stroke-width='3'/%3E%3C/g%3E%3C/svg%3E");
}
.search.open .search-form label::before{
opacity: 1;
}
.search.open:not(.mobile-search){
display: block;
top:57px;
right:0px;
width: 100%;
height: 128px;
background-color:rgba(255,255,255,0.9);
position: fixed;
visibility: visible;
transition: 0.4s;
@media only screen and (max-width: 768px) {
display: none;
visibility: hidden;
......@@ -307,12 +347,13 @@
z-index: 999;
}
.search.open.mobile{
.search.mobile{
display: none;
visibility: hidden;
position: revert;
height: 40px;
top:0px;
@media only screen and (max-width: 768px) {
position: absolute;
display: block;
visibility: visible;
}
......@@ -324,6 +365,7 @@
right: 20px;
border-color:transparent !important ;
}
.fixed-top{
.navbar-toggler{
top: 20px;
......