Add a 'featured this week'-theme and calendar

This commit is contained in:
Pieter Vander Vennet 2021-10-17 03:35:13 +02:00
parent 7566a6d046
commit 35cdb49b4d
9 changed files with 207 additions and 63 deletions

29
test.ts
View file

@ -1,26 +1,5 @@
import MinimapImplementation from "./UI/Base/MinimapImplementation";
import Minimap from "./UI/Base/Minimap";
import ShowOverlayLayer from "./UI/ShowDataLayer/ShowOverlayLayer";
import TilesourceConfig from "./Models/ThemeConfig/TilesourceConfig";
import Loc from "./Models/Loc";
import {UIEventSource} from "./Logic/UIEventSource";
import FeaturedMessage from "./UI/BigComponents/FeaturedMessage";
import Combine from "./UI/Base/Combine";
MinimapImplementation.initialize()
const map = Minimap.createMiniMap({
location: new UIEventSource<Loc>({
zoom: 19,
lat: 51.51896,
lon: -0.11267
})
})
map.SetStyle("height: 50rem")
map.AttachTo("maindiv")
new ShowOverlayLayer(new TilesourceConfig({
"source": "https://tiles.osmuk.org/PropertyBoundaries/{z}/{x}/{y}.png",
"isOverlay": true,
minZoom: 18,
maxZoom: 20
}), map)
new FeaturedMessage().AttachTo("maindiv")
new Combine(FeaturedMessage.WelcomeMessages().map(wm => FeaturedMessage.CreateFeaturedBox(wm))).AttachTo("extradiv")