A Pen by Erez Lieberman on CodePen.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from "react"; | |
import "./App.css"; | |
import { | |
Card, | |
CardText, | |
CardBody, | |
CardTitle, | |
Button, | |
Form, | |
FormGroup, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import _ from 'lodash'; | |
import { mount, shallow } from 'enzyme'; | |
import NameOfComponent from '../src/NameOfComponent'; | |
describe('NameOfComponent Basic: ', () => { | |
it('should verified that component is exits', () => { | |
const wrapper = mount( | |
<NameOfComponent /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="videoWrapper"> | |
<!-- from here: http://css-tricks.com/NetMag/FluidWidthVideo/Article-FluidWidthVideo.php --> | |
<?php if( get_field('youtube_url') ){ | |
$embed_code = wp_oembed_get( get_field('youtube_url') ); | |
echo $embed_code; | |
} ?> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('.hp_videos .modal').on('hidden.bs.modal', function (e) { | |
var url = $(this).find('iframe').attr('src'); | |
$(this).find('iframe').attr('src',url); | |
console.log('close'); | |
}); | |
$('.hp_videos .modal').on('shown.bs.modal', function (e) { | |
var url = $(this).find('iframe').attr('src'); | |
$(this).find('iframe').attr('src',url); | |
console.log('open'); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php $image = get_sub_field('features_img'); | |
if( !empty($image) ): | |
// vars | |
$url = $image['url']; | |
$title = $image['title']; | |
$alt = $image['alt']; | |
$caption = $image['caption']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@font-face { | |
font-family: 'Narkis Block M F'; | |
src: url('fonts/NarkisBlock-Medium.otf'); | |
font-weight: 500; | |
} | |
@font-face { | |
font-family: 'Narkis Block M F'; | |
src: url('fonts/NarkisBlock-Regular.otf'); | |
font-weight: 400; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Write a procedure, convert_seconds, which takes as input a non-negative | |
# number of seconds and returns a string of the form | |
# '<integer> hours, <integer> minutes, <number> seconds' but | |
# where if <integer> is 1 for the number of hours or minutes, | |
# then it should be hour/minute. Further, <number> may be an integer | |
# or decimal, and if it is 1, then it should be followed by second. | |
# You might need to use int() to turn a decimal into a float depending | |
# on how you code this. int(3.0) gives 3 | |
# | |
# Note that English uses the plural when talking about 0 items, so |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if (get_field('youtubeURL')) { | |
$mystring = get_field('youtubeURL'); | |
$parts = explode("=",$mystring); | |
$mystring = $parts['1']; ?> | |
<iframe width="440" height="228" src="//www.youtube-nocookie.com/embed/<?php echo $mystring ; ?>" frameborder="0" allowfullscreen></iframe> | |
<?php } ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// create marker | |
var templateDir = "<?php bloginfo('stylesheet_directory') ?>"; | |
var iconBase = templateDir + '/images/map_icon.svg'; | |
var marker = new google.maps.Marker({ | |
position : latlng, | |
map : map, | |
icon: iconBase | |
}); |
NewerOlder