Add ornament

This commit is contained in:
Pieter Vander Vennet 2021-01-09 00:03:21 +01:00
parent bd6f325fc1
commit 641b59bca5
3 changed files with 27 additions and 15 deletions

View file

@ -7,9 +7,9 @@ import Ornament from "./Ornament";
/**
* Wraps some contents into a panel that scrolls the content _under_ the title
*/
export default class ScrollableFullScreen extends UIElement{
export default class ScrollableFullScreen extends UIElement {
private _component: Combine;
constructor(title: UIElement, content: UIElement) {
super();
@ -19,16 +19,17 @@ export default class ScrollableFullScreen extends UIElement{
}).SetClass("only-on-mobile")
.SetClass("featureinfobox-back-to-the-map")
title.SetClass("featureinfobox-title")
const ornament = new Combine([new Ornament().SetStyle("height:5em;")]).SetClass("only-on-mobile")
this._component = new Combine([
new Combine([returnToTheMap, title]).SetClass("featureinfobox-titlebar"),
new Combine([content]).SetClass("featureinfobox-content"),
new Combine([ new Ornament().SetStyle("height:5em;")]).SetClass("only-on-mobile")
new Combine(["<span>",content,"</span>", ornament]).SetClass("featureinfobox-content"),
// We add an ornament which takes around 5em. This is in order to make sure the Web UI doesn't hide
])
this.SetClass("featureinfobox");
}
InnerRender(): string {
return this._component.Render();
}