loader image

planificador

Planificación DJAOS /* Variables de Diseño DJAOS */ :root { –navy-primary: #0f172a; /* Slate 900 */ –gold-accent: #f59e0b; /* Amber 500 */ –bg-light: #f1f5f9; /* Slate 100 */ } body { font-family: ‘Inter’, sans-serif; background-color: var(–bg-light); color: #1f2937; } .card-shadow { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); } .fade-in { animation: fadeIn 0.3s ease-in-out; } @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } } /* — ESTILOS BLINDADOS (¡IMPORTANT!) — */ /* Botón Principal */ #app-container button.btn-primary, body .btn-primary, #app-container a.btn-primary { background-color: #0f172a !important; color: #ffffff !important; border: 2px solid #0f172a !important; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important; font-weight: 700 !important; text-transform: uppercase !important; letter-spacing: 0.05em !important; transition: all 0.2s ease !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; text-decoration: none !important; } #app-container button.btn-primary:hover, body .btn-primary:hover, #app-container a.btn-primary:hover { background-color: #1e293b !important; color: #f59e0b !important; border-color: #f59e0b !important; transform: translateY(-2px); } /* Botón Secundario */ #app-container button.btn-secondary, body .btn-secondary { background-color: #ffffff !important; color: #0f172a !important; border: 2px solid #cbd5e1 !important; font-weight: 600 !important; text-transform: uppercase !important; } #app-container button.btn-secondary:hover, body .btn-secondary:hover { border-color: #f59e0b !important; color: #f59e0b !important; } /* Botón Fantasma */ #app-container button.btn-ghost, body .btn-ghost { background-color: transparent !important; color: #64748b !important; border: none !important; font-weight: 600 !important; } #app-container button.btn-ghost:hover, body .btn-ghost:hover { color: #0f172a !important; background-color: #e2e8f0 !important; } /* Inputs de tabla */ input.schedule-input { border: none; background: transparent; width: 100%; height: 100%; padding: 8px; outline: none; font-size: 0.85rem; } input.schedule-input:focus { background-color: #fffbeb; box-shadow: inset 0 0 0 2px #f59e0b; } /* — OPTIMIZACIÓN DE IMPRESIÓN (PDF) — */ @media print { header, footer, .no-print, button, .btn-ghost, .btn-primary, .btn-secondary, a { display: none !important; } @page { margin: 0.5cm; size: A4 portrait; } body { background-color: white !important; color: black !important; font-size: 10px !important; -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; } .bg-slate-900, .bg-[#0f172a] { background-color: #0f172a !important; color: white !important; } .bg-slate-50 { background-color: #f8fafc !important; } .bg-white { background-color: #ffffff !important; } .text-amber-500, .text-[#f59e0b] { color: #f59e0b !important; } .text-white { color: #ffffff !important; } /* Layout compacto para impresión */ #app-container { padding: 0 !important; margin: 0 !important; width: 100% !important; max-width: none !important; } .grid { display: block !important; } .grid > div { margin-bottom: 10px; page-break-inside: avoid; border: 1px solid #ccc !important; } /* Tabla en impresión */ table { width: 100% !important; border-collapse: collapse !important; font-size: 9px !important; table-layout: fixed !important; } th, td { border: 1px solid #ddd !important; padding: 2px 4px !important; text-align: left !important; overflow: hidden; } thead th { background-color: #0f172a !important; color: white !important; -webkit-print-color-adjust: exact; } .card-shadow { box-shadow: none !important; } /* Ajuste de altura de celdas para ahorrar espacio */ tr { height: auto !important; } }
djaOS PLANIFICACIÓN
// — Data — const questions = [ { id: 2, category: «Objetivos», title: «Pasos Pequeños», prompt: «¿Cuáles son los pasos pequeños que necesitas seguir para lograr tu objetivo?», placeholder: «Ej: Practicar 3 veces por semana, buscar tutoriales…» }, { id: 3, category: «Objetivos», title: «Hábito Diario/Semanal», prompt: «¿Qué hábito diario o semanal necesitas desarrollar para acercarte a tu meta?», placeholder: «Ej: Estudiar 30 mins diarios…» }, { id: 4, category: «Consistencia», title: «Mantener Constancia», prompt: «¿Cómo puedes mantener la constancia en tus hábitos diarios?», placeholder: «Ej: Usar un calendario, marcar los días…» }, { id: 5, category: «Visibilidad», title: «Hacerlo Visible», prompt: «¿Cómo puedes hacer que tu nuevo hábito sea imposible de ignorar?», placeholder: «Ej: Dejar el libro en el escritorio…» }, { id: 6, category: «Motivación», title: «Conexión Placentera», prompt: «¿Cómo puedes conectar este hábito con algo que te guste hacer?», placeholder: «Ej: Escuchar música mientras estudio…» }, { id: 7, category: «Facilidad», title: «Reducir Esfuerzo», prompt: «¿Cómo puedes reducir el esfuerzo necesario para cumplir con tu nuevo hábito?», placeholder: «Ej: Empezar con solo 5 minutos…» }, { id: 8, category: «Recompensa», title: «Recompensa Inmediata», prompt: «¿Qué recompensa te puedes dar cuando completes tu nuevo hábito?», placeholder: «Ej: Ver un video, tomar un snack…» }, { id: 9, category: «Plan B», title: «Días Difíciles», prompt: «¿Cómo puedes modificar el hábito si un día no puedes cumplirlo completamente?», placeholder: «Ej: Versión corta de 10 minutos…» }, { id: 10, category: «Señal», title: «Recordatorio Claro», prompt: «¿Cómo puedes crear una señal clara que te recuerde hacer el hábito?», placeholder: «Ej: Después de cenar…» }, { id: 11, category: «Entorno», title: «Diseño del Entorno», prompt: «¿Qué aspecto de tu entorno podrías cambiar para facilitar el hábito?», placeholder: «Ej: Dejar los libros a la vista…» }, { id: 12, category: «Social», title: «Apoyo Social», prompt: «¿Cómo puedes involucrar a otras personas para que te ayuden?», placeholder: «Ej: Contarle a un amigo, buscar compañero…» }, { id: 13, category: «Celebración», title: «Pequeños Logros», prompt: «¿Qué pequeño logro podrías celebrar para sentirte motivado?», placeholder: «Ej: Celebrar cada 10 páginas leídas…» }, { id: 14, category: «Mejora», title: «Evaluar y Ajustar», prompt: «¿Cómo puedes evaluar tu progreso y ajustar tu hábito para mejorarlo?», placeholder: «Ej: Revisar cada domingo…» } ]; const days = [«Lunes», «Martes», «Miércoles», «Jueves», «Viernes», «Sábado», «Domingo»]; const hours = [«16:00», «16:30», «17:00», «17:30», «18:00», «18:30», «19:00», «19:30», «20:00», «20:30», «21:00»]; // — State Management — const state = { step: 0, schedule: {}, answers: {} }; // Load data const savedData = localStorage.getItem(‘djaos_plan_data’); if (savedData) { const parsed = JSON.parse(savedData); Object.assign(state, parsed); } // — Core Functions — function init() { render(); } function saveData() { localStorage.setItem(‘djaos_plan_data’, JSON.stringify(state)); } function setStep(newStep) { state.step = newStep; render(); window.scrollTo(0, 0); } function updateSchedule(key, value) { state.schedule[key] = value; saveData(); } function updateAnswer(id, value) { state.answers[id] = value; saveData(); } // — Render Views — function render() { const container = document.getElementById(‘app-container’); const stepIndicator = document.getElementById(‘step-indicator’); // Update Header Indicator if (state.step > 0 && state.step < 6) { stepIndicator.innerHTML = `PASO ${state.step} DE 5`; } else { stepIndicator.innerHTML = »; } if (state.step === 0) container.innerHTML = getWelcomeHTML(); else if (state.step === 1) { container.innerHTML = getScheduleHTML(); bindScheduleEvents(); } else if (state.step >= 2 && state.step <= 5) { const groupIndex = state.step – 2; let currentQuestions; if(groupIndex === 0) currentQuestions = questions.slice(0, 3); else if(groupIndex === 1) currentQuestions = questions.slice(3, 6); else if(groupIndex === 2) currentQuestions = questions.slice(6, 9); else currentQuestions = questions.slice(9, 13); container.innerHTML = getQuestionsHTML(currentQuestions); bindQuestionEvents(currentQuestions); } else if (state.step === 6) container.innerHTML = getSummaryHTML(); } // — HTML Generators — function getWelcomeHTML() { return `

FASE 2: PLANIFICACIÓN

De la meta anual a las acciones diarias. Este es el mapa para tu ejecución.
Organiza tu semana y define tus hábitos.

`; } function getScheduleHTML() { let tableRows = hours.map(hour => { let cells = days.map(day => { let key = `${day}-${hour}`; let val = state.schedule[key] || »; return ` `; }).join(»); return ` ${hour} ${cells} `; }).join(»); return `
📅

Horario Semanal

Bloques de tiempo para tareas clave y descansos.

${days.map(d => ``).join(»)} ${tableRows}
Hora${d}
`; } function getQuestionsHTML(currentQuestions) { const isLast = state.step === 5; const nextAction = isLast ? ‘setStep(6)’ : `setStep(${state.step + 1})`; const nextText = isLast ? ‘VER RESUMEN FINAL’ : ‘SIGUIENTE’; const nextIcon = «; const questionsHtml = currentQuestions.map(q => `
`).join(»); return `
FASE DE REFLEXIÓN

🎯 ${currentQuestions[0].category}

${questionsHtml}
`; } function getSummaryHTML() { // FIX: Lógica de detección de actividad corregida const hasSchedule = Object.values(state.schedule).some(val => val && val.trim() !== »); // FIX: Generar filas de tabla para el resumen en lugar de tarjetas const scheduleRows = hours.map(hour => { const cells = days.map(day => { const val = state.schedule[`${day}-${hour}`] || »; return `${val}`; }).join(»); return ` ${hour} ${cells} `; }).join(»); // Generate Questions Summary const answersHtml = questions.map(q => `
${q.category}
#${q.id}

${q.title}

«${q.prompt}»

${state.answers[q.id] ? `${state.answers[q.id]}` : ‘Sin respuesta‘}
`).join(»); return `
`; } // — Event Binding — function bindScheduleEvents() { document.querySelectorAll(‘.schedule-input’).forEach(input => { input.addEventListener(‘input’, (e) => { updateSchedule(e.target.dataset.key, e.target.value); }); }); } function bindQuestionEvents(currentQuestions) { document.querySelectorAll(‘.question-input’).forEach(input => { input.addEventListener(‘input’, (e) => { updateAnswer(parseInt(e.target.dataset.qid), e.target.value); }); }); } // Initialize App init();

Scroll al inicio