Difference between revisions of "Team:William and Mary/Results"

Line 15: Line 15:
 
<script>
 
<script>
  
$(function() {
+
var $animation_elements = $('.animation-element');
  var $elements = $('.animateBlock.notAnimated'); //contains all elements of nonAnimated class
+
var $window = $(window);
  var $window = $(window);
+
  $window.on('scroll', function(e) {
+
    $elements.each(function(i, elem) { //loop through each element
+
      if ($(this).hasClass('animated')) // check if already animated
+
        return;
+
      animateMe($(this));
+
    });
+
  });
+
});
+
  
function animateMe(elem) {
+
function check_if_in_view() {
   var winTop = $(window).scrollTop(); // calculate distance from top of window
+
   var window_height = $window.height();
   var winBottom = winTop + $(window).height();
+
  var window_top_position = $window.scrollTop();
  var elemTop = $(elem).offset().top; // element distance from top of page
+
   var window_bottom_position = (window_top_position + window_height);
  var elemBottom = elemTop + $(elem).height();
+
 
  if ((elemBottom <= winBottom) && (elemTop >= winTop)) {
+
  $.each($animation_elements, function() {
    // exchange classes if element visible
+
    var $element = $(this);
    $(elem).removeClass('notAnimated').addClass('animated');
+
    var element_height = $element.outerHeight();
   }
+
    var element_top_position = $element.offset().top;
 +
    var element_bottom_position = (element_top_position + element_height);
 +
 
 +
    //check to see if this current container is within viewport
 +
    if ((element_bottom_position >= window_top_position) &&
 +
      (element_top_position <= window_bottom_position)) {
 +
      $element.addClass('in-view');
 +
    } else {
 +
      $element.removeClass('in-view');
 +
    }
 +
   });
 
}
 
}
 +
 +
$window.on('scroll resize', check_if_in_view);
 +
$window.trigger('scroll');
  
  
Line 44: Line 48:
  
 
<style>
 
<style>
* {
+
 
   margin: 0;
+
body {
   padding: 0;
+
   font-size: 16px;
 +
  font-family: 'Open Sans', sans-serif;
 +
  font-weight: 400;
 +
  background: #efefef;
 +
   line-height: 170%;
 
}
 
}
  
html {
+
strong,
   overflow-y: scroll;
+
b {
 +
   font-weight: 600
 
}
 
}
  
body {
+
h1,
   background: #f0f0f0;
+
h2,
   color: #000;
+
h3,
 +
h4,
 +
h5,
 +
h6 {
 +
   font-weight: 300;
 +
   line-height: 150%;
 
}
 
}
  
img {
+
i.fa {
   border: 0;
+
   color: #333;
  max-width: 100%;
+
 
}
 
}
  
#wrapper {
+
*,
  display: block;
+
*:before,
  width: 750px;
+
*:after {
   margin: 0 auto;
+
   box-sizing: border-box;
   padding-top: 30px;
+
   -moz-box-sizing: border-box;
   padding-bottom: 45px;
+
   -webkit-box-sizing: border-box;
 
}
 
}
 +
/*clearfixes*/
  
.rightAlign {
+
.cf:before,
   float: right;
+
.cf:after {
 +
   content: " ";
 +
  display: table;
 
}
 
}
  
.leftAlign {
+
.cf:after {
   float: left;
+
   clear: both;
 
}
 
}
  
.animateBlock {
+
.main-container {
   margin-top: 20px;
+
   background: #fff;
   display: inline-block;
+
   max-width: 1000px;
  opacity: 0;
+
   margin: 25px 25px auto;
   filter: alpha(opacity=0);
+
 
   position: relative;
 
   position: relative;
  -webkit-transition: all .55s ease-in;
 
  -moz-transition: all .55s ease-in;
 
  -ms-transition: all .55s ease-in;
 
  -o-transition: all .55s ease-in;
 
  transition: all .55s ease-in;
 
 
}
 
}
  
.animateBlock.left {
+
.container {
   left: -20%;
+
   position: relative;
 +
  padding: 25px;
 
}
 
}
  
