feat(visibility): sistema de visibilidad por tipo de página

- Añadir PageVisibility use case y repositorio
- Implementar PageTypeDetector para detectar home/single/page/archive
- Actualizar FieldMappers con soporte show_on_[page_type]
- Extender FormBuilders con UI de visibilidad por página
- Refactorizar Renderers para evaluar visibilidad dinámica
- Limpiar schemas removiendo campos de visibilidad legacy
- Añadir MigrationCommand para migrar configuraciones existentes
- Implementar adsense-loader.js para carga lazy de ads
- Actualizar front-page.php con nueva estructura
- Extender DIContainer con nuevos servicios

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
FrankZamora
2025-12-03 09:16:34 -06:00
parent 7fb5eda108
commit 8735962f52
66 changed files with 2614 additions and 573 deletions

60
minify-css.php Normal file
View File

@@ -0,0 +1,60 @@
<?php
/**
* Simple CSS Minifier Script
* Run from command line: php minify-css.php
*/
function minify_css($css) {
// Remove comments
$css = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $css);
// Remove space after colons
$css = str_replace(': ', ':', $css);
// Remove whitespace
$css = str_replace(array("\r\n", "\r", "\n", "\t", ' ', ' ', ' '), '', $css);
// Remove space before and after specific characters
$css = preg_replace('/\s*([{};,>+~])\s*/', '$1', $css);
// Remove last semicolon before closing brace
$css = str_replace(';}', '}', $css);
// Trim
$css = trim($css);
return $css;
}
$files = [
'Assets/Css/css-global-accessibility.css' => 'Assets/Css/css-global-accessibility.min.css',
'Assets/Css/style.css' => 'Assets/Css/style.min.css',
];
$base_path = __DIR__ . '/';
foreach ($files as $source => $dest) {
$source_path = $base_path . $source;
$dest_path = $base_path . $dest;
if (file_exists($source_path)) {
$css = file_get_contents($source_path);
$minified = minify_css($css);
file_put_contents($dest_path, $minified);
$original_size = strlen($css);
$minified_size = strlen($minified);
$savings = $original_size - $minified_size;
$percent = round(($savings / $original_size) * 100, 1);
echo "Minified: $source\n";
echo " Original: " . number_format($original_size) . " bytes\n";
echo " Minified: " . number_format($minified_size) . " bytes\n";
echo " Savings: " . number_format($savings) . " bytes ($percent%)\n\n";
} else {
echo "File not found: $source\n";
}
}
echo "Done!\n";