]> gitweb.hhaalo.de Git - speisekarten-editor.git/commitdiff
add: subtitles html create
authorBastian Dehn <hhaalo@arcor.de>
Fri, 10 Jun 2022 19:13:03 +0000 (21:13 +0200)
committerBastian Dehn <hhaalo@arcor.de>
Fri, 10 Jun 2022 19:13:03 +0000 (21:13 +0200)
src/app/html-export.service.ts

index 8d2d2d972c20e047a7b0c50911f047f5d4c10400..ff913cf49e94b93ce19c354fc83964215e004e12 100644 (file)
@@ -33,8 +33,20 @@ export class HtmlExportService
 
                for (let i = 0; i < titles.length; i++) {
                        titlestring += '<h1>' + titles[i].Title + '</h1>';
+                       titlestring += this.createHtmlSubtitles(titles[i].Subtitles);
                }
 
                return titlestring;
        }
+
+       private createHtmlSubtitles(subtitles: ISubtitle[]): string
+       {
+               let subtitlestring = "";
+
+               for (let i = 0; i < subtitles.length; i++) {
+                       subtitlestring += '<h2>' + subtitles[i].Subtitle + '</h2>';
+               }
+
+               return subtitlestring;
+       }
 }