.animateBlock.right {
+
.container:last-of-type {
   right: -20%;
+
   padding-top: 0px;
 
}
 
}
 +
/*animation element*/
  
.left.animated {
+
.animation-element {
   left: 0%;
+
   position: relative;
   opacity: 1;
+
  width: 30%;
   filter: alpha(opacity=100);
+
   margin: 0% 1.33 2.66% 1.33%;
 +
   float: left;
 
}
 
}
 +
/*3 grid layout*/
  
.right.animated {
+
.animation-element:nth-of-type(3n-2) {
   right: 0%;
+
  width: 31.5%;
 +
  margin: 0% 1.375% 2.75% 0%;
 +
  clear: left;
 +
}
 +
 
 +
.animation-element:nth-of-type(3n-1) {
 +
   width: 31.5%;
 +
  margin: 0% 1.375% 2.75% 1.375%;
 +
}
 +
 
 +
.animation-element:nth-of-type(3n-0) {
 +
  width: 31.5%;
 +
  margin: 0% 0% 2.75% 1.375%;
 +
  clear: right;
 +
}
 +
/*bounce up animation for the subject*/
 +
 
 +
.bounce-up .subject {
 +
  opacity: 0;
 +
  -moz-transition: all 700ms ease-out;
 +
  -webkit-transition: all 700ms ease-out;
 +
  -o-transition: all 700ms ease-out;
 +
  transition: all 700ms ease-out;
 +
  -moz-transform: translate3d(0px, 200px, 0px);
 +
  -webkit-transform: translate3d(0px, 200px, 0px);
 +
  -o-transform: translate(0px, 200px);
 +
  -ms-transform: translate(0px, 200px);
 +
  transform: translate3d(0px, 200, 0px);
 +
  -webkit-backface-visibility: hidden;
 +
  -moz-backface-visibility: hidden;
 +
  backface-visibility: hidden;
 +
}
 +
 
 +
.bounce-up.in-view .subject {
 
   opacity: 1;
 
   opacity: 1;
   filter: alpha(opacity=100);
+
   -moz-transform: translate3d(0px, 0px, 0px);
 +
  -webkit-transform: translate3d(0px, 0px, 0px);
 +
  -o-transform: translate(0px, 0px);
 +
  -ms-transform: translate(0px, 0px);
 +
  transform: translate3d(0px, 0px, 0px);
 +
}
 +
 
 +
.subject {
 +
  float: left;
 +
  width: 100%;
 +
  margin: 0% 1.33% 2.66% 1.33%;
 +
  background: #F5F5F5;
 +
  padding: 15px;
 +
  box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.2);
 +
  border: solid 1px #EAEAEA;
 +
}
 +
 
 +
.subject:hover,
 +
.subject:active {
 +
  box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.25);
 +
}
 +
 
 +
.subject .header {
 +
  margin: 8px 0px;
 +
}
 +
 
 +
.subject .header .date,
 +
.subject .header .category {
 +
  margin: 0px;
 +
  clear: none;
 +
  width: 50%;
 +
}
 +
 
 +
.subject .header .date i,
 +
.subject .header .category i {
 +
  margin-right: 5px;
 +
  color: #333;
 +
  -moz-transition: all 400ms linear;
 +
  -webkit-transition: all 400ms linear;
 +
  -o-transition: all 400ms linear;
 +
  transition: all 400ms linear;
 +
}
 +
 
 +
.subject .header .date {
 +
  float: left;
 +
  text-align: left;
 +
}
 +
 
 +
.subject .header .category {
 +
  float: right;
 +
  text-align: right;
 +
}
 +
/*subject icon at top*/
 +
 
 +
.subject .icon {
 +
  position: absolute;
 +
  top: -20px;
 +
  left: 50%;
 +
  left: calc(50% - 20px);
 
}
 
}
  
#Txt {
+
.subject .icon i {
   width: 300px;
+
   width: 40px;
   padding-left: 15px;
+
   height: 40px;
   padding-top: 12px;
+
  color: rgb(255, 255, 255);
 +
  font-size: 150%;
 +
   border-radius: 50%;
 
   text-align: center;
 
   text-align: center;
 +
  padding: 7px;
 
}
 
}
 +
