This library provides a way to create responsive mosaic layouts with a modal in Elm applications using elm-ui.
Representation of an image in the mosaic.
Size of a picture.
Message type for the module.
Display a mosaic with the given list of pictures.
Modal type for opening pictures.
Keyboard key type for navigation.
Initialize a new Mosaic with the given display configuration and list of pictures.
Define subscriptions for the keyboard events.
Update the Mosaic model based on the received message.
type Msg
= MosaicMsg Mosaic.Msg
| (...)
update : Msg -> Model -> ( Model, Cmd Msg )
update msg model =
case msg of
MosaicMsg subMsg ->
( { model | mosaic = Mosaic.update subMsg model.mosaic }, Cmd.none )
-- Handle other messages...Default configuration for the mosaic display.
Display a mosaic of pictures.
Display a modal with the selected picture.
inFront <| Mosaic.displayModal model.mosaic
Update the screen size in the Mosaic model.
Take the fullscreen size of the mosaic.
Configuration for the display of the mosaic.