Skip to content

Instantly share code, notes, and snippets.

View sabiertas's full-sized avatar

Angel Julian Mena sabiertas

View GitHub Profile
@sabiertas
sabiertas / windpress-bricks-fix.php
Last active April 4, 2026 15:41
WindPress + Bricks Builder: Fix cache scan 500 error caused by corrupted _cssGlobalClasses in database
<?php
/**
* WindPress + Bricks Builder: Fix cache scan 500 error
*
* Diagnoses and fixes corrupted _cssGlobalClasses fields
* in Bricks Builder post meta that cause WindPress cache generation to fail.
*
* IMPORTANT: Only fixes _cssGlobalClasses (should be array).
* NEVER touch _cssClasses — it's a string by design in Bricks.
*
@sabiertas
sabiertas / Paleta de colores de Tailwind
Created March 15, 2024 10:35
Paleta de colores del core de Tailwind CSS para importar en Bricks Builder
{
"id": "37ff8d",
"name": "Tailwind",
"colors": [
{
"hex": "#f8fafc",
"id": "f8fafc",
"name": "Slate 50"
},
{
@sabiertas
sabiertas / Tailwind Advanced Themer
Created March 15, 2024 10:33
Archivo para importar variables de tailwinde de flowtituide en Advanced Themer
{
"Font size":[
"text-xs",
"text-sm",
"text-base",
"text-lg",
"text-xl",
"text-2xl",
"text-3xl",
"text-4xl",
@sabiertas
sabiertas / main.css
Created March 15, 2024 10:32
Main CSS para Yabe SIul y Flowtitude
/* Fluid font size variables, for browsers that support clamp */
@supports (font-size: clamp(1rem, 1vw, 1rem)) {
:root {
--ft-text-xs: clamp(0.69rem, calc(-0.087vw + 0.7096rem), 0.64rem );
--ft-text-sm: clamp(0.83rem, calc(-0.0522vw + 0.8417rem), 0.8rem );
--ft-text-base: clamp(1rem, calc(0vw + 1rem), 1rem );
--ft-text-lg: clamp(1.2rem, calc(0.087vw + 1.1804rem), 1.25rem );
--ft-text-xl: clamp(1.44rem, calc(0.2087vw + 1.393rem), 1.56rem );
--ft-text-2xl: clamp(1.73rem, calc(0.3826vw + 1.6439rem), 1.95rem );
--ft-text-3xl: clamp(2.07rem, calc(0.6435vw + 1.9252rem), 2.44rem );
@sabiertas
sabiertas / preset.js
Created March 15, 2024 10:04
Configuración de Yabe SIUL de Flowtitude
/**
* @type {import('lodash').merge}
*/
const _merge = require('lodash.merge');
/**
* The Tailwind CSS configuration required by the SIUL plugin.
*
* @type {import('tailwindcss').Config}
*/
let siul = {};
.content-grid {
display: grid !important;
min-width: 100%;
grid-template-columns: [full-start] 1fr [wide-start] 8rem [content-start] 80rem [content-end] 8rem [wide-end] 1fr [full-end];
}
@media screen and (max-width: 1000px) {
.content-grid {
grid-template-columns: 1rem 1fr 1rem;
grid-template-areas:
function cssVars({ addUtilities, theme }) {
function extractVars(obj, group = '', prefix) {
return Object.keys(obj).reduce((vars, key) => {
const value = obj[key];
key = key.replaceAll('.', '_').replaceAll('/', '__');
const cssVariable = key === "DEFAULT" ? `--${prefix}${group}` : `--${prefix}${group}-${key}`;
const newVars =
typeof value === 'string'
@sabiertas
sabiertas / fiddle_493421.php
Created July 27, 2023 21:01 — forked from Njengah/fiddle_493421.php
Php color palette shade generator
<?php
class ColorPalette{
public $color;
public function __construct($color){
$this->color = $color;
}
public function color_mod($hex, $diff) {
$rgb = str_split(trim($hex, '# '), 2);
/* Eliminar precio de rich snippets de productos WooCommerce */
add_filter( 'woocommerce_structured_data_product_offer', 'sa_product_delete_meta_price' );
function sa_product_delete_meta_price( $product = null ) {
if ( ! is_object( $product ) ) {
global $product;
}
if ( ! is_a( $product, 'WC_Product' ) ) {
return;
}