/*Category color / icon color*/
  
.clearfix:after {
+
.subject .category-color {
   content: ".";
+
   height: 7px;
   display: block;
+
   position: absolute;
   clear: both;
+
   top: 0px;
   visibility: hidden;
+
   left: 0px;
   line-height: 0;
+
   width: 100%;
  height: 0;
+
 
}
 
}
  
.clearfix {
+
.subject.design .category-color,
   display: inline-block;
+
.subject.design .icon i {
 +
   background: #c0392b;
 
}
 
}
  
html[xmlns] .clearfix {
+
.subject.development .category-color,
   display: block;
+
.subject.development .icon i {
 +
   background: #16a085;
 
}
 
}
  
* html .clearfix {
+
.subject.photography .category-color,
   height: 1%;
+
.subject.photography .icon i {
 +
   background: #2980b9;
 
}
 
}
 +
/*hovering over subject*/
  
 +
.subject.development:hover .header i {
 +
  color: #16a085;
 +
}
 +
 +
.subject.design:hover .header i {
 +
  color: #c0392b;
 +
}
 +
 +
.subject.photography:hover .header i {
 +
  color: #2980b9;
 +
}
 +
 +
.subject .title {
 +
  margin: 12px 0px;
 +
  border-bottom: dashed 1px #ccc;
 +
  padding-bottom: 10px;
 +
}
 +
 +
.subject .content {
 +
  margin-bottom: 8px;
 +
}
 +
 +
.subject .enrole {
 +
  position: relative;
 +
  color: #333;
 +
  padding: 5px 12px;
 +
  cursor: pointer;
 +
  float: right;
 +
  display: inline-block;
 +
  border: solid 1px #ccc;
 +
  -moz-transition: all 400ms linear;
 +
  -webkit-transition: all 400ms linear;
 +
  -o-transition: all 400ms linear;
 +
  transition: all 400ms linear;
 +
}
 +
 +
.subject .enrole:hover,
 +
.subject .enrole:active {
 +
  background: #222;
 +
  color: #fff;
 +
}
 +
/*media queries for small devices*/
 +
 +
@media screen and (max-width: 678px) {
 +
  .main-container {
 +
    margin: 20px 15px;
 +
  }
 +
  .animation-element,
 +
  .animation-element:nth-of-type(3n-1),
 +
  .animation-element:nth-of-type(3n-2),
 +
  .animation-element:nth-of-type(3n-0) {
 +
    width: 100%;
 +
    margin: 0px 0px 30px 0px;
 +
  }
 +
  .subject .header .date,
 +
  .subject .header .category {
 +
    width: 100%;
 +
    margin-bottom: 10px;
 +
    text-align: center;
 +
  }
 +
}
 
</style>
 
</style>
  
Line 146: Line 319:
 
<body>
 
<body>
  
<div id="wrapper">
+
 
  <img src="http://placehold.it/750x300" />
+
<br>
  <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed faucibus, augue ac maximus auctor, dui elit ornare libero, at maximus sem mauris lacinia eros. Pellentesque turpis dolor, aliquet eu eros vitae, congue volutpat orci. Nullam vel vulputate
+
</br>
    odio. Sed vestibulum felis vel convallis consequat. Cras a lacinia ante.
+
<br>
  </p>
+
</br>
  <div class="notAnimated animateBlock leftAlign left">
+
<br>
    <img src="http://placehold.it/382x152" alt="apple devices">
+
</br>
 +
<br>
 +
</br>
 +
<br>
 +
</br>
 +
<br>
 +
</br>
 +
<br>
 +
</br>
 +
<br>
 +
</br>
 +
<br>
 +
</br>
 +
<br>
 +
</br>
 +
<br>
 +
</br>
 +
<br>
 +
</br>
 +
<br>
 +
</br>
 +
<br>
 +
</br>
 +
<br>
 +
</br>
 +
