diff --git a/plugins/rethink-functionality/lib/functions/rest-api.php b/plugins/rethink-functionality/lib/functions/rest-api.php index cdcfa3f..e085c14 100644 --- a/plugins/rethink-functionality/lib/functions/rest-api.php +++ b/plugins/rethink-functionality/lib/functions/rest-api.php @@ -21,4 +21,18 @@ function rc_slug_register_charity() { function rc_slug_get_charity_field( $post, $field_name ) { return CFS()->get( $field_name, $post[ 'id' ] ); -} \ No newline at end of file +} + + +// function rc_post_featured_image_json( $data, $post, $context ) { +// $featured_image_id = $data->data['featured_media']; // get featured image id +// $featured_image_url = wp_get_attachment_image_src( $featured_image_id, 'large' ); // get url of the original size + +// if( $featured_image_url ) { +// $data->data['featured_image_url'] = $featured_image_url[0]; +// } + +// return $data; +// } +// add_filter( 'rest_prepare_post', 'rc_post_featured_image_json', 10, 3 ); + diff --git a/themes/rcforward/inc/template-tags.php b/themes/rcforward/inc/template-tags.php index 9b20152..9a8e537 100755 --- a/themes/rcforward/inc/template-tags.php +++ b/themes/rcforward/inc/template-tags.php @@ -2,7 +2,7 @@ /** * Custom template tags for this theme. * - * @package RED_Starter_Theme + * @package RC_Forward */ /** @@ -10,15 +10,11 @@ */ function red_starter_posted_on() { $time_string = ''; - if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { - $time_string = ''; - } + $time_string = sprintf( $time_string, esc_attr( get_the_date( 'c' ) ), - esc_html( get_the_date() ), - esc_attr( get_the_modified_date( 'c' ) ), - esc_html( get_the_modified_date() ) + esc_html( get_the_date('F j, Y') ) ); $posted_on = sprintf( esc_html( '%s' ), $time_string ); diff --git a/themes/rcforward/js/charity-category.js b/themes/rcforward/js/charity-category.js index 4dcfe1b..7763d81 100644 --- a/themes/rcforward/js/charity-category.js +++ b/themes/rcforward/js/charity-category.js @@ -49,8 +49,9 @@ $.each(value.charity_tax, function(index, id){ console.log(taxId); if(id == taxId){ - console.log(id); - let $thumbnailLink = value._embedded["wp:featuredmedia"][0].source_url; + console.log(value); + // let $thumbnailLink = value.featured_image_url; + let $thumbnailLink = value._embedded["wp:featuredmedia"][0].media_details.sizes.medium.source_url; let $logoLink = value.charity_logo; let $title = value.title.rendered; let $description = value.charity_description.substring(75)+" [...]"; diff --git a/themes/rcforward/js/flickity.js b/themes/rcforward/js/flickity.js index 2d49da2..4ff798a 100644 --- a/themes/rcforward/js/flickity.js +++ b/themes/rcforward/js/flickity.js @@ -1,11 +1,22 @@ (function($) { $(function() { +const $carousel = $('.main-carousel'); + if($carousel.hasClass("related-charities")){ + $carousel.flickity({ + contain: true, + wrapAround: true, + setGallerySize:false, + }); + }else{ + $carousel.flickity({ - $('.main-carousel').flickity({ cellAlign: 'left', contain: true, - wrapAround: true + wrapAround: true, + setGallerySize:false, }); + } + }); // End of Doc ready })(jQuery); diff --git a/themes/rcforward/sass/_content.scss b/themes/rcforward/sass/_content.scss index 45a4943..da9999a 100755 --- a/themes/rcforward/sass/_content.scss +++ b/themes/rcforward/sass/_content.scss @@ -61,9 +61,11 @@ body{ } @include desktop{ padding:5rem; - } } +<<<<<<< HEAD + +======= /* Chimp Donate Button */ .chimp-donate-form { background: $code__blue; @@ -73,4 +75,5 @@ body{ border-radius: 6px; color: $grounded__green; font-weight: bold; - } \ No newline at end of file + } +>>>>>>> 13446c5441c5a41af894e506924c9b3ec9456ae3 diff --git a/themes/rcforward/sass/_flickity.scss b/themes/rcforward/sass/_flickity.scss index ec17675..423e2e2 100644 --- a/themes/rcforward/sass/_flickity.scss +++ b/themes/rcforward/sass/_flickity.scss @@ -11,6 +11,7 @@ .flickity-viewport { position: relative; height:270px; + // &::before { // content: ''; // left: 0; @@ -64,16 +65,13 @@ ol.flickity-page-dots{ } } .carousel-cell { - box-shadow: 0px 2px 2px $innovative__purple; + @include box-shadow(); width: 23.5%; /* half-width */ height: 230px; - margin: 0 1%; - border-radius: 10px; + margin: 0 5px; + overflow: hidden; - border:1px solid lighten($innovative__purple,50%); - &:hover{ - box-shadow: 0px 3px 5px $innovative__purple; - } + img{ max-width: 100%; max-height:100%; diff --git a/themes/rcforward/sass/_front-page.scss b/themes/rcforward/sass/_front-page.scss index 50b0e41..fdce246 100644 --- a/themes/rcforward/sass/_front-page.scss +++ b/themes/rcforward/sass/_front-page.scss @@ -3,7 +3,7 @@ text-align: center; .why-donate-content{ @include display-flex(); - padding:2rem 6rem; + padding:2rem 7rem; justify-content: space-between; img{ width:120px; @@ -28,11 +28,7 @@ height:130px; margin:0 auto; } - border:1px solid lighten($innovative__purple,50%); - box-shadow: 0px 2px 2px $innovative__purple; - &:hover{ - box-shadow: 0px 3px 5px $innovative__purple; - } + @include box-shadow(); button, a{ background:$credible__blue; padding:$button__padding; @@ -47,4 +43,49 @@ } } -} \ No newline at end of file +} + +//front page + +.home{ + text-align:center; + .entry-header{ + + } + + .choose-fund{ + padding:$content__padding; + .choose-fund-subtitle{ + font-weight:600; + } + .choose-fund-description{ + margin:0 auto; + } + + .fund{ + @include display-flex(); + margin:3rem auto; + justify-content: space-between; + .fund-entry{ + @include box-shadow(); + padding:1rem; + flex-basis:30%; + display:grid; + grid-template-columns: 1fr; + grid-template-rows:60px auto 130px 55px; + img{ + width:80px; + height:80px; + margin:0 auto; + } + a{ + @include button(); + } + } + } + + + } +} + + diff --git a/themes/rcforward/sass/_mixins.scss b/themes/rcforward/sass/_mixins.scss index f607430..ddf29fa 100755 --- a/themes/rcforward/sass/_mixins.scss +++ b/themes/rcforward/sass/_mixins.scss @@ -32,4 +32,26 @@ flex-direction: $flexDirection; justify-content: $justifyContent; align-items: $alignItems; +} + +@mixin box-shadow(){ + border-radius: 10px; + border:1px solid lighten($innovative__purple,50%); + box-shadow: 0px 2px 2px $innovative__purple; + &:hover{ + box-shadow: 0px 3px 5px $innovative__purple; + } +} + +@mixin button($background-color: $innovative__purple){ + padding:$button__padding; + background-color:$background-color; + border-radius: 7px; + width:10rem; + display: flex; + justify-content: center; + align-items: center; + color:white; + text-align: center; + margin: 0 auto; } \ No newline at end of file diff --git a/themes/rcforward/sass/_variables.scss b/themes/rcforward/sass/_variables.scss index 3ecf708..d38a483 100755 --- a/themes/rcforward/sass/_variables.scss +++ b/themes/rcforward/sass/_variables.scss @@ -39,7 +39,7 @@ $gotham__font: 'Montserrat Light', sans-serif; // RC Mixins $tablet-width: 600px; $desktop-width: 1000px; -$max-screen-size: 1240px; +$max-screen-size: 1440px; // Typography @@ -52,3 +52,4 @@ $font__line-height-pre: 1.6; //padding $button__padding: 1rem 1.5rem; +$content__padding: 2rem 6rem; diff --git a/themes/rcforward/single-charity.php b/themes/rcforward/single-charity.php index dd62c0d..b2b55bc 100644 --- a/themes/rcforward/single-charity.php +++ b/themes/rcforward/single-charity.php @@ -64,7 +64,7 @@ foreach ( $main_contents as $main_content ): $index++; ?> -