Elm project showing an image directory structure.
Include it in your project with the following command
elm install babsballetschool/image-directoryImport it in your source file with
import ImageDirectoryRetrieve 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.