aboutsummaryrefslogtreecommitdiff
path: root/client/src/view/index/Index.scala
diff options
context:
space:
mode:
authorJoris2019-05-16 09:40:02 +0200
committerJoris2019-05-16 09:40:02 +0200
commit7bf58894761742d4da8e6f52ce113ea7327e7114 (patch)
tree388785f65e258e956296977cff4bd1f7ac6e1526 /client/src/view/index/Index.scala
parentf015a216f5ee1e335d5ae90dbc8f3efafdca6fec (diff)
downloadyoga-7bf58894761742d4da8e6f52ce113ea7327e7114.tar.gz
yoga-7bf58894761742d4da8e6f52ce113ea7327e7114.tar.bz2
yoga-7bf58894761742d4da8e6f52ce113ea7327e7114.zip
Bootstrap
Diffstat (limited to 'client/src/view/index/Index.scala')
-rw-r--r--client/src/view/index/Index.scala27
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>
+
+
+}