Необходимо внедрить в шаблон генерации отчета чтобы вместо е текста zavodaso.ru, стояла…
- User
Необходимо внедрить в шаблон генерации отчета чтобы вместо е текста zavodaso.ru, стояла переменная, которая брала данные из файла results_custom.js и массива updateData[0].description. Вот код генерации отчета:
<!-- Основное содержимое --> <main class="main-content"> <div class="mx-auto max-w-screen-2xl p-4 md:p-6 2xl:p-10"> <h1 class="mb-10">SEO-аудит сайта zavodaso.ru</h1> <div class="metrics"> <div class="metrics__card"> <h4 class="font-bold text-xl mb-1"> <%= totalTechnicalErrors %> </h4> <span class="text-sm font-medium text-slate-600">технических ошибок</span> </div> <div class="metrics__card"> <h4 class="font-bold text-xl mb-1"> <%= totalSeoErrors %> </h4> <span class="text-sm font-medium text-slate-600">SEO-ошибок</span> </div> </div> <!-- Дата создания и проведения отчета --> <div class="report-date"> <p>Дата создания отчета: <strong><%= reportDate %></strong></p> </div> <!-- Панель управления: Поиск и Фильтрация --> <div class="control-panel"> <div class="search-container"> <input type="text" id="searchInput" placeholder="Поиск по задачам..." onkeyup="filterTasks()"> </div> <div class="filter-container"> <span>Критичность:</span> <label> <input type="checkbox" class="criticality-checkbox" value="high" onchange="filterTasks()"> Высокая </label> <label> <input type="checkbox" class="criticality-checkbox" value="medium" onchange="filterTasks()"> Средняя </label> <label> <input type="checkbox" class="criticality-checkbox" value="low" onchange="filterTasks()"> Низкая </label> </div> <div class="reset-container" id="resetContainer" style="display: none;"> <a onclick="resetFilters()">Сбросить фильтры</a> </div> </div> <% auditSections.forEach(function(section, sectionIndex) { %> <div class="audit-section" id="section-<%= sectionIndex %>"> <h2><%= section.section %></h2> <% section.subsections.forEach(function(subsection, subsectionIndex) { %> <div class="audit-subsection" id="section-<%= sectionIndex %>_subsection-<%= subsectionIndex %>"> <h3><%= subsection.title %></h3> <% subsection.tasks.forEach(function(task, taskIndex) { %> <div class="audit-task" data-error-count="<%= task.errorCount || 0 %>" data-criticality="<%= task.criticality %>" data-original-order="<%= taskIndex %>"> <div class="audit-header"> <div style="display: flex; align-items: center; cursor: pointer;" onclick="toggleDetails('desc_<%= sectionIndex %>_<%= subsectionIndex %>_<%= taskIndex %>')"> <%= task.description %> <% if(task.customErrorText) { %> <span class="error-count error-<%= task.errorBackgroundColor %>"> <%= task.customErrorText %> </span> <% } else { %> <span class="error-count <%= task.errorCountClass %>"><%= task.errorCount %></span> <% } %> </div> <div style="display: flex; align-items: center;"> <% if(task.showCriticality) { %> <span class="criticality <%= task.criticalityClass %>" onclick="toggleCriticality(event, 'criticality_<%= sectionIndex %>_<%= subsectionIndex %>_<%= taskIndex %>')">Критичность: <%= task.criticality %></span> <% } %> <span id="arrow_<%= sectionIndex %>_<%= subsectionIndex %>_<%= taskIndex %>" class="arrow">▼</span> </div> </div> <div id="desc_<%= sectionIndex %>_<%= subsectionIndex %>_<%= taskIndex %>" class="audit-details"> <% if(task.showDetails){ %> <p><%= task.details %></p> <% } %> <% if(task.showWhoCanFix){ %> <p><strong>Кто может исправить:</strong> <%= task.whoCanFix %></p> <% } %> <% if(task.showHowToFix){ %> <p><strong>Как исправить:</strong></p> <ul> <% task.howToFix.forEach(function(fix) { %> <li><%= fix %></li> <% }) %> </ul> <% } %> <% if (task.hasTable || task.fileType === '.html' ) { %> <% if (task.fileType === '.xlsx' ) { %> <a href="<%= task.reportUrl %>" target="_blank" class="results-button">Результаты</a> <span class="report-path">➔ Документ отчёта в папке <strong>"tables/html"</strong></span> <% } else if (task.fileType === '.html' ) { %> <a href="<%= task.reportUrl %>" target="_blank" class="results-button">Результаты</a> <span class="report-path">➔ Документ отчёта в папке <strong>"tables/html"</strong></span> <% } %> <% } %> </div> </div> <% }) %> </div> <% }) %> </div> <% }) %> </div> </main> <script src="./dist/scripts.js"></script> - Assistant