<br>
 +
</br>
 +
<br>
 +
</br>
 +
<br>
 +
</br>
 +
 
 +
 
 +
 
 +
 
 +
<div class="main-container">
 +
  <div class="container">
 +
    <h1>Fade up from the bottom</h1>
 +
    <p>This animation will focus on fade in and up an element when it comes into the focus of the viewer. </p>
 
   </div>
 
   </div>
   <div id="Txt" class="notAnimated animateBlock rightAlign right">
+
   <div class="container">
     <h3>Lorem ipsum</h3>
+
    <h2>
     <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed faucibus, augue ac maximus auctor, dui elit ornare libero, at maximus sem mauris lacinia eros. Pellentesque turpis dolor, aliquet eu eros vitae, congue volutpat orci. Nullam vel vulputate
+
Course and Subjects <i class="fa fa-comment"></i></h2>
      odio. Sed vestibulum felis vel convallis consequat. Cras a lacinia ante.
+
     <p>Here are our latest subjects that we are currently offering</p>
    </p>
+
     <p>We supply a wide range of topics, including development, design, photography and everything in-between</p>
 
   </div>
 
   </div>
   <div class="notAnimated animateBlock right">
+
   <div class="container cf">
     <img src="http://placehold.it/750x400" alt="white iphone flat ui">
+
     <!-- Course 1 -->
 +
    <div class="animation-element bounce-up cf">
 +
      <div class="subject development">
 +
        <div class="category-color"></div>
 +
        <div class="icon"><i class="fa fa-cogs"></i></div>
 +
        <div class="header cf">
 +
          <h4 class="date"><i class="fa fa-calendar-o"></i> April, 2015</h4>
 +
          <h4 class="category"><i class="fa fa-folder-o"></i> Development</h4>
 +
        </div>
 +
        <h3 class="title">Fundamentals of C++ Development</h3>
 +
        <div class="content">An introductory class on C++. This course will outline the basic elements required to understand development...</div>
 +
        <div class="enrole">Enrole</div>
 +
      </div>
 +
    </div>
 +
    <!-- Course 2 -->
 +
    <div class="animation-element bounce-up cf">
 +
      <div class="subject design">
 +
        <div class="category-color"></div>
 +
        <div class="icon"><i class="fa fa-pencil"></i></div>
 +
        <div class="header cf">
 +
          <h4 class="date"><i class="fa fa-calendar-o"></i> April, 2015</h4>
 +
          <h4 class="category"><i class="fa fa-folder-o"></i> Design</h4>
 +
        </div>
 +
        <h3 class="title">Introduction to design </h3>
 +
        <div class="content">Learn the basics of design and how to adapt them to your wordflow. This course covers an outline of Photoshop and...</div>
 +
        <div class="enrole">Enrole</div>
 +
      </div>
 +
    </div>
 +
    <!-- Course 3 -->
 +
    <div class="animation-element bounce-up">
 +
      <div class="subject photography">
 +
        <div class="category-color"></div>
 +
        <div class="icon"><i class="fa fa-camera"></i></div>
 +
        <div class="header cf">
 +
          <h4 class="date"><i class="fa fa-calendar-o"></i> May, 2015</h4>
 +
          <h4 class="category"><i class="fa fa-folder-o"></i> Photography</h4>
 +
        </div>
 +
        <h3 class="title">Macro Photography Essentials </h3>
 +
        <div class="content">This topic will contain all of the neseccary elements you will need to dive head first into taking stunning macro photography...</div>
 +
        <div class="enrole">Enrole</div>
 +
      </div>
 +
    </div>
 +
    <!-- Course 4 -->
 +
    <div class="animation-element bounce-up cf">
 +
      <div class="subject design">
 +
        <div class="category-color"></div>
 +
        <div class="icon"><i class="fa fa-pencil"></i></div>
 +
        <div class="header cf">
 +
          <h4 class="date"><i class="fa fa-calendar-o"></i> June, 2015</h4>
 +
          <h4 class="category"><i class="fa fa-folder-o"></i> Design</h4>
 +
        </div>
 +
        <h3 class="title">Designing for the web</h3>
 +
        <div class="content">In this course we will look into specific design techniques and adapt them for use on the web. This will include...</div>
 +
        <div class="enrole">Enrole</div>
 +
      </div>
 +
    </div>
 +
    <!-- Course 5 -->
 +
    <div class="animation-element bounce-up cf">
 +
      <div class="subject development">
 +
        <div class="category-color"></div>
 +
        <div class="icon"><i class="fa fa-cogs"></i></div>
 +
        <div class="header cf">
 +
          <h4 class="date"><i class="fa fa-calendar-o"></i> June, 2015</h4>
 +
          <h4 class="category"><i class="fa fa-folder-o"></i> Development</h4>
 +
        </div>
 +
        <h3 class="title">Objective C# and iOS Development</h3>
 +
        <div class="content">Thoughout this topic you will learn how to build responsive, fast and simple iOS apps. This topic is for an inermetidate...</div>
 +
        <div class="enrole">Enrole</div>
 +
      </div>
 +
    </div>
 +
    <!-- Course 6 -->
 +
    <div class="animation-element bounce-up cf">
 +
      <div class="subject development">
 +
        <div class="category-color"></div>
 +
        <div class="icon"><i class="fa fa-cogs"></i></div>
 +
        <div class="header cf">
 +
          <h4 class="date"><i class="fa fa-calendar-o"></i> June, 2015</h4>
 +
          <h4 class="category"><i class="fa fa-folder-o"></i> Development</h4>
 +
        </div>
 +
        <h3 class="title">Javascript and jQuery</h3>
 +
        <div class="content">The modern web is moving more and more towards dynamic interfaces. In this course you will learn how to use JavaScript and jQuery...</div>
 +
        <div class="enrole">Enrole</div>
 +
      </div>
 +
    </div>
 +
    <!-- Course 7 -->
 +
    <div class="animation-element bounce-up">
 +
      <div class="subject photography">
 +
        <div class="category-color"></div>
 +
        <div class="icon"><i class="fa fa-camera"></i></div>
 +
        <div class="header cf">
 +
          <h4 class="date"><i class="fa fa-calendar-o"></i> July, 2015</h4>
 +
          <h4 class="category"><i class="fa fa-folder-o"></i> Photography</h4>
 +
        </div>
 +
        <h3 class="title">Street Photography for beginners</h3>
 +
        <div class="content">Learn about the techniques and tools you can implement to improve your street photography. Including element such as shutter speed and ...</div>
 +
        <div class="enrole">Enrole</div>
 +
      </div>
 +
    </div>
 
   </div>
 
   </div>
