Skip to content

Instantly share code, notes, and snippets.

View IgnaciodeNuevo's full-sized avatar

Kay IgnaciodeNuevo

View GitHub Profile
// Ejemplo 1 - named export: lib.js
export const sqrt = Math.sqrt;
export function square(x) {
return x * x;
}
export function diag(x, y) {
return sqrt(square(x) + square(y));
}
// Ejemplo 1 - named export: main.js
@IgnaciodeNuevo
IgnaciodeNuevo / scroll-to-top.html
Last active July 19, 2019 16:59
Scroll to top
<main class="main post" id="anchor" role="main">
Content...
</main>
<a id="topBtn" class="btn-fixed" href="#anchor">
Lleva a la parte superior de la página.
</a>
<script>
// When the user scrolls down 500px from the top of the document, show the button
@IgnaciodeNuevo
IgnaciodeNuevo / Events-organizations-and-podcasts.md
Last active December 26, 2018 19:46
Events organizations and podcasts
// Add ellipsis at the end of a line to avoid text overflow
// @author Ignacio Villanueva
// @param {String}: $width
@mixin ellipsis($width: 100%) {
max-width: $width;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
// Custom properties to Sass fallback
// @params {String}: $customProp, $renderedValue
// Sass Variables
$color-base: #000000;
$color-base-darkest: #0b0b0b;
$color-base-darker: lighten($color-base, 20);
$color-base-dark: lighten($color-base, 40);
$color-base-light: lighten($color-base, 60);
$color-base-lighter: lighten($color-base, 80);