From: Bastian Dehn Date: Fri, 10 Jun 2022 19:50:05 +0000 (+0200) Subject: add: export style for title X-Git-Tag: v1.0^2~5^2~2 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=80a3c1ec43b7c74b8a857a75039587fc4f31b956;p=speisekarten-editor.git add: export style for title --- diff --git a/src/app/html-export.service.ts b/src/app/html-export.service.ts index ea821ab..30dde62 100644 --- a/src/app/html-export.service.ts +++ b/src/app/html-export.service.ts @@ -22,6 +22,9 @@ export class HtmlExportService html += ''; html += ''; html += 'Speisekarte'; + html += ''; html += ''; html += ''; html += this.createHtmlTitles(foodcard.Titles); @@ -34,6 +37,23 @@ export class HtmlExportService return observ; } + private createHtmlStyle(): string + { + let stylestring = "" + stylestring += '@import url("https://fonts.googleapis.com/css?family=Tangerine");'; + stylestring += '@font-face { font-family: "Tangerine"; }'; + stylestring += 'h1 { font-family: "Tangerine", serif;'; + stylestring += 'text-align: center; font-size: 2.5em;'; + stylestring += 'margin: 1em 0; }'; + stylestring += 'body { max-width: 60em; margin: 0 auto; }'; + + stylestring += '@media only screen and (min-width: 46.875em) {'; + stylestring += 'h1 { text-align: left; }'; + stylestring += '}'; + + return stylestring; + } + private createHtmlTitles(titles: ITitle[]): string { let titlestring = "";