diff options
author | Joris | 2019-05-16 09:40:02 +0200 |
---|---|---|
committer | Joris | 2019-05-16 09:40:02 +0200 |
commit | 7bf58894761742d4da8e6f52ce113ea7327e7114 (patch) | |
tree | 388785f65e258e956296977cff4bd1f7ac6e1526 /client/src/view/index | |
parent | f015a216f5ee1e335d5ae90dbc8f3efafdca6fec (diff) |
Bootstrap
Diffstat (limited to 'client/src/view/index')
-rw-r--r-- | client/src/view/index/Index.scala | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/client/src/view/index/Index.scala b/client/src/view/index/Index.scala new file mode 100644 index 0000000..29cb6ca --- /dev/null +++ b/client/src/view/index/Index.scala @@ -0,0 +1,27 @@ +package yoga.view.index + +import scala.xml.Node + +import yoga.model.Pose +import yoga.router.Router +import yoga.service.Poses + +object Index { + + def apply(): Node = + <div class="index__poses"> + {Poses.values.map(renderPose)} + </div> + + def renderPose(pose: Pose): Node = + <a class="index__poseLink" href={Router.Path.licence(pose.image)}> + <div class="index__poseName"> + {pose.name} + </div> + <div class="index__poseImageParent"> + <img class="index__poseImage" src={s"images/${pose.image}"} /> + </div> + </a> + + +} |