Skip to content

Instantly share code, notes, and snippets.

View alvarotrigo's full-sized avatar

Álvaro alvarotrigo

View GitHub Profile
@alvarotrigo
alvarotrigo / app.js
Created February 26, 2018 14:22
socketio
var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var swig = require('swig');
var mysql = require('mysql');
var routes = require('./routes/index');
var tickets = require('./routes/tickets');
@alvarotrigo
alvarotrigo / www
Created February 26, 2018 14:23
socketio2
#!/usr/bin/env node
/**
* Module dependencies.
*/
var app = require('../app');
var debug = require('debug')('tasks:server');
var http = require('http');
@alvarotrigo
alvarotrigo / init.js
Created April 11, 2018 12:16
Tumblr initialisation
$(document).ready(function() {
var animationCont = 0;
$('#fullpage').fullpage({
sectionsColor: ['#36465d', '#55c598', '#a77dc2', 'whitesmoke', '#ccddff', '#ccc'],
anchors: ['firstPage', 'secondPage', '3rdPage', '4thpage'],
menu: '#menu',
navigation: true,
navigationPosition: 'left',
easingcss3: 'cubic-bezier(.825,0,.5,1)',
@alvarotrigo
alvarotrigo / callbacks.js
Created April 11, 2018 12:19
tumblr effects using fullpage.js callbacks
onLeave: function(index, nextIndex, direction){
if(nextIndex === 2){
animationCont++;
//forcing the gift to start again
$('.section-2-animation')
.css('background-image', 'url(animation3.gif?v='+animationCont+')');
}
},
afterLoad: function(anchorLink, index){
@alvarotrigo
alvarotrigo / styles.css
Created April 11, 2018 12:22
Tumblr responsive site
.fp-responsive .fp-bg{
position: relative !important;
}
.fp-responsive #section-2{
padding: 30px 0;
}
.fp-responsive .content{
padding: 10%;
}
.fp-responsive .section-3-wrapper{
@alvarotrigo
alvarotrigo / afterResponsive.js
Created April 11, 2018 12:23
Tumblr responsive disabling parallax
afterResponsive: function(isResponsive){
if(isResponsive){
$.fn.fullpage.parallax.destroy();
}else{
$.fn.fullpage.parallax.init();
}
}
@alvarotrigo
alvarotrigo / animations.css
Created April 11, 2018 12:25
Tumblr animations
.blogs-post {
background: #fff;
border-radius: 3px;
margin: 0 0 20px;
width: 300px;
transform: translateX(200px);
}
.blogs-post-column{
opacity: 0;
transform: translateX(0);
@alvarotrigo
alvarotrigo / index.js
Created July 23, 2018 12:01
react demo page
/* eslint-disable import/no-extraneous-dependencies */
import React from 'react';
import ReactDOM from 'react-dom';
import fullpage from 'fullpage.js/dist/fullpage';
import ReactFullpage from 'react-fullpage.js/dist/react-fullpage.js';
const fullpageOptions = {
licenseKey: 'OPEN-SOURCE-GPLV3-LICENSE',
@alvarotrigo
alvarotrigo / fullpage-setup.js
Last active September 20, 2018 14:31
Current basic structure of fullpage.js
/*!
* I basically want to generate this UMD with some tool.
* Right now I did it manually by copying and pasting some generic one.
*
* But it is failing in some cases due to having in this same file the jQuery
* adator you'll see at the bottom.
*/
(function( root, window, document, factory, undefined) {
if( typeof define === 'function' && define.amd ) {
// AMD. Register as an anonymous module.
@alvarotrigo
alvarotrigo / en.yml
Created October 4, 2019 10:41
English fullpage.js site
#Page meta data
title: fullPage.js | One Page Scroll sections Site Plugin
description: fullPage plugin by Alvaro Trigo. Create fullscreen pages fast and simple. One page scroll sections jquery plugin. Mouse snap.
keywords: fullpage,jquery,alvaro,trigo,plugin,fullscren,screen,full,iphone5,snap,snapping,apple,scroll,sections
og-title: fullPage scroll snapping. Create full screen pages fast and simple
og-description: Mouse wheel snap to sections. Fast and simple to use.
twitter-description: Great Javascript library to create fullscreen scrolling websites
#Sections content
Create Beautiful Fullscreen Scrolling Websites: Create Beautiful Fullscreen Scrolling Websites