aboutsummaryrefslogtreecommitdiff
path: root/client/src/view/index
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/view/index')
-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>
+
+
+}