Skip to content

Instantly share code, notes, and snippets.

Daniel Zuzevich DZuz14

Block or report user

Report or block DZuz14

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@DZuz14
DZuz14 / Slider.js
Last active Oct 4, 2018
Incrementing currentIndex
View Slider.js
import React, { Component } from 'react'
import Slide from '../slide'
import LeftArrow from '../left-arrow'
import RightArrow from '../right-arrow'
export default class Slider extends Component {
constructor(props) {
super(props)
this.state = {
@DZuz14
DZuz14 / Slider.js
Last active Oct 4, 2018
Slider Wrapper
View Slider.js
import React, { Component } from 'react'
import Slide from '../slide'
import LeftArrow from '../left-arrow'
import RightArrow from '../right-arrow'
export default class Slider extends Component {
constructor(props) {
super(props)
this.state = {
@DZuz14
DZuz14 / Slide.js
Last active Oct 4, 2018
Setting Background Image on Slide
View Slide.js
import React from 'react'
const Slide = ({ image }) => {
const styles = {
backgroundImage: `url(${image})`,
backgroundSize: 'cover',
backgroundRepeat: 'no-repeat',
backgroundPosition: '50% 60%'
}
return <div className="slide" style={styles}></div>
@DZuz14
DZuz14 / Slider.js
Last active Oct 4, 2018
Mapping Over Images in Slider
View Slider.js
import React, { Component } from 'react'
import Slide from '../slide'
import LeftArrow from '../left-arrow'
import RightArrow from '../right-arrow'
export default class Slider extends Component {
constructor(props) {
super(props)
this.state = {
@DZuz14
DZuz14 / Slider.js
Last active Oct 4, 2018
Slider With Images and currentIndex state
View Slider.js
import React, { Component } from 'react'
import Slide from '../slide'
import LeftArrow from '../left-arrow'
import RightArrow from '../right-arrow'
export default class Slider extends Component {
constructor(props) {
super(props)
this.state = {
View ArrowComponents.js
import React from 'react';
const RightArrow = (props) => {
return (
<div className="nextArrow" onClick={props.goToNextSlide}>
<i className="fa fa-arrow-right fa-2x" aria-hidden="true"></i>
</div>
);
}
@DZuz14
DZuz14 / Slider.js
Last active Jul 29, 2018
Slider With Arrow Functionality Methods
View Slider.js
import React, { Component } from 'react'
import Slide from '../slide'
import LeftArrow from '../left-arrow'
import RightArrow from '../right-arrow'
export default class Slider extends Component {
constructor(props) {
super(props)
this.state = {}
@DZuz14
DZuz14 / Slider.js
Last active Jul 29, 2018
Slider Updated With Child Components
View Slider.js
import React, { Component } from 'react'
import Slide from '../slide'
import LeftArrow from '../left-arrow'
import RightArrow from '../right-arrow'
export default class Slider extends Component {
constructor(props) {
super(props)
this.state = {}
@DZuz14
DZuz14 / Slide.js
Created Jul 29, 2018
Slide Component
View Slide.js
import React from 'react'
const Slide = () => {
return <div className="slide"></div>
}
export default Slide
@DZuz14
DZuz14 / file.php
Created Jun 22, 2018
Save Craft 3 Entry With PHP
View file.php
<?php
$section = Craft::$app->sections->getSectionByHandle('journalArticles');
$entryTypes = $section->getEntryTypes();
$entryType = reset($entryTypes);
$entry = new Entry([
'sectionId' => $section->id,
'typeId' => $entryType->id,
'fieldLayoutId' => $entryType->fieldLayoutId,
You can’t perform that action at this time.