Skip to content

Instantly share code, notes, and snippets.

{
"teachers": [{
"average_rating_as_student": "8.0",
"average_rating_as_teacher": "9.0",
"birthdate": "1980-03-01T00:00:00Z",
"country": null,
"created_at": "2014-02-04T10:04:48Z",
"current_city": null,
"current_timezone": "UTC",
"description": null,
@andreareginato
andreareginato / oauth-blue-button.css
Last active August 29, 2015 14:01
Blue Button CSS for AngualrJS OAuth directive
.oauth span {
text-decoration: none;
background: #239cbb;
box-sizing: border-box;
min-height: 35px;
width: auto;
display: inline-block;
padding: 0.9em 1.37em;
cursor: pointer;
color: #fff !important;
@andreareginato
andreareginato / device-directive-black.css
Last active August 29, 2015 14:02
Black Style CSS for AngualrJS Device directive
.ly-device * {
background-color: #222;
color: #eee;
}
.ly-device,
.ly-modal-window {
border: 1px solid #555;
}
@andreareginato
andreareginato / device-directive-simple-compact-template.html
Last active August 29, 2015 14:02
Simplified compact template for AngualrJS Device Directive.
<div class="ly-device">
<div class="ly-content">
<div class="ly-status">
<div class="ly-execute" ng-click="execute(status.function)">
<button class="ly-button"></button>
<div class="ly-spinner ly-animation" ng-if="device.pending">
<div class="ly-bounce-1"></div>
<div class="ly-bounce-2"></div>
<div class="ly-bounce-3"></div>
</div>
@andreareginato
andreareginato / device-directive-switch.html
Last active August 29, 2015 14:02
Light switch template
<div class="ly-switch">
<input type="checkbox" id="ly-checkbox" />
<label class="ly-slider" for="ly-checkbox" ng-click="execute(status.function)"></label>
<div class="ly-spinner ly-animation" ng-if="device.pending">
<div class="ly-bounce-1"></div>
<div class="ly-bounce-2"></div>
<div class="ly-bounce-3"></div>
</div>
</div>
input { position: absolute; left: -9999px; }
input:checked + .ly-slider::before { box-shadow: 0 0.08em 0.15em -0.1em rgba(0, 0, 0, 0.5) inset, 0 0.05em 0.08em -0.01em rgba(255, 255, 255, 0.7), 3em 0 0 0 #239cbb inset; }
input:checked + .ly-slider::after { left: 3em; }
.ly-slider { position: relative; display: block; width: 5.5em; height: 3em; cursor: pointer; border-radius: 1.5em; transition: 350ms; background: linear-gradient(rgba(0, 0, 0, 0.07), rgba(255, 255, 255, 0)), #dddddd; box-shadow: 0 0.07em 0.1em -0.1em rgba(0, 0, 0, 0.4) inset, 0 0.05em 0.08em -0.01em rgba(255, 255, 255, 0.7);}
.ly-slider::after { position: absolute; content: ''; width: 2em; height: 2em; top: 0.5em; left: 0.5em; border-radius: 50%; transition: 250ms ease-in-out; background: linear-gradient(#f5f5f5 10%, #eeeeee); box-shadow: 0 0.1em 0.15em -0.05em rgba(255, 255, 255, 0.9) inset, 0 0.2em 0.2em -0.12em rgba(0, 0, 0, 0.5); }
.ly-slider::before { position: absolute; content: ''; width: 4em; height: 1.5em; top: 0.75em; left
@andreareginato
andreareginato / device-directive-switch.css
Last active August 29, 2015 14:02
Light switch CSS for AngularJS Device Directive
.ly-switch input { position: absolute; left: -9999px; }
.ly-switch input:checked + .ly-slider::before { box-shadow: 0 0.08em 0.15em -0.1em rgba(0, 0, 0, 0.5) inset, 0 0.05em 0.08em -0.01em rgba(255, 255, 255, 0.7), 3em 0 0 0 #239cbb inset; }
.ly-switch input:checked + .ly-slider::after { left: 3em; }
.ly-switch .ly-slider { position: relative; display: block; width: 5.5em; height: 3em; cursor: pointer; border-radius: 1.5em; transition: 350ms; background: linear-gradient(rgba(0, 0, 0, 0.07), rgba(255, 255, 255, 0)), #dddddd; box-shadow: 0 0.07em 0.1em -0.1em rgba(0, 0, 0, 0.4) inset, 0 0.05em 0.08em -0.01em rgba(255, 255, 255, 0.7);}
.ly-switch .ly-slider::after { position: absolute; content: ''; width: 2em; height: 2em; top: 0.5em; left: 0.5em; border-radius: 50%; transition: 250ms ease-in-out; background: linear-gradient(#f5f5f5 10%, #eeeeee); box-shadow: 0 0.1em 0.15em -0.05em rgba(255, 255, 255, 0.9) inset, 0 0.2em 0.2em -0.12em rgba(0, 0, 0, 0.5); }
.ly-switch .ly-slider::before { position: absolute; cont
@andreareginato
andreareginato / Gruntfile.js
Last active August 29, 2015 14:02
Excerpt of Grunt file needed to concat CSS and JS files
// Reads HTML for usemin blocks to enable smart builds that automatically
// concat, minify and revision files. Creates configurations in memory so
// additional tasks can operate on them
useminPrepare: {
html: '<%= yeoman.app %>/index.html',
options: {
dest: '<%= yeoman.dist %>',
flow: {
html: {
steps: {
<div ng-app="type-directive" style="width:360px;">
<lelylan-type type-template="https://s3.amazonaws.com/lelylan/directives/type/templates/default.html" type-id="1"></lelylan-type>
</div>
<link rel="stylesheet" href="https://s3.amazonaws.com/lelylan/directives/type/type-directive-ng-embed.css">
<script src="https://s3.amazonaws.com/lelylan/directives/type/type-directive-ng-embed.js"></script>
<script>
angular.module('type-directive', ['lelylan.directives.type']);
</script>
@andreareginato
andreareginato / index.html
Created August 8, 2014 12:22
Embed index.html
<!-- build:js({.tmp,app}) type-directive-ng-embed.js -->
<script src="bower_components/angular/angular.js"></script>
<script src="bower_components/angular-animate/angular-animate.js"></script>
<script src="bower_components/angular-touch/angular-touch.js"></script>
<script src="bower_components/base64/base64.js"></script>
<script src="bower_components/ngstorage/ngStorage.js"></script>
<script src="bower_components/oauth-ng/dist/oauth-ng.js"></script>
<script src="bower_components/lelylan-ng/dist/lelylan-ng.js"></script>
<script src="bower_components/moment/moment.js"></script>
<script src="bower_components/angular-moment/angular-moment.js"></script>