Skip to content

Instantly share code, notes, and snippets.

View pablocattaneo's full-sized avatar

Pablo Cattaneo pablocattaneo

View GitHub Profile
@pablocattaneo
pablocattaneo / anchor.html
Last active September 16, 2017 00:18
Smooth Scrolling Crea una transición suave entre los links tipo ancla y el contenido linkeado Source: https://css-tricks.com/examples/SmoothPageScroll/
<a href="#three">Scroll to Section Three</a>
<h1 id="three">Section Three</h1>
@pablocattaneo
pablocattaneo / slider_vertical_thumbail.html
Last active August 29, 2015 14:18
From http://localhost/martinhogar/upload/index.php?route=sucursales/home Slider con vertical thumbnail responsive
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Thumbnail Navigator Skin 02 - Jssor Slider, Carousel, Slideshow with Javascript Source Code</title>
</head>
<body style="padding: 0; margin: 0; font-family:Arial, Verdana;background-color:#fff;">
<!-- use jssor.slider.min.js instead for release -->
<!-- jssor.slider.min.js = (jssor.js + jssor.slider.js) -->
.embed-responsive {
position: relative;
display: block;
height: 0;
padding: 0;
overflow: hidden;
}
.embed-responsive .embed-responsive-item,
.embed-responsive iframe,
.embed-responsive embed,
@pablocattaneo
pablocattaneo / hack10y11
Created April 29, 2015 19:37
Hack para ie10 y 11
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
/* codigo para ie 10 y 11 */
}
@pablocattaneo
pablocattaneo / gpl_2
Created May 7, 2015 02:32
Licencia GPL 2
/* Copyright 2015 Pablo Cattaneo (email: [email protected])
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@pablocattaneo
pablocattaneo / single-category.php
Last active September 16, 2017 00:17
If you want to create a custom template for WordPress Posts, which belong to a specific category for example you can’t just create single-catname.php. The solution to this is also not complicated at all. You need to create a function and preferably save it in your theme’s functions.php file. Here’s how to create a custom post template for a spec…
<?php
function get_custom_cat_template($single_template) {
global $post;
if ( in_category( 'category-name' )) {
$single_template = dirname( __FILE__ ) . '/single-template.php';
}
return $single_template;
}
@pablocattaneo
pablocattaneo / category_link.php
Created June 20, 2015 19:08
Devuelve el link al template que muestra todos los post de una categoría
@pablocattaneo
pablocattaneo / menuHorizontal.css
Created June 24, 2015 03:18
Crea un menu horizontal
.menuHorizontal
li
list-style none
display block
float left
text-align right // Customizer
width 20% // Customizer according count of elements
a
display block
<script>
/* Menu desplegable para mobile*/
(function($) {
$.fn.collapsable = function(options) {
// iterate and reformat each matched element
return this.each(function() {
// cache this:
var obj = $(this);
var tree = obj.next("div[class^='menu-'"); // El elemento que contenga el menú a ocultar y mostar
obj.click(function(){
@pablocattaneo
pablocattaneo / provincias_argentinas.html
Created July 2, 2015 17:46
Dropdown provincias argentinas
<select name="provincia">
<option value="Buenos Aires" selected="select" disabled="disabled">--</option>
<option value="Buenos Aires">Buenos Aires</option>
<option value="Catamarca">Catamarca</option>
<option value="Chaco">Chaco</option>
<option value="Chubut">Chubut</option>
<option value="Cordoba">Cordoba</option>
<option value="Corrientes">Corrientes</option>
<option value="Entre Rios">Entre Rios</option>
<option value="Formosa">Formosa</option>