Code Dialog beautified.
LocationBasedServices/mowesta/ng-webcomponent This commit looks good

This commit is contained in:
Adriano Markovic
2020-04-16 02:52:07 +02:00
parent e519f83287
commit 27b6e9e5a3
3 changed files with 63 additions and 35 deletions
@@ -1,20 +1,7 @@
<style>
ol li {
margin-bottom: 32px;
}
.main-content { padding-left: 10px; padding-bottom: 20px; }
.code-snippet {
background: lightgrey;
margin: 10px;
padding: 20px;
border-radius: 10px;
}
</style>
<mat-toolbar mat-dialog-title class="view-bar">
<mat-toolbar-row>
<mat-icon class="mr-sm">code</mat-icon>
<!-- <span>{{ res.strings('conditions_dialog_title') }}</span> -->
<span>Code einbetten</span>
<span>{{ res.strings('city_code_dialog_title') }}</span>
<div class="fx-auto"></div>
<button mat-icon-button
[matTooltip]="res.strings('button_close')"
@@ -27,38 +14,54 @@
<mat-dialog-content style="margin: 0;">
<div class="main-content">
<ol>
<li>Stylesheet verlinken.
<li>{{ res.strings('city_code_dialog_stylesheet') }}
<div class="fx-row code-snippet">
<code>
<<span>link</span>
href="https://www.mowesta.com/app/weather-forecast-today/weather-forecast-today.css"
rel="stylesheet">
<span class="tag">&lt;link</span>
<span class="attr"> href=</span>
<span class="attr-value">"https://www.mowesta.com/app/weather-forecast-today/weather-forecast-today.css"</span>
<span class="attr"> rel=</span>
<span class="attr-value">"stylesheet"</span>
<span class="tag">&gt;</span>
</code>
</div>
</li>
<li>Skripte einbetten.
<li>{{ res.strings('city_code_dialog_scripts') }}
<div class="fx-row code-snippet">
<code>
<<span>script</span>
src="https://www.mowesta.com/app/weather-forecast-today/weather-forecast-today-es2015.js"
type="module"><&#47;<span>script</span>>
<span class="tag">&lt;script</span>
<span class="attr"> src=</span>
<span class="attr-value">"https://www.mowesta.com/app/weather-forecast-today/weather-forecast-today-es2015.js"</span>
<span class="attr"> type=</span>
<span class="attr-value">"module"</span>
<span class="tag">&gt;&lt;&#47;script&gt;</span>
<br>
<<span>script</span>
src="https://www.mowesta.com/app/weather-forecast-today/weather-forecast-today-es5.js"
nomodule=""
defer=""><&#47;<span>script</span>>
<span class="tag">&lt;script</span>
<span class="attr"> src=</span>
<span class="attr-value">"https://www.mowesta.com/app/weather-forecast-today/weather-forecast-today-es5.js"</span>
<span class="attr"> nomodule=</span>
<span class="attr-value">""</span>
<span class="attr"> defer=</span>
<span class="attr-value">""</span>
<span class="tag">&gt;&lt;&#47;script&gt;</span>
</code>
</div>
</li>
<li>Web Component auf der Webseite einfügen. Hierbei kann für das Attribut "lang-code", entweder "de" für Deutsch oder "en" für Englisch eingesetzt werden.
<li>{{ res.strings('city_code_dialog_web_component') }}
<div class="fx-row code-snippet">
<code>
<<span>weather-forecast-today</span>
lang-code="de"
city-id="{{ data.city.id }}"
day-time="true"
no-header="false"
no-footer="false"><&#47;<span>weather-forecast-today</span>>
<span class="tag">&lt;weather-forecast-today</span>
<span class="attr"> lang-code=</span>
<span class="attr-value">"de"</span>
<span class="attr"> city-id=</span>
<span class="attr-value">"{{ data.city.id }}"</span>
<span class="attr"> day-time=</span>
<span class="attr-value">"true"</span>
<span class="attr"> no-header=</span>
<span class="attr-value">"false"</span>
<span class="attr"> no-footer=</span>
<span class="attr-value">"false"</span>
<span class="tag">&gt;&lt;&#47;weather-forecast-today&gt;</span>
</code>
</div>
</li>