refactor: consolidate to Word templates only - remove A4 designer, visual builder, manual JSON, AI generation
This commit is contained in:
@@ -16,7 +16,7 @@ document.querySelectorAll('.nav-link').forEach(link => {
|
||||
// Load data for page
|
||||
if (page === 'dashboard') loadDashboard();
|
||||
if (page === 'candidates') loadCandidates();
|
||||
if (page === 'templates') loadTemplates();
|
||||
if (page === 'templates') loadCarboneTemplates();
|
||||
if (page === 'requirements') loadRequirements();
|
||||
if (page === 'generated') loadGeneratedCVs();
|
||||
if (page === 'chat') loadChat();
|
||||
|
||||
@@ -5,15 +5,15 @@ const CARBONE_API = window.location.protocol + '//' + window.location.hostname +
|
||||
// ============================================================
|
||||
// NAVIGATION
|
||||
// ============================================================
|
||||
// Load carbone data when the page is shown via a MutationObserver
|
||||
// Load carbone templates when the templates page is shown
|
||||
const carboneNavObserver = new MutationObserver(() => {
|
||||
if (document.getElementById('page-carbone') && document.getElementById('page-carbone').classList.contains('active')) {
|
||||
if (document.getElementById('page-templates') && document.getElementById('page-templates').classList.contains('active')) {
|
||||
loadCarboneTemplates();
|
||||
}
|
||||
});
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const carbonePage = document.getElementById('page-carbone');
|
||||
if (carbonePage) carboneNavObserver.observe(carbonePage, { attributes: true, attributeFilter: ['class'] });
|
||||
const templatesPage = document.getElementById('page-templates');
|
||||
if (templatesPage) carboneNavObserver.observe(templatesPage, { attributes: true, attributeFilter: ['class'] });
|
||||
});
|
||||
|
||||
// ============================================================
|
||||
|
||||
@@ -5,10 +5,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>CV Application</title>
|
||||
<link rel="stylesheet" href="/static/style.css">
|
||||
<link rel="stylesheet" href="/static/builder.css">
|
||||
<link rel="stylesheet" href="/static/designer.css">
|
||||
<link rel="stylesheet" href="/static/gridstack.min.css">
|
||||
<script src="/static/gridstack-all.js"></script>
|
||||
<link rel="stylesheet" href="/static/carbone.js">
|
||||
</head>
|
||||
<body>
|
||||
<div class="app">
|
||||
@@ -23,7 +20,6 @@
|
||||
<li><a href="#" class="nav-link" data-page="candidates">Candidates</a></li>
|
||||
<li><a href="#" class="nav-link" data-page="upload">Upload CV</a></li>
|
||||
<li><a href="#" class="nav-link" data-page="templates">Templates</a></li>
|
||||
<li><a href="#" class="nav-link" data-page="carbone">Word Templates</a></li>
|
||||
<li><a href="#" class="nav-link" data-page="requirements">Requirements</a></li>
|
||||
<li><a href="#" class="nav-link" data-page="generated">Generated CVs</a></li>
|
||||
<li><a href="#" class="nav-link" data-page="chat">AI Chat</a></li>
|
||||
@@ -65,21 +61,9 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- TEMPLATES -->
|
||||
<!-- TEMPLATES (Word/Carbone only) -->
|
||||
<div id="page-templates" class="page">
|
||||
<h2 style="margin-bottom:20px">CV Templates</h2>
|
||||
<div class="flex mb-16 gap-8">
|
||||
<button class="btn" onclick="showDesigner()">+ A4 Designer</button>
|
||||
<button class="btn btn-outline" onclick="showBuilder()">+ Visual Builder</button>
|
||||
<button class="btn btn-outline" onclick="showTemplateModal()">+ Manual (JSON)</button>
|
||||
<button class="btn btn-outline" onclick="showTemplateGenModal()">Generate with AI</button>
|
||||
</div>
|
||||
<div id="templates-list"></div>
|
||||
</div>
|
||||
|
||||
<!-- CARBONE WORD TEMPLATES -->
|
||||
<div id="page-carbone" class="page">
|
||||
<h2 style="margin-bottom:20px">Word Templates (Carbone)</h2>
|
||||
<div class="card mb-16">
|
||||
<div class="card-header"><span class="card-title">How It Works</span></div>
|
||||
<div class="text-sm text-muted">
|
||||
@@ -109,6 +93,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- REQUIREMENTS -->
|
||||
<div id="page-requirements" class="page">
|
||||
<h2 style="margin-bottom:20px">Requirement Requests</h2>
|
||||
<div class="flex mb-16 gap-8">
|
||||
@@ -143,8 +128,6 @@
|
||||
<div class="modal-overlay" id="modal-overlay"></div>
|
||||
|
||||
<script src="/static/app.js"></script>
|
||||
<script src="/static/builder.js"></script>
|
||||
<script src="/static/designer.js"></script>
|
||||
<script src="/static/carbone.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user