aboutsummaryrefslogtreecommitdiffstats
path: root/ui/imports/ui/components/main
diff options
context:
space:
mode:
authorKoren Lev <korenlev@gmail.com>2017-07-27 16:42:15 +0300
committerKoren Lev <korenlev@gmail.com>2017-07-27 16:42:15 +0300
commitb88c78e3cf2bef22aa2f1c4d0bf305e303bc15f0 (patch)
treeffa30a6e1511d72562d8772b8700cda52b2752a1 /ui/imports/ui/components/main
parentb70483739d1f6f4f0d31987ed2e4d1e30d71d579 (diff)
adding calipso ui
Change-Id: Ifa6f63daebb07f45580f747341960e898fdb00c4 Signed-off-by: Koren Lev <korenlev@gmail.com>
Diffstat (limited to 'ui/imports/ui/components/main')
-rw-r--r--ui/imports/ui/components/main/main.html15
-rw-r--r--ui/imports/ui/components/main/main.js98
-rw-r--r--ui/imports/ui/components/main/main.styl0
3 files changed, 113 insertions, 0 deletions
diff --git a/ui/imports/ui/components/main/main.html b/ui/imports/ui/components/main/main.html
new file mode 100644
index 0000000..96f6875
--- /dev/null
+++ b/ui/imports/ui/components/main/main.html
@@ -0,0 +1,15 @@
+<!--
+########################################################################################
+# Copyright (c) 2017 Koren Lev (Cisco Systems), Yaron Yogev (Cisco Systems) and others #
+# #
+# All rights reserved. This program and the accompanying materials #
+# are made available under the terms of the Apache License, Version 2.0 #
+# which accompanies this distribution, and is available at #
+# http://www.apache.org/licenses/LICENSE-2.0 #
+########################################################################################
+ -->
+<template name="main">
+ {{> TopNavbarMenu }}
+ {{> yield}}
+ {{> MessagesModal }}
+</template>
diff --git a/ui/imports/ui/components/main/main.js b/ui/imports/ui/components/main/main.js
new file mode 100644
index 0000000..525c53e
--- /dev/null
+++ b/ui/imports/ui/components/main/main.js
@@ -0,0 +1,98 @@
+/////////////////////////////////////////////////////////////////////////////////////////
+// Copyright (c) 2017 Koren Lev (Cisco Systems), Yaron Yogev (Cisco Systems) and others /
+// /
+// All rights reserved. This program and the accompanying materials /
+// are made available under the terms of the Apache License, Version 2.0 /
+// which accompanies this distribution, and is available at /
+// http://www.apache.org/licenses/LICENSE-2.0 /
+/////////////////////////////////////////////////////////////////////////////////////////
+import '/imports/ui/components/messages-modal/messages-modal';
+import './main.html';
+
+Template.mainPage.rendered = function(){
+ $(window).scroll(function(){
+ var windowWidth = $(this).width();
+ //var windowHeight = $(this).height();
+ var windowScrollTop = $(this).scrollTop();
+
+ // effect - No1
+ if(windowScrollTop>60){
+ $('.banner h2').css('display','none');
+ $('.banner .info').css('display','block');
+ }else{
+ $('.banner h2').css('display','block');
+ $('.banner .info').css('display','none');
+ }
+
+ // effect - No2
+ var firstAnimation = function(){
+ $('.clients .clients-info').each(
+ function(){
+ $(this).delay(500).animate(
+ {opacity:1,height:'180',width:'250'},2000);}
+ );
+ };
+
+ // effect - No3
+ var secondAnimation = function(){
+ $('.method:eq(0)').delay(1000).animate({opacity:1},'slow', function(){
+ $(this).find('h4').css('background-color','#B5C3D5');
+ });
+ $('.method:eq(1)').delay(2000).animate({opacity:1},'slow', function(){
+ $(this).find('h4').css('background-color','#B5C3D5');
+ });
+ $('.method:eq(2)').delay(3000).animate({opacity:1},'slow', function(){
+ $(this).find('h4').css('background-color','#B5C3D5');
+ });
+ $('.method:eq(3)').delay(4000).animate({opacity:1},'slow', function(){
+ $(this).find('h4').css('background-color','#B5C3D5');
+ });
+ };
+
+ // effect - No4
+ var thirdAnimation = function(){
+ $('.blogs').find('p').delay(1400).animate({opacity:1, left:0},'slow');
+ $('.blogs').find('img').delay(2000).animate({opacity:1, right:0},'slow');
+ $('.blogs').find('button').delay(2500).animate({opacity:1, bottom:0},'slow');
+ };
+
+
+ if(windowWidth<=549){
+ if(windowScrollTop>600){
+ $('.clients').css('background','tomato');
+ firstAnimation();
+ }
+ if(windowScrollTop>1750){
+ $('.process').css('background','tomato');
+ secondAnimation();
+ }
+ if(windowScrollTop>3500){
+ $('.blogs').css('background','tomato');
+ thirdAnimation();
+ }
+ }else if(windowWidth>549 && windowWidth<=991){
+ if(windowScrollTop>480){
+ $('.clients').css('background','tomato');
+ firstAnimation();
+ }if(windowScrollTop>1150){
+ $('.process').css('background','tomato');
+ secondAnimation();
+ }if(windowScrollTop>2200){
+ $('.blogs').css('background','tomato');
+ thirdAnimation();
+ }
+ }else{
+ if(windowScrollTop>450){
+ $('.clients').css('background','tomato');
+ firstAnimation();
+ }if(windowScrollTop>850){
+ $('.process').css('background','tomato');
+ secondAnimation();
+ }
+ if(windowScrollTop>1600){
+ $('.blogs').css('background','tomato');
+ thirdAnimation();
+ }
+ }
+ });
+};
diff --git a/ui/imports/ui/components/main/main.styl b/ui/imports/ui/components/main/main.styl
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/ui/imports/ui/components/main/main.styl