html += '<meta charset="utf-8">';
html += '<meta name="viewport" content="width-device-width, initial-scale=1.0">';
html += '<title>Speisekarte</title>';
+ html += '<style type="text/css" media="screen">';
+ html += this.createHtmlStyle();
+ html += '</style>';
html += '</head>';
html += '<body>';
html += this.createHtmlTitles(foodcard.Titles);
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 = "";