From 5a3fc14c1a92b28423d1b64b64e12d0502a90219 Mon Sep 17 00:00:00 2001
From: Jasper Van der Jeugt
Date: Sun, 16 Aug 2020 12:29:31 +0200
Subject: Move client to server
---
client/index.html | 51 ---------------------------------------------------
1 file changed, 51 deletions(-)
delete mode 100644 client/index.html
(limited to 'client')
diff --git a/client/index.html b/client/index.html
deleted file mode 100644
index a03d777..0000000
--- a/client/index.html
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
-
- Client
-
-
-
-
-
-
-
-
-
-
--
cgit v1.3.1
From d543ef8b1f68a23f9bc3706363fc3807ccbabf30 Mon Sep 17 00:00:00 2001
From: Jasper Van der Jeugt
Date: Sun, 16 Aug 2020 12:33:21 +0200
Subject: Room list styling
---
client/style.css | 9 +++++++++
server/lib/Uplcg/Views.hs | 19 ++++++++++---------
2 files changed, 19 insertions(+), 9 deletions(-)
(limited to 'client')
diff --git a/client/style.css b/client/style.css
index 90e6a03..3da29f8 100644
--- a/client/style.css
+++ b/client/style.css
@@ -118,6 +118,15 @@ button, input {
margin-top: 6px;
}
+.rooms {
+ max-width: 800px;
+ margin: auto;
+}
+
+.rooms ul {
+ text-align: left;
+}
+
footer {
font-size: 12px;
margin: 60px auto 60px auto;
diff --git a/server/lib/Uplcg/Views.hs b/server/lib/Uplcg/Views.hs
index 772c83b..8241158 100644
--- a/server/lib/Uplcg/Views.hs
+++ b/server/lib/Uplcg/Views.hs
@@ -31,15 +31,16 @@ template conf title body = H.docTypeHtml $ do
H.footer $ "Untitled PL Card Game version " <> H.toHtml version
rooms :: Config -> [RoomView] -> H.Html
-rooms conf rids = template conf "Untitled PL Card Game" $ do
- H.h1 "Rooms"
- H.ul $ for_ rids $ \(RoomView rid num) -> H.li $ do
- H.a H.! A.href (H.toValue $
- BaseUrl.render (cBaseUrl conf) <> "/rooms/" <> rid) $
- H.toHtml rid
- " ("
- H.toHtml num
- ")"
+rooms conf rids = template conf "Untitled PL Card Game" $
+ H.div H.! A.class_ "rooms" $ do
+ H.h1 "Rooms"
+ H.ul $ for_ rids $ \(RoomView rid num) -> H.li $ do
+ H.a H.! A.href (H.toValue $
+ BaseUrl.render (cBaseUrl conf) <> "/rooms/" <> rid) $
+ H.toHtml rid
+ " ("
+ H.toHtml num
+ ")"
client :: Config -> Text -> H.Html
client conf roomId = template conf "Untitled PL Card Game" $ do
--
cgit v1.3.1