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
.error { | |
position: relative; | |
z-index: 1; | |
padding: 10px; | |
border-radius: 10px; | |
color: white; | |
width: 235px; | |
text-align: center; | |
font-size: 12px; | |
background: RGB(194, 46, 79); |
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 changeFormUI(form) { | |
// deshabilitar el actual comportamiento | |
form.addEventListener('invalid', function(event) { | |
event.preventDefault(); | |
}, true); | |
// Support Safari and Android browser | |
form.addEventListener('submit', function(event) { | |
if (!this.checkValidity()) { | |
event.preventDefault(); |
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
// deshabilitar el actual comportamiento | |
form.addEventListener('invalid', function(event) { | |
event.preventDefault(); | |
}, true); | |
// Support Safari and Android browser | |
form.addEventListener('submit', function(event) { | |
if (!this.checkValidity()) { | |
event.preventDefault(); | |
} |
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 button = form.querySelector('button'); | |
// Añadir nuevo comportamineto | |
button.addEventListener('click', function() { | |
var label, | |
error, | |
invalid = form.querySelectorAll(':invalid'), | |
allErrors = document.querySelectorAll('.error'); | |
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 forms = document.querySelectorAll('form'); | |
for (i = 0; i < forms.length; i++) { | |
changeFormUI(forms[i]); | |
} |
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
# Retreive all wifi network | |
alias listWifiSSID='defaults read /Library/Preferences/SystemConfiguration/com.apple.airport.preferences |grep SSIDString' | |
# Get the password for that pamater | |
getWifiPasswordFor(){ security find-generic-password -wa $1} | |
> security find-generic-password -h | |
Usage: find-generic-password [-a account] [-s service] [options...] [-g] [keychain...] | |
-a Match "account" string | |
-c Match "creator" (four-character code) |
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
//-LayoutCAT.jade | |
<!DOCTYPE html> | |
html(lang="en") | |
head | |
meta(charset="UTF-8") | |
meta(name="description", content="Contenido") | |
meta(name="keywords", content="Contenido") | |
meta(name="viewport", content="width=device-width, initial-scale=1") | |
link(rel="stylesheet", href="public/css/main.css") | |
script(src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js") |
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 pictures = [{src:'{{firstUrl}}',caption: "{{first}}" }, {src:'{{secondUrl}}',caption: '{{second}}'}, | |
{src:'{{thirdUrl}}',caption: '{{third}}'}, {src:'{{fourthUrl}}',caption: '{{fourth}}'}] | |
//- Slick Slider | |
script(id="slickTemp", type="text/html") | |
.slider | |
each val in pictures | |
figure | |
img(src=val.src, alt=val.caption) | |
figcaption= val.caption |
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
//- index.jade | |
extends ./includes/layout.jade | |
block title | |
title Ergos | |
block content | |
section.sliderContainer | |
section.content | |
block append scripts | |
script(src="public/js/slick.min.js") |
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
//mainCAT.js | |
$(document).ready(function() { | |
'use strict'; | |
$.get('partials/partials.html', function(data) { | |
var $partials = $('<div />').html(data); // Englobamos data con un div para poder buscar cada template por #id | |
var $navbar = $partials.find('#navbarTemp').html(); | |
var $footer = $partials.find('#footerTemp').html(); | |
$.getJSON('json/index.json', function(dataJson) { |
OlderNewer