Skip to content

Instantly share code, notes, and snippets.

View luanpiegas's full-sized avatar
🏠
Working from home

Luan Piegas luanpiegas

🏠
Working from home
View GitHub Profile
@luanpiegas
luanpiegas / meu-css.css
Created August 19, 2021 07:30
Tutorial de como criar um plugin para WordPress - https://luan.des.br/
.whatsapp {
position: fixed;
bottom: 50px;
right: 50px;
z-index: 2;
box-sizing: border-box;
display: flex;
justify-content: center;
align-items: center;
height: 50px;
@luanpiegas
luanpiegas / CardComponent.js
Created July 27, 2021 21:10
Card.js example for WooCommerce and Cielo payment method
var debitCard = new Card({
form: '.payment_method_cielo_debit',
container: '.payment_method_cielo_debit.payment_box',
formSelectors: {
numberInput: '#cielo-card-number',
expiryInput: '#cielo-card-expiry',
cvcInput: '#cielo-card-cvc',
nameInput: '#cielo-card-holder-name'
},
formatting: false,
// Instanciando em variáveis os elementos que vou precisar usar no rodapé.
productBody = document.querySelector('body')
productImageURL = document.querySelector('.product__image').src
productNameText = document.querySelector('.productName').innerText
buyButton = document.querySelector('.product__add-to-cart')
productPriceText = document.querySelector('.skuBestPrice').innerText.split('R$ ')[1]
// Criando os elementos que compõem o rodapé
productFooter = document.createElement('footer')
productFooterContainer = document.createElement('div')
@luanpiegas
luanpiegas / nodes.json
Last active July 7, 2018 00:55
Sigma test nodes
{
"nodes": [
{
"id": "n0",
"label": "A node",
"x": 0,
"y": 0,
"size": 3
},
{
@luanpiegas
luanpiegas / shortcode.php
Last active July 21, 2016 18:26
Snippet para shortcode do Wordpress
<?php
function shortcode_mostra_produtos ( $atts ) {
$atts = shortcode_atts( array(
'default' => ''
), $atts );
$terms = get_terms('linhas');
wp_reset_query();
$args = array('post_type' => 'produtos',