- Create organized directory structure (src/, docs/, data/, static/, templates/) - Add comprehensive .gitignore for Python projects - Move Python source files to src/ - Move documentation files to docs/ with project/ and user/ subdirectories - Move database files to data/ - Update all database path references in Python code - Maintain Flask static/ and templates/ directories 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
222 lines
8.7 KiB
HTML
222 lines
8.7 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="ro">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Fișa activității: {{ activity.title }}</title>
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
|
<style>
|
|
/* Print-specific styles */
|
|
@media print {
|
|
.no-print { display: none !important; }
|
|
body { font-size: 12px; }
|
|
.sheet-container { max-width: none; margin: 0; box-shadow: none; }
|
|
}
|
|
</style>
|
|
</head>
|
|
<body class="sheet-body">
|
|
<div class="sheet-container">
|
|
<!-- Header -->
|
|
<div class="sheet-header">
|
|
<h1>🎮 FIȘA ACTIVITĂȚII</h1>
|
|
<h2>{{ activity.title }}</h2>
|
|
<div class="sheet-meta">
|
|
<span class="category-badge">{{ activity.category or 'General' }}</span>
|
|
<span class="difficulty-badge">{{ activity.difficulty or 'mediu' }}</span>
|
|
<span class="generated-date">Generată: <span class="current-date"></span></span>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Activity Info Grid -->
|
|
<div class="activity-info-grid">
|
|
<div class="info-item">
|
|
<h3>👥 Participanți</h3>
|
|
<p>{{ activity.participants or 'Nedefinit' }}</p>
|
|
</div>
|
|
|
|
<div class="info-item">
|
|
<h3>⏰ Durata</h3>
|
|
<p>{{ activity.duration or 'Nedefinit' }}</p>
|
|
</div>
|
|
|
|
<div class="info-item">
|
|
<h3>🎂 Grupa de vârstă</h3>
|
|
<p>{{ activity.age_group or 'Orice vârstă' }}</p>
|
|
</div>
|
|
|
|
<div class="info-item">
|
|
<h3>📊 Dificultate</h3>
|
|
<p>{{ activity.difficulty or 'Mediu' }}</p>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Description -->
|
|
<div class="section">
|
|
<h3>🎯 Descrierea activității</h3>
|
|
<div class="description-text">
|
|
{{ activity.description or 'Nu este disponibilă o descriere detaliată.' }}
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Materials -->
|
|
<div class="section">
|
|
<h3>🧰 Materiale necesare</h3>
|
|
<div class="materials-list">
|
|
{% if activity.materials %}
|
|
{% if 'fără' in activity.materials.lower() or 'niciuna' in activity.materials.lower() %}
|
|
<div class="no-materials">✅ <strong>Nu sunt necesare materiale</strong></div>
|
|
{% else %}
|
|
<p>{{ activity.materials }}</p>
|
|
<div class="materials-checklist">
|
|
<h4>📋 Checklist materiale:</h4>
|
|
<ul>
|
|
{% for material in activity.materials.split(',')[:5] %}
|
|
<li>☐ {{ material.strip() }}</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
{% endif %}
|
|
{% else %}
|
|
<p>Materialele nu sunt specificate în documentul sursă.</p>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Instructions (derived from source text) -->
|
|
<div class="section">
|
|
<h3>📝 Instrucțiuni pas cu pas</h3>
|
|
<div class="instructions">
|
|
{% if activity.source_text %}
|
|
{% set instructions = activity.source_text[:800].split('.') %}
|
|
<ol>
|
|
{% for instruction in instructions[:5] %}
|
|
{% if instruction.strip() and instruction.strip()|length > 10 %}
|
|
<li>{{ instruction.strip() }}{% if not instruction.endswith('.') %}.{% endif %}</li>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</ol>
|
|
{% else %}
|
|
<p><em>Consultați documentul sursă pentru instrucțiuni detaliate.</em></p>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Keywords/Tags -->
|
|
{% if activity.tags and activity.tags != '[]' %}
|
|
<div class="section">
|
|
<h3>🏷️ Cuvinte cheie</h3>
|
|
<div class="tags-container">
|
|
{% set tags_list = activity.tags | replace('[', '') | replace(']', '') | replace('"', '') | split(',') %}
|
|
{% for tag in tags_list %}
|
|
{% if tag.strip() %}
|
|
<span class="tag">{{ tag.strip() }}</span>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<!-- Recommendations -->
|
|
{% if recommendations %}
|
|
<div class="section recommendations">
|
|
<h3>💡 Activități similare recomandate</h3>
|
|
<div class="recommendations-grid">
|
|
{% for rec in recommendations %}
|
|
<div class="recommendation-item">
|
|
<h4>{{ rec.title }}</h4>
|
|
<p class="rec-details">
|
|
{% if rec.age_group %}<span>{{ rec.age_group }}</span>{% endif %}
|
|
{% if rec.duration %} • <span>{{ rec.duration }}</span>{% endif %}
|
|
</p>
|
|
<p class="rec-description">{{ rec.description[:100] }}...</p>
|
|
<a href="{{ url_for('generate_sheet', activity_id=rec.id) }}"
|
|
class="rec-link no-print">→ Vezi fișa</a>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<!-- Source Info -->
|
|
<div class="section source-info">
|
|
<h3>📁 Informații sursă</h3>
|
|
<div class="source-details">
|
|
<p><strong>Fișier:</strong> <code>{{ activity.file_path|basename }}</code></p>
|
|
<p><strong>Tip fișier:</strong> {{ activity.file_type|upper or 'Nedefinit' }}</p>
|
|
{% if activity.page_number %}
|
|
<p><strong>Pagina:</strong> {{ activity.page_number }}</p>
|
|
{% endif %}
|
|
<p><strong>ID Activitate:</strong> {{ activity.id }}</p>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Action buttons -->
|
|
<div class="sheet-actions no-print">
|
|
<button onclick="window.print()" class="btn-print">🖨️ Printează</button>
|
|
<button onclick="copyToClipboard()" class="btn-copy">📋 Copiază</button>
|
|
<button onclick="window.close()" class="btn-close">❌ Închide</button>
|
|
<a href="{{ url_for('index') }}" class="btn-back">🏠 Înapoi la căutare</a>
|
|
</div>
|
|
|
|
<!-- Footer -->
|
|
<div class="sheet-footer">
|
|
<p>
|
|
<small>
|
|
Generat automat de <strong>INDEX-SISTEM-JOCURI v1.0</strong> •
|
|
<span class="current-date"></span> •
|
|
ID: {{ activity.id }}
|
|
</small>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
// Copy sheet content to clipboard
|
|
async function copyToClipboard() {
|
|
try {
|
|
const title = document.querySelector('.sheet-header h2').textContent;
|
|
const description = document.querySelector('.description-text').textContent;
|
|
const materials = document.querySelector('.materials-list').textContent;
|
|
const participants = document.querySelector('.activity-info-grid .info-item:first-child p').textContent;
|
|
const duration = document.querySelector('.activity-info-grid .info-item:nth-child(2) p').textContent;
|
|
|
|
const content = `
|
|
FIȘA ACTIVITĂȚII: ${title}
|
|
|
|
PARTICIPANȚI: ${participants}
|
|
DURATA: ${duration}
|
|
|
|
DESCRIERE:
|
|
${description.trim()}
|
|
|
|
MATERIALE:
|
|
${materials.trim()}
|
|
|
|
---
|
|
Generat de INDEX-SISTEM-JOCURI
|
|
`;
|
|
|
|
await navigator.clipboard.writeText(content);
|
|
alert('✅ Conținutul a fost copiat în clipboard!');
|
|
} catch (err) {
|
|
console.error('Error copying to clipboard:', err);
|
|
alert('❌ Eroare la copierea în clipboard');
|
|
}
|
|
}
|
|
|
|
// Simple date formatting (since moment.js is not included)
|
|
function getCurrentDateTime() {
|
|
const now = new Date();
|
|
return now.toLocaleDateString('ro-RO') + ' ' + now.toLocaleTimeString('ro-RO', {hour: '2-digit', minute: '2-digit'});
|
|
}
|
|
|
|
// Set current date in all date elements
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
const dateElements = document.querySelectorAll('.current-date');
|
|
dateElements.forEach(el => {
|
|
el.textContent = getCurrentDateTime();
|
|
});
|
|
});
|
|
</script>
|
|
</body>
|
|
</html> |