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="profile"> | |
<div | |
class="profile-image" | |
style="background: url('/images/<%= person.imgSrc %>') top center no-repeat; background-size: cover;" | |
></div> | |
<div class="profile-details"> | |
<h1 class="profile-name"> | |
<%- person.firstname %> <%- person.lastname %> | |
</h1> |
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
import Assets from 'assets-manager'; | |
Assets.addQueue('general', appData.assets.general) | |
Assets.addQueue('intro', appData.assets.intro) | |
Assets.addQueue('projects', appData.assets.projects) | |
// No layout.js, chamamos: | |
Assets.start('general'); | |
// No intro.js, chamamos: |
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
{ | |
'general': [ | |
'path/to/file.jpg', | |
'path/to/file2.jpg' | |
'path/to/file3.jpg' | |
], | |
'intro': [ | |
'path/to/file.jpg', | |
'path/to/file2.jpg' | |
'path/to/file3.jpg' |
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 to disable "pull-to-refresh" effect present in some webviews. | |
// Especially Crosswalk 12 and above (Chromium 41+) runtimes. | |
window.addEventListener('load', function() { | |
var lastTouchY = 0 ; | |
var maybePreventPullToRefresh = false ; | |
// Pull-to-refresh will only trigger if the scroll begins when the | |
// document's Y offset is zero. |
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
_get_images: (data, imgs=[])-> | |
for prop, val of data | |
if /(jpg|png|gif)$/.test(data[prop]) | |
imgs.push data[prop] | |
if Array.isArray(data[prop]) | |
for c in data[prop] | |
@_get_images c, imgs | |
return imgs |
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
letter_spacing($spacing) | |
letter-spacing: unit($spacing/1000, 'em'); | |
font_size($size, $leading) | |
font-size $size | |
if $leading | |
line-height: unit(100 * ($leading / $size), "%") |
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
module.exports = function(jObj) { | |
var obj; | |
obj = { | |
_y: 1000, | |
_x: 1000, | |
_opacity: 0, | |
dom: jObj | |
}; | |
Object.defineProperty(obj, "y", { | |
get: function() { |
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
@mixin get-sprite($imgs, $name, $resize : false) | |
{ | |
$dimensions: true !default; | |
$clean-up: true !default; | |
$layout:vertical !default; | |
$map: sprite-map($imgs, $layout: $layout, $cleanup: $clean-up, $spacing: 15px); | |
background: $map no-repeat; | |
@include sprite($map, $name, $dimensions, 0, 0); |
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
--- | |
layout: none | |
permalink: .htaccess | |
--- | |
# Apache configuration file | |
# httpd.apache.org/docs/2.2/mod/quickreference.html | |
# Note .htaccess files are an overhead, this logic should be in your Apache config if possible | |
# httpd.apache.org/docs/2.2/howto/htaccess.html |
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 namespace(name) | |
{ | |
var namespaces = name.split("."); | |
var name = ""; | |
function getName(parent) | |
{ | |
if(namespaces.length > 0) | |
{ | |
name = namespaces.shift(); |
NewerOlder