Skip to content

Instantly share code, notes, and snippets.

(function(){
// Vertical Timeline - by CodyHouse.co
function VerticalTimeline( element ) {
this.element = element;
this.blocks = this.element.getElementsByClassName("cd-timeline__block");
this.images = this.element.getElementsByClassName("cd-timeline__img");
this.contents = this.element.getElementsByClassName("cd-timeline__content");
this.offset = 0.8;
this.hideBlocks();
};
var gulp = require('gulp');
var sass = require('gulp-sass');
var livereload = require('gulp-livereload');
var inlineCss = require('gulp-inline-css');
var replace = require('gulp-replace');
var fs = require('fs');
sass.compiler = require('node-sass');
gulp.task('sass', function () {
<?php
namespace Sample;
use \Illuminate\Database\Capsule\Manager as Capsule;
class Loader {
public function init() {
$this->initEloquent();
$this->initActions();
$this->initFilters();
<?php
/**
* Plugin Name: Sample Plugin
* Description: A sample plugin
* Version: 1.0
*/
require_once __DIR__ . '/vendor/autoload.php';
$plugin = new \Sample\Loader(__DIR__, plugin_dir_url(__FILE__));
{
"autoload": {
"psr-4": {
"Sample\\": "src/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"illuminate/database": "^7.14.1"
animation: navigation-base 1s 1;
@keyframes navigation-base {
0% {
width: 0px;
height: 0px;
box-shadow: 0px;
}
40% {
width: 100%;
protected function setupCategories() {
$categories = Category::where('taxonomy', 'category')->get();
foreach($categories as $category) {
$data = $category->createObject();
array_push($this->dataObject, $data);
}
}
class Category extends \Corcel\Model\Taxonomy {
public function getIdAttribute() {
return $this->term_id;
}
public function getTitleAttribute() {
return $this->name;
}
public function createObject() {
public function createObject() {
$object = [
'_id' => $this->id,
'_type' => 'employee',
'name' => $this->name,
'slug' => $this->slug,
];
return $object;
}