</div>
 
<!-- wrapper -->
 
  
 
</body>
 
</body>

Revision as of 06:07, 26 October 2017






































Fade up from the bottom

This animation will focus on fade in and up an element when it comes into the focus of the viewer.

Course and Subjects

Here are our latest subjects that we are currently offering

We supply a wide range of topics, including development, design, photography and everything in-between

April, 2015

Development

Fundamentals of C++ Development

An introductory class on C++. This course will outline the basic elements required to understand development...
Enrole

April, 2015

Design

Introduction to design

Learn the basics of design and how to adapt them to your wordflow. This course covers an outline of Photoshop and...
Enrole

May, 2015

Photography

Macro Photography Essentials

This topic will contain all of the neseccary elements you will need to dive head first into taking stunning macro photography...
Enrole

June, 2015

Design

Designing for the web

In this course we will look into specific design techniques and adapt them for use on the web. This will include...
Enrole

June, 2015

Development

Objective C# and iOS Development

Thoughout this topic you will learn how to build responsive, fast and simple iOS apps. This topic is for an inermetidate...
Enrole

June, 2015

Development

Javascript and jQuery

The modern web is moving more and more towards dynamic interfaces. In this course you will learn how to use JavaScript and jQuery...
Enrole

July, 2015

Photography

Street Photography for beginners

Learn about the techniques and tools you can implement to improve your street photography. Including element such as shutter speed and ...
Enrole