Moved to Giraffe View Engine
This commit is contained in:
24
Entities/Floorplan_Decorations/View.fs
Normal file
24
Entities/Floorplan_Decorations/View.fs
Normal file
@@ -0,0 +1,24 @@
|
||||
module DredgePos.Entities.Floorplan_Decorations.View
|
||||
|
||||
open Giraffe.ViewEngine
|
||||
open DredgePos.Global.View
|
||||
|
||||
let decoratorItem (imageName, imageUrl) =
|
||||
let image = attr "data-image"
|
||||
div [_class "decoratorItem"; image imageUrl] [
|
||||
a [_style $"background-image:url('/images/decorations/{imageUrl}')"] []
|
||||
a [] [str imageName]
|
||||
]
|
||||
|
||||
let decoratorRow decoratorItems = div [_class "decoratorRow"] [yield! decoratorItems]
|
||||
|
||||
let decorator (decorationRows: XmlNode[]) =
|
||||
div [_id "decorator"] [
|
||||
div [_id "decoratorHeader"] [
|
||||
h2 [] [lang "choose_decoration"]
|
||||
a [_class "posButton hideDecorator"] [str "×"]
|
||||
]
|
||||
div [_id "decoratorContent"] [
|
||||
yield! decorationRows
|
||||
]
|
||||
]
|
||||
Reference in New Issue
Block a user