Skip to content

Commit

Permalink
Remove unecessary changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rosh408 committed Jun 19, 2019
2 parents 72e6ea0 + c6f8fa3 commit 5fed6c8
Show file tree
Hide file tree
Showing 21 changed files with 649 additions and 179 deletions.
16 changes: 15 additions & 1 deletion plugins/rethink-functionality/lib/functions/rest-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' ] );
}
}


// 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 );

3 changes: 2 additions & 1 deletion themes/rcforward/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ function red_starter_minified_css($stylesheet_uri, $stylesheet_dir_uri)
function red_starter_scripts()
{
wp_enqueue_style('red-starter-style', get_stylesheet_uri());

wp_enqueue_style('rcfontawesome', 'https://use.fontawesome.com/releases/v5.8.1/css/all.css');

wp_enqueue_script('waypoints', 'https://cdnjs.cloudflare.com/ajax/libs/waypoints/2.0.3/waypoints.min.js', array('jquery'));
wp_enqueue_script('counterup', 'https://cdn.jsdelivr.net/npm/[email protected]/jquery.counterup.min.js', array('jquery', 'waypoints'), '', true);

Expand Down
4 changes: 1 addition & 3 deletions themes/rcforward/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">

<?php wp_head(); ?>
</head>

Expand All @@ -20,8 +21,6 @@
<a class="skip-link screen-reader-text" href="#content"><?php echo esc_html( 'Skip to content' ); ?></a>

<header id="masthead" class="site-header" role="banner">
<div class="header-container">

<div class="site-logo">
<a href="<?php echo home_url('/'); ?>" rel="home">
<h1 class="rcforward-logo">Rc Forward</h1>
Expand All @@ -39,7 +38,6 @@
<nav id="site-navigation" class="main-navigation" role="navigation">
<?php wp_nav_menu( array( 'theme_location' => 'primary', 'menu_id' => 'primary-menu' ) ); ?>
</nav>
</div><!--.header-container -->
</header><!-- .site-header -->

<div id="content" class="site-content">
10 changes: 3 additions & 7 deletions themes/rcforward/inc/template-tags.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,19 @@
/**
* Custom template tags for this theme.
*
* @package RED_Starter_Theme
* @package RC_Forward
*/

/**
* Prints HTML with meta information for the current post-date/time.
*/
function red_starter_posted_on() {
$time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
$time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>';
}


$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 );
Expand Down
5 changes: 3 additions & 2 deletions themes/rcforward/js/charity-category.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)+" [...]";
Expand Down
4 changes: 3 additions & 1 deletion themes/rcforward/js/counter.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
(function($) {
$(function() {
$('.counter').counterUp({
delay: 10,
delay: 20,
time: 2000
});
$()
$('.menu-item-has-children').append('<span><i class="fas fa-angle-down"></i></span>');
}); // end doc ready
})(jQuery);

15 changes: 13 additions & 2 deletions themes/rcforward/js/flickity.js
Original file line number Diff line number Diff line change
@@ -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);
Expand Down
9 changes: 3 additions & 6 deletions themes/rcforward/js/hamburger.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,15 @@
$(function() {
// check if the toggle nav is visible e.g. mobile only
if ($('.hamburger').css('display') !== 'none') {
console.log('is mobile');
// hamburger menu
$('#toggle-nav').on('click', function() {
$('#primary-menu').slideToggle('is-active');
$('#primary-menu').slideToggle();
});
// about us dropdown
$('#menu-item-71').on('click', function() {
$('.sub-menu').slideToggle('is-active');
$('.sub-menu').slideToggle();
});
} // end if
else {
console.log('not mobile');
}

}); // end doc ready
})(jQuery);
90 changes: 76 additions & 14 deletions themes/rcforward/sass/_charity.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,91 @@
img {
object-fit: cover;
width: 100%;
height: 100vh;
height: 70vh;
}
}
.charity-logo-container {
display: flex;
justify-content: center;
align-items: center;
position: absolute;
// background: white;
// display: flex;
// align-items: center;
// justify-content: center;
// width: 25%;
// height: 25%;
border-radius: -3px;
bottom: 0;
text-align: center;
bottom: -10px;
background: $white;
width: 200px;
height: 200px;
border-radius: 50%;
bottom: -61px;
padding-left: 35px;
padding-right: 35px;
left: 50%;
transform: translateX(-50%);
.charity-logo {
text-align: center;
width: 20%;
border-radius: 50%;
width: 100%;
}
}
}
.entry-content {
text-align: center;
margin-top: 66px;
h2 {
font-style: normal;
text-align: center;
font-size: 2em;
}
.amount-funded {
background-color: rgba(216,216,216,0.18);
text-align: center;
p {
font-size: 42px;
margin: 0 20px 0 0;
color: $innovative__purple;
font-family: $gotham__font;
font-weight: bold;
line-height: 60px;
letter-spacing: normal;
font-style: normal;
}
}
.charity-description{
height: 137px;
font-style: normal;
width: 728px;
margin-left: auto;
margin-right: auto;
font-family: $gotham__font;
font-size: 24px;
font-weight: 300;
line-height: 33px;
text-align: center;
margin-bottom: 64px;
}
.charity-video{
text-align: center;
iframe{
height: 483.34px;
width: 728px;
}
}


}
.browse-charities-title{
text-align: center;
color:$credible__blue;
font-family: $gotham__font;
font-size: 28px;
font-weight: bold;
line-height: 31px;
}

}

/* Main Content Section */
.single-content{
.chimp-donate-form {
text-align: center;
display: flex;
justify-content: center;
margin: auto;
}
}

50 changes: 24 additions & 26 deletions themes/rcforward/sass/_content.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,37 +49,35 @@
// }

body {
background: $credible__blue;
color: $grounded__green;
font-family: $montserrat__font;
background: $credible__blue;
color: $grounded__green;
font-family: $montserrat__font;
}
.site {
max-width: $max-screen-size;
margin: 0 auto;
background: white;
max-width: $max-screen-size;
margin: 0 auto;
background: white;
}
.site-content {
@include tablet{
padding: 2rem;
}
@include desktop{
padding: 5rem;

}
@include tablet {
padding: 2rem;
}
@include desktop {
padding: 5rem;
}
}

/* Chimp Donate Button */
.chimp-donate-form {
background-color: $code__blue;
font-size: 1.6rem;
font-weight: 700;
padding: 1.6rem 5.3rem;
color: $grounded__green;
border-radius: 8px;
@include tablet {

}
@include desktop {

}

background-color: $code__blue;
font-size: 1.6rem;
font-weight: 700;
padding: 1.6rem 5.3rem;
color: $grounded__green;
border-radius: 8px;
margin-top: 10px;
@include tablet {
}
@include desktop {
}
}
4 changes: 4 additions & 0 deletions themes/rcforward/sass/_elements.scss
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,8 @@ a{
&:active, &:hover{
text-decoration: none;
}
}

.chimp-donate-form{
background: $code__blue;
}
12 changes: 5 additions & 7 deletions themes/rcforward/sass/_flickity.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
.flickity-viewport {
position: relative;
height:270px;

// &::before {
// content: '';
// left: 0;
Expand Down Expand Up @@ -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%;
Expand Down
Loading

0 comments on commit 5fed6c8

Please sign in to comment.