From aae3a8eafde94e5ca7b5ee4f4474af72b7b8c489 Mon Sep 17 00:00:00 2001 From: Manu Mtz-Almeida Date: Mon, 30 Jun 2014 04:12:22 +0200 Subject: [PATCH] Updates github pages --- css/gin.webflow.css | 5 +- images/email.png | Bin 1460 -> 0 bytes images/globe2.png | Bin 2780 -> 0 bytes index.html | 36 ++--- js/webflow.js | 320 ++++++++++++++++---------------------------- 5 files changed, 133 insertions(+), 228 deletions(-) delete mode 100755 images/email.png delete mode 100755 images/globe2.png diff --git a/css/gin.webflow.css b/css/gin.webflow.css index 4738ab8b..73cc64f4 100755 --- a/css/gin.webflow.css +++ b/css/gin.webflow.css @@ -378,7 +378,7 @@ p { padding: 4px 14px; border-radius: 5px; background-color: rgba(105, 105, 105, 0.65); - font-family:'Open Sans', sans-serif; + font-family:'Trebuchet MS', 'Lucida Grande', 'Lucida Sans Unicode', 'Lucida Sans', Tahoma, sans-serif; color: white; } .footgraph { @@ -409,6 +409,9 @@ p { height: 558px; background-color: #272822; } +.linkfoot { + color: #b3c2e3; +} html.w-mod-js.w-mod-no-ios *[data-ix="slicefromleft"] { opacity: 0; -webkit-transform: translate(-100px, 0px); diff --git a/images/email.png b/images/email.png deleted file mode 100755 index 8aa1528ba4dbf9890cbe817f1abbb6bda1c2f47e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1460 zcmeAS@N?(olHy`uVBq!ia0vp^HXzKw1|+Ti+$;i8k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ-L~|RWd^&N+NuHtdjF{^%6m9^eS=-fVzQ(*;f=KCTFLXC?ut( zXXe=|z2CiGNg*@ERw>-n*TA>HIW;5GqpB!1xXLdixhgx^GDXSWPQj+a3TQxXYDuC( zMQ%=Bu~mhw64+cTAR8pCucQE0Qj%?}1aVY^Z-9bxeo?A|sh+WJvVozYf|;3~p^2%P znW2t?k%6I+z5x)K=^C0?nVMM{nJYkn6417ylr*a#7dNO~K%T8qMoCG5mA-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dxPmJ(sN#c)U%#$7-rw0JH=s6s+n&? zy51hQeBnGcL2{rbCph9Hz&pz#+3n7IUN-fvqsS(p-)HkH(MzVu>`xFZI?BcD@?u`B6%FZb7-+*E9H{Yrb`d?Y*vfYoK&TZ5~a2MszYj zW7ScEzp5w^i}eVTKWbdx7oX~F)Z{;(c%~!>yJ}kJx=-x?z!#FD^C7$YaTkIRXGHfE zk0kVNN*zJix1AmFI1{<+2~GCQDRYfZ(wn79;5g2Mc6y&-wU=4{?}@Yo4V4%BP4|ph z0bSGT>c{@lU~SKkfShlt!WUR>v%0HHuu#; zhc!`TRR-_OYS)~N{58WHnLjojJz~BeYZYUHUHR6;ASBMS|43-TtaJeWMigzW%T0X$ z=gAQQLOwv>8WOCkJrN789r{K66#FsH9ora7A*G-P&_*LxBVDkHPDnX6u{Q z;@ykMI#E-@zo&<#P3<$?6#GysTO*}dL$j{FtRX|aV!V{wxaqq!_sev~dd$a}NtJxr zl6}5U`ZEWn+l3r#Kn7{b4nWxlDlcxh`>I;f;L6S<*Mj$6GK+u9E|{J1$gmlrcMsl& zT}@%#LfW<;Ct%3Oob+;xQ*`P39<9;Q?$0V6?LIBPYJ7Izud$hctg~{j^r!6bjzVJc zzP2P@79d+d<J)NAExAHpF&L-H<=(I^b zjdsY)T|yw2!h=gw7#2R+GI*Y!w7*WZ&&pE0cjkO;XQ1QIh1&DR^t6`u_Uvx9L8Hf| zPQ!7dH+wJiIzH!>J!!m#12&%TJB`;}gtRj+T#FaAxxd?Uqq*lur_n{==0%@3a#u`) g9AeLYzvF}w$bH9 - + @@ -14,7 +14,7 @@ @@ -26,10 +26,10 @@

Gin Gonic

-

Fastest full-featured web framework for Golang. Crystal clear. +

The fastest full-featured web framework for Golang. Crystal clear.

API REFERENCE -

go get github.com/gin-gonic/gin +

$ go get github.com/gin-gonic/gin

@@ -40,7 +40,8 @@

Gin is a web framework written in Golang. It features a martini-like API with much better performance, up to 40 times faster. If you need performance and good productivity, you will love Gin.

Martini vs Gin -

Run the tests by yourself +

2,3 GHz Intel Core i7 8 GB 1600 MHz DDR3,  OS X 10.9.3

+

Check out the benchmark suite

@@ -48,13 +49,13 @@

Low Overhead Powerful API

-

You can add global, per-group, and per-route middlewares, thousands of nested groups, nice JSON validation and rendering. And the performance will be still great! Gin uses httprouter internally, the fastest HTTP router for - Golang. Httprouter was created by Julien Schmidt and it’s based in a Radix Tree algorithm. This explains the good performance and scalability of Gin.

+

You can add global, per-group, and per-route middlewares, thousands of nested groups, nice JSON validation and rendering. And the performance will be still great. Gin uses httprouter internally, the fastest HTTP router for + Golang. Httprouter was created by Julien Schmidt and it’s based in a Radix Tree algorithm.

Some cool middlewares

If you used Martini before, Gin will be familiar to you. If you don’t, you will need 10 minutes to learn everything.

Check out the
Sentry midDlEware
-

More coming soon!

+

More coming soon

Crystal Clear

@@ -76,6 +77,8 @@
+

More examples in the README.md +

@@ -110,7 +113,7 @@
V

Routes grouping

-

Organize your routes better. Authorization required vs non required, different API versions... In addition, the groups can be nested unlimitedly without degrading performance!

+

Organize your routes better. Authorization required vs non required, different API versions... In addition, the groups can be nested unlimitedly without degrading performance.

VI
@@ -162,19 +165,8 @@
-
-
- -
- -
+
diff --git a/js/webflow.js b/js/webflow.js index 08584b91..b785b640 100755 --- a/js/webflow.js +++ b/js/webflow.js @@ -406,103 +406,6 @@ window.tram=function(t){function i(t,i){var e=new Z.Bare;return e.init(t,i)}func * Licensed MIT (/blob/master/LICENSE.txt) */ (function($){if(!$.support.cors&&$.ajaxTransport&&window.XDomainRequest){var n=/^https?:\/\//i;var o=/^get|post$/i;var p=new RegExp('^'+location.protocol,'i');var q=/text\/html/i;var r=/\/json/i;var s=/\/xml/i;$.ajaxTransport('* text html xml json',function(i,j,k){if(i.crossDomain&&i.async&&o.test(i.type)&&n.test(i.url)&&p.test(i.url)){var l=null;var m=(j.dataType||'').toLowerCase();return{send:function(f,g){l=new XDomainRequest();if(/^\d+$/.test(j.timeout)){l.timeout=j.timeout}l.ontimeout=function(){g(500,'timeout')};l.onload=function(){var a='Content-Length: '+l.responseText.length+'\r\nContent-Type: '+l.contentType;var b={code:200,message:'success'};var c={text:l.responseText};try{if(m==='html'||q.test(l.contentType)){c.html=l.responseText}else if(m==='json'||(m!=='text'&&r.test(l.contentType))){try{c.json=$.parseJSON(l.responseText)}catch(e){b.code=500;b.message='parseerror'}}else if(m==='xml'||(m!=='text'&&s.test(l.contentType))){var d=new ActiveXObject('Microsoft.XMLDOM');d.async=false;try{d.loadXML(l.responseText)}catch(e){d=undefined}if(!d||!d.documentElement||d.getElementsByTagName('parsererror').length){b.code=500;b.message='parseerror';throw'Invalid XML: '+l.responseText;}c.xml=d}}catch(parseMessage){throw parseMessage;}finally{g(b.code,b.message,c,a)}};l.onprogress=function(){};l.onerror=function(){g(500,'error',{text:l.responseText})};var h='';if(j.data){h=($.type(j.data)==='string')?j.data:$.param(j.data)}l.open(i.type,i.url);l.send(h)},abort:function(){if(l){l.abort()}}}}})}})(jQuery); -/*! - * tap.js - * Copyright (c) 2013 Alex Gibson, http://alxgbsn.co.uk/ - * Released under MIT license - */ -(function (window, document) { - - 'use strict'; - - function Tap(el) { - el = typeof el === 'object' ? el : document.getElementById(el); - this.element = el; - this.moved = false; //flags if the finger has moved - this.startX = 0; //starting x coordinate - this.startY = 0; //starting y coordinate - this.hasTouchEventOccured = false; //flag touch event - el.addEventListener('touchstart', this, false); - el.addEventListener('touchmove', this, false); - el.addEventListener('touchend', this, false); - el.addEventListener('touchcancel', this, false); - el.addEventListener('mousedown', this, false); - el.addEventListener('mouseup', this, false); - } - - Tap.prototype.start = function (e) { - if (e.type === 'touchstart') { - this.hasTouchEventOccured = true; - } - this.moved = false; - this.startX = e.type === 'touchstart' ? e.touches[0].clientX : e.clientX; - this.startY = e.type === 'touchstart' ? e.touches[0].clientY : e.clientY; - }; - - Tap.prototype.move = function (e) { - //if finger moves more than 10px flag to cancel - if (Math.abs(e.touches[0].clientX - this.startX) > 10 || Math.abs(e.touches[0].clientY - this.startY) > 10) { - this.moved = true; - } - }; - - Tap.prototype.end = function (e) { - var evt; - - if (this.hasTouchEventOccured && e.type === 'mouseup') { - e.preventDefault(); - e.stopPropagation(); - this.hasTouchEventOccured = false; - return; - } - - if (!this.moved) { - //create custom event - if (typeof document.CustomEvent !== "undefined") { - evt = new document.CustomEvent('tap', { - bubbles: true, - cancelable: true - }); - } else { - evt = document.createEvent('Event'); - evt.initEvent('tap', true, true); - } - e.target.dispatchEvent(evt); - } - }; - - Tap.prototype.cancel = function (e) { - this.hasTouchEventOccured = false; - this.moved = false; - this.startX = 0; - this.startY = 0; - }; - - Tap.prototype.destroy = function () { - var el = this.element; - el.removeEventListener('touchstart', this, false); - el.removeEventListener('touchmove', this, false); - el.removeEventListener('touchend', this, false); - el.removeEventListener('touchcancel', this, false); - el.removeEventListener('mousedown', this, false); - el.removeEventListener('mouseup', this, false); - this.element = null; - }; - - Tap.prototype.handleEvent = function (e) { - switch (e.type) { - case 'touchstart': this.start(e); break; - case 'touchmove': this.move(e); break; - case 'touchend': this.end(e); break; - case 'touchcancel': this.cancel(e); break; - case 'mousedown': this.start(e); break; - case 'mouseup': this.end(e); break; - } - }; - - window.Tap = Tap; - -}(window, document)); /* jshint ignore:end */ /** * ---------------------------------------------------------------------- @@ -955,120 +858,126 @@ Webflow.define('ix', function ($, _) { }); /** * ---------------------------------------------------------------------- - * Webflow: Touch events for jQuery based on tap.js + * Webflow: Touch events */ Webflow.define('touch', function ($, _) { 'use strict'; - var Tap = window.Tap; - var namespace = '.w-events-'; - var dataKey = namespace + 'tap'; - var fallback = !document.addEventListener; - - // jQuery event "tap" - use click in old + non-touch browsers - $.event.special.tap = (fallback || !Webflow.env.touch) ? { bindType: 'click', delegateType: 'click' } : { - setup: function () { - $.data(this, dataKey, new Tap(this)); - - // Returning false instructs jQuery to use native `addEventListener` on the element. - return false; - }, - teardown: function () { - var tap = $.data(this, dataKey); - if (tap && tap.destroy) { - tap.destroy(); - $.removeData(this, dataKey); - } - - // Returning false makes sure the native event handlers bound above are removed. - return false; - } + var api = {}; + api.init = function (el) { + el = typeof el === 'string' ? $(el).get(0) : el; + return el ? new Touch(el) : null; }; - // No swipe events for old browsers - if (fallback || !Object.create) return; + function Touch(el) { + var active = false; + var dirty = false; + var useTouch = false; + var thresholdX = Math.min(Math.round(window.innerWidth * 0.04), 40); + var startX, startY, lastX; - // jQuery event "swipe" - dataKey = namespace + 'swipe'; + el.addEventListener('touchstart', start, false); + el.addEventListener('touchmove', move, false); + el.addEventListener('touchend', end, false); + el.addEventListener('touchcancel', cancel, false); + el.addEventListener('mousedown', start, false); + el.addEventListener('mousemove', move, false); + el.addEventListener('mouseup', end, false); + el.addEventListener('mouseout', cancel, false); - $.event.special.swipe = { - setup: function () { - $.data(this, dataKey, new Swipe(this)); - - // Returning false instructs jQuery to use native `addEventListener` on the element. - return false; - }, - teardown: function () { - var tap = $.data(this, dataKey); - if (tap && tap.destroy) { - tap.destroy(); - $.removeData(this, dataKey); + function start(evt) { + // We don’t handle multi-touch events yet. + var touches = evt.touches; + if (touches && touches.length > 1) { + return; } - // Returning false makes sure the native event handlers bound above are removed. - return false; - } - }; + active = true; + dirty = false; - /** - * Swipe - extends Tap, supports mouse swipes! - */ - function Swipe(el) { - Tap.call(this, el); + if (touches) { + useTouch = true; + startX = touches[0].clientX; + startY = touches[0].clientY; + } else { + startX = evt.clientX; + startY = evt.clientY; + } + + lastX = startX; + } + + function move(evt) { + if (!active) return; + + if (useTouch && evt.type === 'mousemove') { + evt.preventDefault(); + evt.stopPropagation(); + return; + } + + var touches = evt.touches; + var x = touches ? touches[0].clientX : evt.clientX; + var y = touches ? touches[0].clientY : evt.clientY; + + var velocityX = x - lastX; + lastX = x; + + if (Math.abs(velocityX) > thresholdX) { + triggerEvent('swipe', evt, { direction: velocityX > 0 ? 'right' : 'left' }); + cancel(); + } + + // If pointer moves more than 10px flag to cancel tap + if (Math.abs(x - startX) > 10 || Math.abs(y - startY) > 10) { + dirty = true; + } + } + + function end(evt) { + if (!active) return; + + if (useTouch && evt.type === 'mouseup') { + evt.preventDefault(); + evt.stopPropagation(); + useTouch = false; + return; + } + + if (!dirty) triggerEvent('tap', evt); + } + + function cancel(evt) { + active = false; + } + + function destroy() { + el.removeEventListener('touchstart', start, false); + el.removeEventListener('touchmove', move, false); + el.removeEventListener('touchend', end, false); + el.removeEventListener('touchcancel', cancel, false); + el.removeEventListener('mousedown', start, false); + el.removeEventListener('mousemove', move, false); + el.removeEventListener('mouseup', end, false); + el.removeEventListener('mouseout', cancel, false); + el = null; + } + + // Public instance methods + this.destroy = destroy; } - (function () { - var supr = Tap.prototype; - var proto = Swipe.prototype = Object.create(supr); - var threshold = Math.round(screen.width * 0.04) || 20; - if (threshold > 40) threshold = 40; + // Wrap native event to supoprt preventdefault + stopPropagation + function triggerEvent(type, evt, data) { + var newEvent = $.Event(type, { originalEvent: evt }); + $(evt.target).trigger(newEvent, data); + } - proto.start = function (e) { - supr.start.call(this, e); - this.element.addEventListener('mousemove', this, false); - document.addEventListener('mouseup', this, false); - this.velocityX = 0; - this.lastX = this.startX; - this.enabled = true; - }; - - proto.move = _.throttle(function (e) { - if (!this.enabled) return; - var x = e.touches ? e.touches[0].clientX : e.clientX; - this.velocityX = x - this.lastX; - this.lastX = x; - if (Math.abs(this.velocityX) > threshold) { - this.end(e); - } - }); - - proto.end = function (e) { - if (!this.enabled) return; - var velocityX = this.velocityX; - this.cancel(); - if (Math.abs(velocityX) > threshold) { - $(this.element).triggerHandler('swipe', { direction: velocityX > 0 ? 'right' : 'left' }); - } - }; - - proto.destroy = function () { - this.cancel(); - supr.destroy.call(this); - }; - - proto.cancel = function () { - this.enabled = false; - this.element.removeEventListener('mousemove', this, false); - document.removeEventListener('mouseup', this, false); - supr.cancel.call(this); - }; - - proto.handleEvent = function (e) { - if (e.type == 'mousemove') return this.move(e); - supr.handleEvent.call(this, e); - }; - }()); + // Listen for touch events on all nodes by default. + api.instance = api.init(document); + // Export module + return api; }); /** * ---------------------------------------------------------------------- @@ -2344,8 +2253,8 @@ Webflow.define('navbar', function ($, _) { data.el.on('setting' + namespace, handler(data)); } else { addOverlay(data); - data.button.on('click' + namespace, toggle(data)); - data.menu.on('click' + namespace, 'a', navigate(data)); + data.button.on('tap' + namespace, toggle(data)); + data.menu.on('tap' + namespace, 'a', navigate(data)); } // Trigger initial resize @@ -2441,13 +2350,14 @@ Webflow.define('navbar', function ($, _) { } function outside(data) { - return function (evt) { - var target = evt.target; - // Close navbars when clicked outside - if (!data.el.has(target).length && !data.el.is(target)) { + // Close menu when tapped outside + return _.debounce(function (evt) { + if (!data.open) return; + var menu = $(evt.target).closest('.w-nav-menu'); + if (!data.menu.is(menu)) { close(data); } - }; + }); } function resize(i, el) { @@ -2495,7 +2405,7 @@ Webflow.define('navbar', function ($, _) { resize(0, data.el[0]); // Listen for tap outside events - if (!designer) $doc.on('click' + namespace, data.outside); + if (!designer) $doc.on('tap' + namespace, data.outside); // Update menu height for Over state if (animOver) setMenuHeight(data); @@ -2547,7 +2457,7 @@ Webflow.define('navbar', function ($, _) { var animation = config.animation; // Stop listening for tap outside events - $doc.off('click' + namespace, data.outside); + $doc.off('tap' + namespace, data.outside); if (immediate) { tram(data.menu).stop();