Elm project showing an image directory structure.
Include it in your project with the following command
elm install babsballetschool/image-directory
Import it in your source file with
import ImageDirectory
Retrieve from somewhere a JSON file like
{
"type": "directory",
"contents": [
{ "type": "file", "location":"http://via.placeholder.com/20x20"},
{ "type": "file", "location":"http://via.placeholder.com/20x30"},
{ "type": "directory", "contents": [{ "type": "file", "location":"http://via.placeholder.com/30x20"}] }
]
}
And decode it with ImageDirectory.decoder
to obtain a ImageDirectory.Entry
.
It can be viewed ImageDirectory.view
.