@import java.nio.file.Path @import utils.StringUtils._ @import os._ @(context_path: String, title: String, portfolioPath: Path, rootNode: DirNode, isSlideshow: Boolean = false, modified: Boolean, environment: String) @layouts.html.index(context_path, title, portfolioPath, rootNode, isSlideshow, modified, environment) {
@for(node <- rootNode.subdirs) { @if(node.files.nonEmpty) { @node.findOne(isFile = true, random = true) match { case Some(file) => {
@prettify(node.path.last.toString)
} case None => {
@prettify(node.path.last.toString)
} } } else { @node.findOneBy(_.depth > 1, isFile = true, random = true) match { case Some(file) => {
@prettify(node.path.last.toString)
} case None => {
@prettify(node.path.last.toString) Nothing to display
} } } }
}