COMPLETADO: Fase 1 de la migración a Clean Architecture + POO ## Estructura de Carpetas - ✓ Estructura completa de 4 capas (Domain, Application, Infrastructure, Presentation) - ✓ Carpetas de Use Cases (SaveComponent, GetComponent, DeleteComponent, SyncSchema) - ✓ Estructura de tests (Unit, Integration, E2E) - ✓ Carpetas de schemas y templates ## Composer y Autoloading - ✓ PSR-4 autoloading configurado para ROITheme namespace - ✓ Autoloader optimizado regenerado ## DI Container - ✓ DIContainer implementado con patrón Singleton - ✓ Métodos set(), get(), has() para gestión de servicios - ✓ Getters específicos para ComponentRepository, ValidationService, CacheService - ✓ Placeholders que serán implementados en Fase 5 - ✓ Prevención de clonación y deserialización ## Interfaces - ✓ ComponentRepositoryInterface (Domain) - ✓ ValidationServiceInterface (Application) - ✓ CacheServiceInterface (Application) - ✓ Component entity placeholder (Domain) ## Bootstrap - ✓ functions.php actualizado con carga de Composer autoloader - ✓ Inicialización del DIContainer - ✓ Helper function roi_container() disponible globalmente ## Tests - ✓ 10 tests unitarios para DIContainer (100% cobertura) - ✓ Total: 13 tests unitarios, 28 assertions - ✓ Suite de tests pasando correctamente ## Validación - ✓ Script de validación automatizado (48/48 checks pasados) - ✓ 100% de validaciones exitosas La arquitectura base está lista para la Fase 2. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
472 lines
7.6 KiB
CSS
472 lines
7.6 KiB
CSS
/**
|
|
* Theme Options Admin Styles
|
|
*
|
|
* @package ROI_Theme
|
|
* @since 1.0.0
|
|
*/
|
|
|
|
/* Main Container */
|
|
.roi-theme-options {
|
|
margin: 20px 20px 0 0;
|
|
}
|
|
|
|
/* Header */
|
|
.roi-options-header {
|
|
background: #fff;
|
|
border: 1px solid #c3c4c7;
|
|
padding: 20px;
|
|
margin: 20px 0;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
box-shadow: 0 1px 1px rgba(0,0,0,.04);
|
|
}
|
|
|
|
.roi-options-logo h2 {
|
|
margin: 0;
|
|
font-size: 24px;
|
|
color: #1d2327;
|
|
display: inline-block;
|
|
}
|
|
|
|
.roi-options-logo .version {
|
|
background: #2271b1;
|
|
color: #fff;
|
|
padding: 3px 8px;
|
|
border-radius: 3px;
|
|
font-size: 12px;
|
|
margin-left: 10px;
|
|
}
|
|
|
|
.roi-options-actions {
|
|
display: flex;
|
|
gap: 10px;
|
|
}
|
|
|
|
.roi-options-actions .button .dashicons {
|
|
margin-top: 3px;
|
|
margin-right: 3px;
|
|
}
|
|
|
|
/* Form */
|
|
.roi-options-form {
|
|
background: #fff;
|
|
border: 1px solid #c3c4c7;
|
|
box-shadow: 0 1px 1px rgba(0,0,0,.04);
|
|
}
|
|
|
|
/* Tabs Container */
|
|
.roi-options-container {
|
|
display: flex;
|
|
min-height: 600px;
|
|
}
|
|
|
|
/* Tabs Navigation */
|
|
.roi-tabs-nav {
|
|
width: 200px;
|
|
background: #f6f7f7;
|
|
border-right: 1px solid #c3c4c7;
|
|
}
|
|
|
|
.roi-tabs-nav ul {
|
|
margin: 0;
|
|
padding: 0;
|
|
list-style: none;
|
|
}
|
|
|
|
.roi-tabs-nav li {
|
|
margin: 0;
|
|
padding: 0;
|
|
border-bottom: 1px solid #c3c4c7;
|
|
}
|
|
|
|
.roi-tabs-nav li:first-child {
|
|
border-top: 1px solid #c3c4c7;
|
|
}
|
|
|
|
.roi-tabs-nav a {
|
|
display: block;
|
|
padding: 15px 20px;
|
|
color: #50575e;
|
|
text-decoration: none;
|
|
transition: all 0.2s;
|
|
position: relative;
|
|
}
|
|
|
|
.roi-tabs-nav a .dashicons {
|
|
margin-right: 8px;
|
|
color: #787c82;
|
|
}
|
|
|
|
.roi-tabs-nav a:hover {
|
|
background: #fff;
|
|
color: #2271b1;
|
|
}
|
|
|
|
.roi-tabs-nav a:hover .dashicons {
|
|
color: #2271b1;
|
|
}
|
|
|
|
.roi-tabs-nav li.active a {
|
|
background: #fff;
|
|
color: #2271b1;
|
|
font-weight: 600;
|
|
border-left: 3px solid #2271b1;
|
|
padding-left: 17px;
|
|
}
|
|
|
|
.roi-tabs-nav li.active a .dashicons {
|
|
color: #2271b1;
|
|
}
|
|
|
|
/* Tabs Content */
|
|
.roi-tabs-content {
|
|
flex: 1;
|
|
padding: 30px;
|
|
}
|
|
|
|
.roi-tab-pane {
|
|
display: none;
|
|
}
|
|
|
|
.roi-tab-pane.active {
|
|
display: block;
|
|
}
|
|
|
|
.roi-tab-pane h2 {
|
|
margin: 0 0 10px 0;
|
|
font-size: 23px;
|
|
font-weight: 400;
|
|
line-height: 1.3;
|
|
}
|
|
|
|
.roi-tab-pane > p.description {
|
|
margin: 0 0 20px 0;
|
|
color: #646970;
|
|
}
|
|
|
|
.roi-tab-pane h3 {
|
|
margin: 30px 0 0 0;
|
|
padding: 15px 0 10px 0;
|
|
border-top: 1px solid #dcdcde;
|
|
font-size: 18px;
|
|
}
|
|
|
|
/* Form Table */
|
|
.roi-tab-pane .form-table {
|
|
margin-top: 20px;
|
|
}
|
|
|
|
.roi-tab-pane .form-table th {
|
|
padding: 20px 10px 20px 0;
|
|
width: 200px;
|
|
}
|
|
|
|
.roi-tab-pane .form-table td {
|
|
padding: 15px 10px;
|
|
}
|
|
|
|
/* Toggle Switch */
|
|
.roi-switch {
|
|
position: relative;
|
|
display: inline-block;
|
|
width: 50px;
|
|
height: 24px;
|
|
}
|
|
|
|
.roi-switch input {
|
|
opacity: 0;
|
|
width: 0;
|
|
height: 0;
|
|
}
|
|
|
|
.roi-slider {
|
|
position: absolute;
|
|
cursor: pointer;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background-color: #ccc;
|
|
transition: .4s;
|
|
border-radius: 24px;
|
|
}
|
|
|
|
.roi-slider:before {
|
|
position: absolute;
|
|
content: "";
|
|
height: 18px;
|
|
width: 18px;
|
|
left: 3px;
|
|
bottom: 3px;
|
|
background-color: white;
|
|
transition: .4s;
|
|
border-radius: 50%;
|
|
}
|
|
|
|
input:checked + .roi-slider {
|
|
background-color: #2271b1;
|
|
}
|
|
|
|
input:focus + .roi-slider {
|
|
box-shadow: 0 0 1px #2271b1;
|
|
}
|
|
|
|
input:checked + .roi-slider:before {
|
|
transform: translateX(26px);
|
|
}
|
|
|
|
/* Image Upload */
|
|
.roi-image-upload {
|
|
max-width: 600px;
|
|
}
|
|
|
|
.roi-image-preview {
|
|
margin-bottom: 10px;
|
|
border: 1px solid #c3c4c7;
|
|
background: #f6f7f7;
|
|
padding: 10px;
|
|
min-height: 100px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.roi-image-preview:empty {
|
|
display: none;
|
|
}
|
|
|
|
.roi-preview-image {
|
|
max-width: 100%;
|
|
height: auto;
|
|
display: block;
|
|
}
|
|
|
|
.roi-upload-image,
|
|
.roi-remove-image {
|
|
margin-right: 10px;
|
|
}
|
|
|
|
/* Submit Button */
|
|
.roi-options-form .submit {
|
|
margin: 0;
|
|
padding: 20px 30px;
|
|
border-top: 1px solid #c3c4c7;
|
|
background: #f6f7f7;
|
|
}
|
|
|
|
/* Modal */
|
|
.roi-modal {
|
|
display: none;
|
|
position: fixed;
|
|
z-index: 100000;
|
|
left: 0;
|
|
top: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
overflow: auto;
|
|
background-color: rgba(0,0,0,0.5);
|
|
}
|
|
|
|
.roi-modal-content {
|
|
background-color: #fff;
|
|
margin: 10% auto;
|
|
padding: 30px;
|
|
border: 1px solid #c3c4c7;
|
|
width: 80%;
|
|
max-width: 600px;
|
|
box-shadow: 0 5px 15px rgba(0,0,0,0.3);
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.roi-modal-close {
|
|
color: #646970;
|
|
float: right;
|
|
font-size: 28px;
|
|
font-weight: bold;
|
|
line-height: 20px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.roi-modal-close:hover,
|
|
.roi-modal-close:focus {
|
|
color: #1d2327;
|
|
}
|
|
|
|
.roi-modal-content h2 {
|
|
margin-top: 0;
|
|
}
|
|
|
|
.roi-modal-content textarea {
|
|
font-family: 'Courier New', Courier, monospace;
|
|
font-size: 12px;
|
|
}
|
|
|
|
/* Notices */
|
|
.roi-notice {
|
|
padding: 12px;
|
|
margin: 20px 0;
|
|
border-left: 4px solid;
|
|
background: #fff;
|
|
box-shadow: 0 1px 1px rgba(0,0,0,.04);
|
|
}
|
|
|
|
.roi-notice.success {
|
|
border-left-color: #00a32a;
|
|
}
|
|
|
|
.roi-notice.error {
|
|
border-left-color: #d63638;
|
|
}
|
|
|
|
.roi-notice.warning {
|
|
border-left-color: #dba617;
|
|
}
|
|
|
|
.roi-notice.info {
|
|
border-left-color: #2271b1;
|
|
}
|
|
|
|
/* Code Editor */
|
|
textarea.code {
|
|
font-family: 'Courier New', Courier, monospace;
|
|
font-size: 13px;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
/* Responsive */
|
|
@media screen and (max-width: 782px) {
|
|
.roi-options-container {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.roi-tabs-nav {
|
|
width: 100%;
|
|
border-right: none;
|
|
border-bottom: 1px solid #c3c4c7;
|
|
}
|
|
|
|
.roi-tabs-nav ul {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.roi-tabs-nav li {
|
|
flex: 1;
|
|
min-width: 50%;
|
|
border-right: 1px solid #c3c4c7;
|
|
border-bottom: none;
|
|
}
|
|
|
|
.roi-tabs-nav li:first-child {
|
|
border-top: none;
|
|
}
|
|
|
|
.roi-tabs-nav a {
|
|
text-align: center;
|
|
padding: 12px 10px;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.roi-tabs-nav a .dashicons {
|
|
display: block;
|
|
margin: 0 auto 5px;
|
|
}
|
|
|
|
.roi-tabs-nav li.active a {
|
|
border-left: none;
|
|
border-bottom: 3px solid #2271b1;
|
|
padding-left: 10px;
|
|
}
|
|
|
|
.roi-tabs-content {
|
|
padding: 20px;
|
|
}
|
|
|
|
.roi-options-header {
|
|
flex-direction: column;
|
|
gap: 15px;
|
|
}
|
|
|
|
.roi-options-actions {
|
|
width: 100%;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.roi-options-actions .button {
|
|
width: 100%;
|
|
text-align: center;
|
|
}
|
|
|
|
.roi-tab-pane .form-table th {
|
|
width: auto;
|
|
padding: 15px 10px 5px 0;
|
|
display: block;
|
|
}
|
|
|
|
.roi-tab-pane .form-table td {
|
|
display: block;
|
|
padding: 5px 10px 15px 0;
|
|
}
|
|
}
|
|
|
|
/* Loading Spinner */
|
|
.roi-spinner {
|
|
display: inline-block;
|
|
width: 20px;
|
|
height: 20px;
|
|
border: 3px solid rgba(0,0,0,.1);
|
|
border-radius: 50%;
|
|
border-top-color: #2271b1;
|
|
animation: roispin 1s ease-in-out infinite;
|
|
}
|
|
|
|
@keyframes roispin {
|
|
to { transform: rotate(360deg); }
|
|
}
|
|
|
|
/* Helper Classes */
|
|
.roi-hidden {
|
|
display: none !important;
|
|
}
|
|
|
|
.roi-text-center {
|
|
text-align: center;
|
|
}
|
|
|
|
.roi-mt-20 {
|
|
margin-top: 20px;
|
|
}
|
|
|
|
.roi-mb-20 {
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
/* Color Picker */
|
|
.wp-picker-container {
|
|
display: inline-block;
|
|
}
|
|
|
|
/* Field Dependencies */
|
|
.roi-field-dependency {
|
|
opacity: 0.5;
|
|
pointer-events: none;
|
|
}
|
|
|
|
/* Success Animation */
|
|
@keyframes roisaved {
|
|
0% {
|
|
transform: scale(1);
|
|
}
|
|
50% {
|
|
transform: scale(1.05);
|
|
}
|
|
100% {
|
|
transform: scale(1);
|
|
}
|
|
}
|
|
|
|
.roi-saved {
|
|
animation: roisaved 0.3s ease-in-out;
|
|
}
|