This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 1. USING A FUNCTION | |
* notes: this is not the best solution for | |
* large applications, because your constructor | |
* functions are global objects and could accidentally | |
* be overwritten. | |
*/ | |
// create a Class Apple | |
function Apple(type){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@function strip-unit($num) { | |
@return $num / ($num * 0 + 1); | |
} | |
@mixin rem-fallback($property, $values...) { | |
$max: length($values); | |
$pxValues: ''; | |
$remValues: ''; | |
@for $i from 1 through $max { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="col-md-7"> | |
<% for(var i=0; i<posts.results.length; i++) { %> | |
<div class="blog-post"> | |
<div class="row"> | |
<div class="col-md-1" > | |
<div class="date"> <%= posts.results[i].getDate("blog.date") %></div> | |
<li> <img src="../../img/icons/facebook.png" alt="" class="blog-icon"></li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
exports.Configuration = { | |
apiEndpoint: 'https://trinet.prismic.io/api', | |
// -- Links resolution rules | |
linkResolver: function(ctx, doc) { | |
if (doc.isBroken) return false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="main" id="postDetail"> | |
<article> | |
<%- post.getHtml("blog.body", ctx) %> | |
</article> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* === Responsive Breakpoint Values === */ | |
// XL Breakpoint: 1025px - 1200px; (desktop and up) | |
// L Breakpoint: 769px - 1024px; (tablet landscape) | |
// M Breakpoint: 706px - 768px; (tablet portrait) | |
// S Breakpoint: 481px - 705px; (mobile landscape) | |
// XS Breakpoint: 320px - 480px; (mobile portrait) | |
/* === LESS variables === */ | |
@mq-desktop : 1025px; | |
@mq-tablet-landscape : 769px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* === Responsive Breakpoint Values === */ | |
// XL Breakpoint: 1025px - 1200px; (desktop and up) | |
// L Breakpoint: 769px - 1024px; (tablet landscape) | |
// M Breakpoint: 706px - 768px; (tablet portrait) | |
// S Breakpoint: 481px - 705px; (mobile landscape) | |
// XS Breakpoint: 320px - 480px; (mobile portrait) | |
/* === SASS variables === */ | |
$mq-desktop : 1025px; | |
$mq-tablet-landscape : 769px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="slogan"> | |
<h1>Developing Interactive User Interfaces</h1> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This script wrapped in a Immediately-Invoked Function Expression (IIFE) to | |
* prevent variables from leaking onto the global scope. For more information | |
* on IIFE visit the link below. | |
* @see http://en.wikipedia.org/wiki/Immediately-invoked_function_expression | |
*/ | |
(function() { | |
'use strict'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var selected = null, // Object of the element to be moved | |
x_pos = 0, y_pos = 0, // Stores x & y coordinates of the mouse pointer | |
x_elem = 0, y_elem = 0; // Stores top, left values (edge) of the element | |
// Will be called when user starts dragging an element | |
function _drag_init(elem) { | |
// Store the object of the element which needs to be moved | |
selected = elem; | |
x_elem = x_pos - selected.offsetLeft; | |
y_elem = y_pos - selected.offsetTop; |
OlderNewer