Skip to content

Instantly share code, notes, and snippets.

@axxe16
axxe16 / js.js
Created January 30, 2020 11:10
animare le ancore #ancore #anchor #animation #animate #js
$(".scroll").click(function(event){
var offset = 40; //offset rispetto a posizione dell'ancora
//prevent the default action for the click event
event.preventDefault();
//get the full url - like mysitecom/index.htm#home
var full_url = this.href;
//split the url by # and get the anchor target name - home in mysitecom/index.htm#home
var parts = full_url.split("#");
@axxe16
axxe16 / style.scss
Last active January 31, 2020 13:47
respond under above media query scss #scss #css #mediaQuery #responsive
// A map of breakpoints.
$breakpoints: (xs: 576px,
sm: 768px,
md: 992px,
lg: 1200px);
// Respond above.
@mixin respond-above($breakpoint) {
// If the breakpoint exists in the map.
@axxe16
axxe16 / get_author_by_genre($id_autore)
Created March 13, 2020 10:01
ACF - restituisce lista autori in base a genere letterario #wp_query #query #custom post #taxonomy #custom taxonomy #acf
<?php
//restituisce lista autori in base a genere letterario
//dato id autore recupero genere e stampo lista escluso autore corrente
function get_author_by_genre($id_autore) {
$generi = get_field('genere_letterario', get_queried_object());
$args = array(
'hide_empty' => false,
'orderby' => 'name',
'order' => 'ASC',
@axxe16
axxe16 / function_woo
Created April 17, 2020 06:18
Aggiungi una voce al pannello riservato utente woocommerce #woocommerce #privato #reserved #tab
/**
* @snippet WooCommerce Add New Tab @ My Account
* @how-to Get CustomizeWoo.com FREE
* @author Rodolfo Melogli
* @compatible WooCommerce 3.5.7
* @donate $9 https://businessbloomer.com/bloomer-armada/
*/
// ------------------
// 1. Register new endpoint to use for My Account page
@axxe16
axxe16 / 01_template_base.html
Last active April 22, 2020 13:19
Bootstrap Template base #FCSBTBASE #L001
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Starter Template Bootstrap</title>
<!-- Bootstrap CSS -->
</head>
<body>
@axxe16
axxe16 / 02_template_base_cdn.html
Created April 22, 2020 13:17
Bootstrap Template base Inclusione via CDN #FCSBTBASE #L002
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Starter Template Bootstrap</title>
<!-- Bootstrap CSS -->
<link type="text/css" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" rel="stylesheet">
<link type="text/css" href="style.processed.css" rel="stylesheet">
</head>
@axxe16
axxe16 / containers.html
Created April 22, 2020 16:03
bootstrap4 containers #snippetLessons
<div class="container">
<!-- Content here -->
</div>
<div class="container-fluid">
...
</div>
@axxe16
axxe16 / breakpoints.css
Last active April 22, 2020 16:22
Breakpoints in bootstrap 4 #FCSBTBASE #snippetLessons
// Dispositivi di dimensioni molto piccole (inferiori a 576px)
// vengono usati gli stili di default di Bootstrap
// Piccoli dispositivi (landscape, 576px e superiori)
@media (min-width: 576px) { ... }
// Medi dispositivi (tablet, 768px e superiori
@media (min-width: 768px) { ... }
//dispositivi grandi (schermi desktops, 992px e superiori)
@axxe16
axxe16 / mixin.scss
Last active April 25, 2020 15:32
Raccolta @mixin #scss #mixin
@mixin border-radius($radius) {
border-radius: $radius;
-webkit-border-radius: $radius;
-moz-border-radius: $radius;
}
@mixin transition($property, $duration, $easing: linear) {
transition: $property $duration $easing;
-webkit-transition: $property $duration $easing;
-moz-transition: $property $duration $easing;
@axxe16
axxe16 / griglia01.html
Created April 23, 2020 20:57
Griglia sample 01 #FCSBTBASE #L003
<main role="main" class="container">
<div class="row">
<div class="col">1</div>
<div class="col">2</div>
<div class="col">3</div>
<div class="col">4</div>
</div>
<div class="row">
<div class="col">1</div>
<div class="col">2</div>