Empecé desarrollando aplicaciones web, hasta que di el salto a la docencia.
Actualmente soy Asesor Técnico Docente en el servicio TIC de la D.G de Infraestructuras y Servicios de la Consejería de Educación, Juventud y Deporte de la Comunidad de Madrid.
Además colaboro como formador especializado en tecnologías de desarrollo.
Hackathon Lovers http://hackathonlovers.com: un grupo creado para emprendedores y desarrolladores amantes de los hackathones.
Password Manager Generator http://pasmangen.github.io: un gestor de contraseñas online.
MarkdownSlides https://github.com/asanzdiego/markdownslides: un script para crear slides a partir de ficheros MD.
Mi nick: asanzdiego
Less es un pre-procesador de CSS.
Añade características como variables, mixins, funciones, etc.
El CSS es así más fácil de mantener, personalizable y extensible.
Sass tiene una sintaxis parecida a CSS.
Es el preprocesador que usa Bootstrap 4.0.
sudo apt-get install ruby-full
Windows: http://rubyinstaller.org/
Mac: incluido
sudo gem install sass
sass --watch input.scss:output.css
sass --watch input/dir:output/dir
$font-stack: Helvetica, sans-serif;
$primary-color: #333;
body {
font: 100% $font-stack;
color: $primary-color;
}
body {
font: 100% Helvetica, sans-serif;
color: #333;
}
$content: "First content";
$content: "Second content?" !default;
$new_content: "First time reference" !default;
#main {
content: $content;
new-content: $new_content;
}
#main {
content: "First content";
new-content: "First time reference";
}
$var: red;
#page {
$var: white;
#header {
color: $var; // white
}
}
nav {
ul {
margin: 0;
padding: 0;
list-style: none;
}
li { display: inline-block; }
}
nav ul {
margin: 0;
padding: 0;
list-style: none;
}
nav li {
display: inline-block;
}
_partial.scss
html, body, ul {
margin: 0;
padding: 0;
}
@import 'reset';
body {
font: 100% Helvetica, sans-serif;
background-color: #efefef;
}
html, body, ul, ol {
margin: 0;
padding: 0;
}
body {
font: 100% Helvetica, sans-serif;
background-color: #efefef;
}
a {
font-weight: bold;
text-decoration: none;
&:hover { text-decoration: underline; }
body.firefox & { font-weight: normal; }
}
a {
font-weight: bold;
text-decoration: none;
}
a:hover { text-decoration: underline; }
body.firefox a { font-weight: normal; }
@mixin border-radius($radius) {
-webkit-border-radius: $radius;
-moz-border-radius: $radius;
-ms-border-radius: $radius;
border-radius: $radius;
}
.box {
@include border-radius(10px);
}
.box {
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
-ms-border-radius: 10px;
border-radius: 10px;
}
@mixin box-shadow($shadows...) {
-moz-box-shadow: $shadows;
-webkit-box-shadow: $shadows;
box-shadow: $shadows;
}
.shadows {
@include box-shadow(0px 4px 5px #666, 2px 6px 10px #999);
}
.shadows {
-moz-box-shadow: 0px 4px 5px #666, 2px 6px 10px #999;
-webkit-box-shadow: 0px 4px 5px #666, 2px 6px 10px #999;
box-shadow: 0px 4px 5px #666, 2px 6px 10px #999;
}
@mixin apply-to-ie6-only {
* html {
@content;
}
}
@include apply-to-ie6-only {
#logo {
background-image: url(/logo.gif);
}
}
* html #logo {
background-image: url(/logo.gif);
}
$position: left;
@mixin car($brand, $color) {
.coche.#{$brand} {
border-#{$position}: 2px;
background-color: $color;
background-image: url('img/#{$brand}-#{$color}.png');
}
}
@include car('audi', 'green');
.coche.audi {
border-left: 2px;
background-color: green;
background-image: url('img/audi-green.png');
}
.message {
color: #333;
}
.success {
@extend .message;
border-color: green;
}
.error {
@extend .message;
border-color: red;
}
.message, .success, .error, .warning {
color: #333;
}
.success {
border-color: green;
}
.error {
border-color: red;
}
article[role="main"] {
float: left;
width: 600px / 960px * 100%;
}
aside[role="complementary"] {
float: right;
width: 300px / 960px * 100%;
}
article[role="main"] {
float: left;
width: 62.5%;
}
aside[role="complementary"] {
float: right;
width: 31.25%;
}
$base: #f04615;
$list: 200, 500, 1200;
.class {
width: nth($list, 3);
color: darken($base, 5%);
background-color:
lighten($base, 25%);
}
.class {
width: 1200;
color: #f6430f;
background-color: #f8a58d;
}
$grid-width: 40px;
$gutter-width: 10px;
@function grid-width($n) {
@return $n * $grid-width + ($n - 1) * $gutter-width;
}
#sidebar { width: grid-width(5); }
#sidebar {
width: 240px;
}
$animal: cat;
p {
@if 1+1 == 2 { border: 2px solid black; }
@if $animal == cat { color: white; }
}
p {
border: 2px solid black;
color: white;
}
@for $i from 1 to 4 {
.item-#{$i} { width: 2em * $i; }
}
.item-1 { width: 2em; }
.item-2 { width: 4em; }
.item-3 { width: 6em; }
@each $animal in puma, tiger, salamander {
.#{$animal}-icon {
background-image: url('/images/#{$animal}.png');
}
}
.puma-icon {
background-image: url('/images/puma.png'); }
.tiger-icon {
background-image: url('/images/tiger.png'); }
.salamander-icon {
background-image: url('/images/salamander.png'); }
$i: 6;
@while $i > 0 {
.item-#{$i} { width: 2em * $i; }
$i: $i - 2;
}
.item-6 { width: 12em; }
.item-4 { width: 8em; }
.item-2 { width: 4em; }
@debug 10em + 12em;
Line 1 DEBUG: 22em