Complete v2.0 transformation: Production-ready Flask application
Major Changes: - Migrated from prototype to production architecture - Implemented modular Flask app with models/services/web layers - Added Docker containerization with docker-compose - Switched to Pipenv for dependency management - Built advanced parser extracting 63 real activities from INDEX_MASTER - Implemented SQLite FTS5 full-text search - Created minimalist, responsive web interface - Added comprehensive documentation and deployment guides Technical Improvements: - Clean separation of concerns (models, services, web) - Enhanced database schema with FTS5 indexing - Dynamic filters populated from real data - Production-ready configuration management - Security best practices implementation - Health monitoring and API endpoints Removed Legacy Files: - Old src/ directory structure - Static requirements.txt (replaced by Pipfile) - Test and debug files - Temporary cache files Current Status: - 63 activities indexed across 8 categories - Full-text search operational - Docker deployment ready - Production documentation complete 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
196
app/templates/activity.html
Normal file
196
app/templates/activity.html
Normal file
@@ -0,0 +1,196 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}{{ activity.name }} - INDEX Sistem Jocuri{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="activity-detail-page">
|
||||
<!-- Breadcrumb navigation -->
|
||||
<nav class="breadcrumb">
|
||||
<a href="{{ url_for('main.index') }}">Căutare</a>
|
||||
<span class="breadcrumb-separator">»</span>
|
||||
<span class="breadcrumb-current">{{ activity.name }}</span>
|
||||
</nav>
|
||||
|
||||
<!-- Activity header -->
|
||||
<header class="activity-detail-header">
|
||||
<div class="activity-title-section">
|
||||
<h1 class="activity-detail-title">{{ activity.name }}</h1>
|
||||
<span class="activity-category-badge">{{ activity.category }}</span>
|
||||
</div>
|
||||
|
||||
{% if activity.subcategory %}
|
||||
<p class="activity-subcategory">{{ activity.subcategory }}</p>
|
||||
{% endif %}
|
||||
</header>
|
||||
|
||||
<!-- Activity content -->
|
||||
<div class="activity-detail-content">
|
||||
<!-- Main description -->
|
||||
<section class="activity-section">
|
||||
<h2 class="section-title">Descriere</h2>
|
||||
<div class="activity-description">{{ activity.description }}</div>
|
||||
</section>
|
||||
|
||||
<!-- Rules and variations -->
|
||||
{% if activity.rules %}
|
||||
<section class="activity-section">
|
||||
<h2 class="section-title">Reguli</h2>
|
||||
<div class="activity-rules">{{ activity.rules }}</div>
|
||||
</section>
|
||||
{% endif %}
|
||||
|
||||
{% if activity.variations %}
|
||||
<section class="activity-section">
|
||||
<h2 class="section-title">Variații</h2>
|
||||
<div class="activity-variations">{{ activity.variations }}</div>
|
||||
</section>
|
||||
{% endif %}
|
||||
|
||||
<!-- Metadata grid -->
|
||||
<section class="activity-section">
|
||||
<h2 class="section-title">Detalii activitate</h2>
|
||||
<div class="metadata-grid">
|
||||
{% if activity.get_age_range_display() != "toate vârstele" %}
|
||||
<div class="metadata-card">
|
||||
<h3 class="metadata-title">Grupa de vârstă</h3>
|
||||
<p class="metadata-value">{{ activity.get_age_range_display() }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if activity.get_participants_display() != "orice număr" %}
|
||||
<div class="metadata-card">
|
||||
<h3 class="metadata-title">Participanți</h3>
|
||||
<p class="metadata-value">{{ activity.get_participants_display() }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if activity.get_duration_display() != "durată variabilă" %}
|
||||
<div class="metadata-card">
|
||||
<h3 class="metadata-title">Durata</h3>
|
||||
<p class="metadata-value">{{ activity.get_duration_display() }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if activity.get_materials_display() != "nu specificate" %}
|
||||
<div class="metadata-card">
|
||||
<h3 class="metadata-title">Materiale necesare</h3>
|
||||
<p class="metadata-value">{{ activity.get_materials_display() }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if activity.skills_developed %}
|
||||
<div class="metadata-card">
|
||||
<h3 class="metadata-title">Competențe dezvoltate</h3>
|
||||
<p class="metadata-value">{{ activity.skills_developed }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if activity.difficulty_level %}
|
||||
<div class="metadata-card">
|
||||
<h3 class="metadata-title">Nivel dificultate</h3>
|
||||
<p class="metadata-value">{{ activity.difficulty_level }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Additional materials -->
|
||||
{% if activity.materials_list and activity.materials_list != activity.get_materials_display() %}
|
||||
<section class="activity-section">
|
||||
<h2 class="section-title">Lista detaliată materiale</h2>
|
||||
<div class="materials-list">{{ activity.materials_list }}</div>
|
||||
</section>
|
||||
{% endif %}
|
||||
|
||||
<!-- Keywords -->
|
||||
{% if activity.keywords %}
|
||||
<section class="activity-section">
|
||||
<h2 class="section-title">Cuvinte cheie</h2>
|
||||
<div class="keywords">
|
||||
{% for keyword in activity.keywords.split(',') %}
|
||||
<span class="keyword-tag">{{ keyword.strip() }}</span>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</section>
|
||||
{% endif %}
|
||||
|
||||
<!-- Source information -->
|
||||
<section class="activity-section">
|
||||
<h2 class="section-title">Informații sursă</h2>
|
||||
<div class="source-info">
|
||||
{% if activity.source_file %}
|
||||
<p><strong>Fișier sursă:</strong> {{ activity.source_file }}</p>
|
||||
{% endif %}
|
||||
|
||||
{% if activity.page_reference %}
|
||||
<p><strong>Referință:</strong> {{ activity.page_reference }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<!-- Similar activities -->
|
||||
{% if similar_activities %}
|
||||
<section class="similar-activities">
|
||||
<h2 class="section-title">Activități similare</h2>
|
||||
<div class="similar-activities-grid">
|
||||
{% for similar in similar_activities %}
|
||||
<article class="similar-activity-card">
|
||||
<h3 class="similar-activity-title">
|
||||
<a href="{{ url_for('main.activity_detail', activity_id=similar.id) }}">
|
||||
{{ similar.name }}
|
||||
</a>
|
||||
</h3>
|
||||
<p class="similar-activity-description">
|
||||
{{ similar.description[:100] }}{% if similar.description|length > 100 %}...{% endif %}
|
||||
</p>
|
||||
<div class="similar-activity-meta">
|
||||
{% if similar.get_age_range_display() != "toate vârstele" %}
|
||||
<span class="meta-item">{{ similar.get_age_range_display() }}</span>
|
||||
{% endif %}
|
||||
{% if similar.get_participants_display() != "orice număr" %}
|
||||
<span class="meta-item">{{ similar.get_participants_display() }}</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</article>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</section>
|
||||
{% endif %}
|
||||
|
||||
<!-- Action buttons -->
|
||||
<div class="activity-actions">
|
||||
<a href="javascript:history.back()" class="btn btn-secondary">
|
||||
← Înapoi la rezultate
|
||||
</a>
|
||||
<a href="{{ url_for('main.index') }}" class="btn btn-primary">
|
||||
Căutare nouă
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
<script>
|
||||
// Print functionality
|
||||
function printActivity() {
|
||||
window.print();
|
||||
}
|
||||
|
||||
// Copy link functionality
|
||||
function copyLink() {
|
||||
navigator.clipboard.writeText(window.location.href).then(function() {
|
||||
alert('Link copiat în clipboard!');
|
||||
});
|
||||
}
|
||||
|
||||
// Add print styles when printing
|
||||
window.addEventListener('beforeprint', function() {
|
||||
document.body.classList.add('printing');
|
||||
});
|
||||
|
||||
window.addEventListener('afterprint', function() {
|
||||
document.body.classList.remove('printing');
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user