common css

This commit is contained in:
string 2025-05-14 11:07:51 +05:30
parent c919a718e9
commit 8f27b9b92a
3 changed files with 3249 additions and 89 deletions

View File

@ -399,13 +399,13 @@ HTML Only. No CSS.
await Promise.all(htmlGenerationTasks); await Promise.all(htmlGenerationTasks);
// ✅ Now save the newly generated pages only // ✅ Now save the newly generated pages only
const fileMap: Record<string, string> = {}; const fileMap: Record<string, string> = {};
for (const pageName of this.missingHtmlPages) { for (const pageName of this.missingHtmlPages) {
const html = this.pageSections[pageName].FullPage?.toString() || ''; const html = this.pageSections[pageName].FullPage?.toString() || '';
fileMap[pageName] = html; fileMap[pageName] = html;
} }
if (Object.keys(fileMap).length > 0) { if (Object.keys(fileMap).length > 0) {
this.siteTreeService.createHtmlfile(this.sitename, fileMap).subscribe({ this.siteTreeService.createHtmlfile(this.sitename, fileMap).subscribe({
next: (res) => { next: (res) => {
this.toastr.success(`Saved ${Object.keys(fileMap).length} new HTML files`); this.toastr.success(`Saved ${Object.keys(fileMap).length} new HTML files`);
@ -415,7 +415,7 @@ if (Object.keys(fileMap).length > 0) {
console.error('❌ Error saving html:', err); console.error('❌ Error saving html:', err);
} }
}); });
} }
} }
// Process page sections // Process page sections
@ -519,7 +519,7 @@ if (Object.keys(fileMap).length > 0) {
link.download = `${pageName}.html`; link.download = `${pageName}.html`;
link.click(); link.click();
window.URL.revokeObjectURL(url); window.URL.revokeObjectURL(url);
} }
// Upload HTML files // Upload HTML files
uploadHtmlFiles(projId: number) { uploadHtmlFiles(projId: number) {
const pageHtmlMap: Record<string, string> = {}; const pageHtmlMap: Record<string, string> = {};