Skip to content

Commit

Permalink
Merge pull request #40 from rhinogram/zach/build-updates
Browse files Browse the repository at this point in the history
Webpack 2 + Build updates
  • Loading branch information
mcraiganthony authored Mar 6, 2017
2 parents 87f8715 + df8f290 commit c22c257
Show file tree
Hide file tree
Showing 124 changed files with 151,576 additions and 145,340 deletions.
4 changes: 3 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@
}
},
"plugins": [
"import",
"react",
"babel"
"babel",
"jsx-a11y",
],
"rules": {
"no-trailing-spaces": 1,
Expand Down
3 changes: 3 additions & 0 deletions .lesshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"depthLevel": {
"enabled": false
},
"universalSelector": {
"enabled": false
},
"qualifyingElement": {
"enabled": false,
"allowWithId": false,
Expand Down
135 changes: 5 additions & 130 deletions build/animations/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Lato:400,300,400italic,700,900">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/codemirror/5.0.0/codemirror.min.css"/>
<link rel="stylesheet" href="../css/rhinostyle-docs.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/codemirror/5.0.0/codemirror.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/codemirror/5.0.0/mode/javascript/javascript.min.js"></script>
<script src="../scripts/vendor.bundle.js"></script>
</head>
<body>

Expand Down Expand Up @@ -179,134 +175,13 @@ <h5 class="site-miniheadline">Time Animation</h5>
</main>
</div>

<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script>
<script src="../scripts/rhinostyle-docs.js"></script>
<script src="../scripts/vendor.bundle.js"></script>
<script>
$(document).ready(function() {
function loop() {
// nav toggling below 1200px
if(window.matchMedia("(max-width: 1199px)").matches) {
$('html').removeClass('navigation-is-locked');
$('#site-header__menu').click(function(){
$('#site-navigation').scrollTop(0);
$('html').addClass('navigation-is-open');
});
$('#site-overlay').click(function(){
$('html').removeClass('navigation-is-open');
});
}

// lock nav in open position at 1200px
if(window.matchMedia("(min-width: 1200px)").matches) {
$('html').removeClass('navigation-is-open');
$('html').addClass('navigation-is-locked');
}


// panel toggling below 1500px
if(window.matchMedia("(max-width: 1499px)").matches) {
$('#site-overlay').click(function(){
$('html').removeClass('panel-is-open');
});
}

requestAnimationFrame(loop);
}

loop();

// SVG loader
boomsvgloader.load('../svg/sprite.svg');

// progress bars - send to random position
/*$('.progress__bar').each(function(){
var position = Math.floor(Math.random()*100);
if(position<4) { position = 4; }
// add % to label
if($(this).find('.progress__bar__slider__label').length > 0) {
$(this).find('.progress__bar__slider__label').html(position+'%');
}
// position bar
$(this).find('.progress__bar__slider').css('transform','translateX('+position+'%)');
$(this).find('.progress__bar__slider').css('-webkit-transform','translateX('+position+'%)');
});
// progress bars - click progress bar to transition
$(".progress__bar").on("click", function(e) {
var offset = $(this).offset(),
position = Math.floor((e.pageX - offset.left)/$(this).width()*100) + 1;
// check for label
if($(this).find('.progress__bar__slider__label').length > 0) {
// add % to label
$(this).find('.progress__bar__slider__label').html(position+'%');
if (position < 3 ) { position = 3; }
}
// position bar
$(this).find('.progress__bar__slider').css('transform','translateX('+position+'%)');
$(this).find('.progress__bar__slider').css('-webkit-transform','translateX('+position+'%)');
});*/


// animation testing
var rhinoFlagFrames = 51, // 52 total frames minus 1
rhinoFlagEase = new SteppedEase(rhinoFlagFrames),
rhinoFlagPosition = '-98.07%', // total height of svg (45760) minus height of 1 frame (880px) / 45760 * 100
rhinoFlagSpeed = 3,

rhinoLoginFrames = 64, // 65 total frames minus 1
rhinoLoginEase = new SteppedEase(rhinoLoginFrames),
rhinoLoginPosition = '-98.46%', // total height of svg (29900) minus height of 1 frame (460px) / 29900 * 100
rhinoLoginSpeed = 3,

rhinoSecureFrames = 51, // 52 total frames minus 1
rhinoSecureEase = new SteppedEase(rhinoSecureFrames),
rhinoSecurePosition = '-98.07%', // total height of svg (45760) minus height of 1 frame (880px) / 45760 * 100
rhinoSecureSpeed = 3;

rhinoTimeFrames = 58, // 59 total frames minus 1
rhinoTimeEase = new SteppedEase(rhinoTimeFrames),
rhinoTimePosition = '-98.3%', // total height of svg (51920) minus height of 1 frame (880px) / 51920 * 100
rhinoTimeSpeed = 3;

var rhinoFlagTL = new TimelineMax({repeat:-1,repeatDelay:2});
rhinoFlagTL.to('.rhino-animation__flag', rhinoFlagSpeed, {
y: rhinoFlagPosition,
ease: rhinoFlagEase
});

var rhinoLoginTL = new TimelineMax({repeat:-1,repeatDelay:2});
rhinoLoginTL.to('.rhino-animation__login', rhinoLoginSpeed, {
y: rhinoLoginPosition,
ease: rhinoLoginEase
});

var rhinoSecureTL = new TimelineMax({repeat:-1,repeatDelay:2});
rhinoSecureTL.to('.rhino-animation__secure', rhinoSecureSpeed, {
y: rhinoSecurePosition,
ease: rhinoSecureEase
});

var rhinoTimeTL = new TimelineMax({repeat:-1,repeatDelay:2});
rhinoTimeTL.to('.rhino-animation__time', rhinoTimeSpeed, {
y: rhinoTimePosition,
ease: rhinoTimeEase
});

var hostName = document.location.hostname;

// Handle active navigation
var split = (hostName == "localhost") ? 1:2;

var navLocation = location.pathname.split("/")[split];

if (navLocation) {
$('.site-navigation__nav a[href^="../' + navLocation + '"]').addClass('active');
} else {
$('.site-navigation__nav a[href=""').addClass('active');
}
});
var rhinoDocs = {
rootPath: '../'
}
</script>
<script src="../scripts/rhinostyle-docs.js"></script>
</body>
</html>

136 changes: 5 additions & 131 deletions build/avatars/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Lato:400,300,400italic,700,900">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/codemirror/5.0.0/codemirror.min.css"/>
<link rel="stylesheet" href="../css/rhinostyle-docs.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/codemirror/5.0.0/codemirror.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/codemirror/5.0.0/mode/javascript/javascript.min.js"></script>
<script src="../scripts/vendor.bundle.js"></script>
</head>
<body>

Expand Down Expand Up @@ -128,141 +124,19 @@
<main class="site-content" id="js-app">


<script src="../scripts/avatar.js"></script>



</main>
</div>

<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script>
<script src="../scripts/rhinostyle-docs.js"></script>
<script src="../scripts/vendor.bundle.js"></script>
<script>
$(document).ready(function() {
function loop() {
// nav toggling below 1200px
if(window.matchMedia("(max-width: 1199px)").matches) {
$('html').removeClass('navigation-is-locked');
$('#site-header__menu').click(function(){
$('#site-navigation').scrollTop(0);
$('html').addClass('navigation-is-open');
});
$('#site-overlay').click(function(){
$('html').removeClass('navigation-is-open');
});
}

// lock nav in open position at 1200px
if(window.matchMedia("(min-width: 1200px)").matches) {
$('html').removeClass('navigation-is-open');
$('html').addClass('navigation-is-locked');
}


// panel toggling below 1500px
if(window.matchMedia("(max-width: 1499px)").matches) {
$('#site-overlay').click(function(){
$('html').removeClass('panel-is-open');
});
}

requestAnimationFrame(loop);
}

loop();

// SVG loader
boomsvgloader.load('../svg/sprite.svg');

// progress bars - send to random position
/*$('.progress__bar').each(function(){
var position = Math.floor(Math.random()*100);
if(position<4) { position = 4; }
// add % to label
if($(this).find('.progress__bar__slider__label').length > 0) {
$(this).find('.progress__bar__slider__label').html(position+'%');
}
// position bar
$(this).find('.progress__bar__slider').css('transform','translateX('+position+'%)');
$(this).find('.progress__bar__slider').css('-webkit-transform','translateX('+position+'%)');
});
// progress bars - click progress bar to transition
$(".progress__bar").on("click", function(e) {
var offset = $(this).offset(),
position = Math.floor((e.pageX - offset.left)/$(this).width()*100) + 1;
// check for label
if($(this).find('.progress__bar__slider__label').length > 0) {
// add % to label
$(this).find('.progress__bar__slider__label').html(position+'%');
if (position < 3 ) { position = 3; }
}
// position bar
$(this).find('.progress__bar__slider').css('transform','translateX('+position+'%)');
$(this).find('.progress__bar__slider').css('-webkit-transform','translateX('+position+'%)');
});*/


// animation testing
var rhinoFlagFrames = 51, // 52 total frames minus 1
rhinoFlagEase = new SteppedEase(rhinoFlagFrames),
rhinoFlagPosition = '-98.07%', // total height of svg (45760) minus height of 1 frame (880px) / 45760 * 100
rhinoFlagSpeed = 3,

rhinoLoginFrames = 64, // 65 total frames minus 1
rhinoLoginEase = new SteppedEase(rhinoLoginFrames),
rhinoLoginPosition = '-98.46%', // total height of svg (29900) minus height of 1 frame (460px) / 29900 * 100
rhinoLoginSpeed = 3,

rhinoSecureFrames = 51, // 52 total frames minus 1
rhinoSecureEase = new SteppedEase(rhinoSecureFrames),
rhinoSecurePosition = '-98.07%', // total height of svg (45760) minus height of 1 frame (880px) / 45760 * 100
rhinoSecureSpeed = 3;

rhinoTimeFrames = 58, // 59 total frames minus 1
rhinoTimeEase = new SteppedEase(rhinoTimeFrames),
rhinoTimePosition = '-98.3%', // total height of svg (51920) minus height of 1 frame (880px) / 51920 * 100
rhinoTimeSpeed = 3;

var rhinoFlagTL = new TimelineMax({repeat:-1,repeatDelay:2});
rhinoFlagTL.to('.rhino-animation__flag', rhinoFlagSpeed, {
y: rhinoFlagPosition,
ease: rhinoFlagEase
});

var rhinoLoginTL = new TimelineMax({repeat:-1,repeatDelay:2});
rhinoLoginTL.to('.rhino-animation__login', rhinoLoginSpeed, {
y: rhinoLoginPosition,
ease: rhinoLoginEase
});

var rhinoSecureTL = new TimelineMax({repeat:-1,repeatDelay:2});
rhinoSecureTL.to('.rhino-animation__secure', rhinoSecureSpeed, {
y: rhinoSecurePosition,
ease: rhinoSecureEase
});

var rhinoTimeTL = new TimelineMax({repeat:-1,repeatDelay:2});
rhinoTimeTL.to('.rhino-animation__time', rhinoTimeSpeed, {
y: rhinoTimePosition,
ease: rhinoTimeEase
});

var hostName = document.location.hostname;

// Handle active navigation
var split = (hostName == "localhost") ? 1:2;

var navLocation = location.pathname.split("/")[split];

if (navLocation) {
$('.site-navigation__nav a[href^="../' + navLocation + '"]').addClass('active');
} else {
$('.site-navigation__nav a[href=""').addClass('active');
}
});
var rhinoDocs = {
rootPath: '../'
}
</script>
<script src="../scripts/rhinostyle-docs.js"></script>
</body>
</html>

Loading

0 comments on commit c22c257

Please sign in to comment.