Skip to content

Commit 8fd127a

Browse files
committed
Improve the UI
1 parent af5a65d commit 8fd127a

File tree

5 files changed

+42
-123
lines changed

5 files changed

+42
-123
lines changed

assets/css/app.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/* This file is for your main application css. */
2-
@import "./phoenix.css";
32
@import "./tile_map.scss";
43
@import "../node_modules/nprogress/nprogress.css";
54

assets/css/phoenix.css

Lines changed: 0 additions & 101 deletions
This file was deleted.

assets/css/tile_map.scss

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,23 @@ body {
77
padding: 0;
88
}
99

10-
h1 {
10+
h3 {
1111
margin: 1em;
1212
text-align: center;
1313
}
1414

1515
div.tilemap-container {
1616
display: flex;
17-
flex-flow: row nowrap;
18-
width: 100%;
17+
flex-flow: column wrap;
18+
justify-content: baseline;
1919
}
2020

2121
div.tile_map {
2222
background-color: black;
2323

2424
display: table;
2525
table-layout: fixed;;
26+
width: fit-content;
2627

2728
div.row {
2829
display: table-row;
@@ -127,11 +128,12 @@ div.toolbar {
127128
flex: auto;
128129

129130
display: flex;
130-
flex-flow: column wrap;
131-
justify-content: space-around;
131+
flex-flow: row nowrap;
132+
justify-content: left;
132133

133134
button {
134-
padding: 1em;
135+
margin: 0.5rem;
136+
padding: 0.5rem;
135137
font-size: 1.4em;
136138
cursor: pointer;
137139
}

assets/package-lock.json

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/move_your_cedric_web/live/map_live.ex

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,25 @@ defmodule MoveYourCedricWeb.MapLive do
3434
end
3535

3636
def render(assigns) do
37+
# <img class="morpheus" src="/images/morpheus.jpg">
38+
3739
~L"""
38-
<h1>Move Your Cédric</h1>
40+
<h3>Move Your Cédric</h3>
3941
4042
<div class="tilemap-container">
43+
<div class="toolbar">
44+
<button phx-click="update-path">Find the path</button>
45+
<button phx-click="walk-path">Walk the path</button>
46+
</div>
47+
48+
<ul class="entities-list">
49+
<%= for entity <- @tile_map.entities do %>
50+
<li>
51+
<%= entity.name %> is at <%= entity.position |> List.first %> <%= entity.position |> List.last %> and is <%= phrasing_status(entity.status) %>
52+
</li>
53+
<% end %>
54+
</ul>
55+
4156
<div class="tile_map">
4257
<%= Enum.map(@tile_map.tiles, fn row -> %>
4358
<div class="row">
@@ -95,20 +110,6 @@ defmodule MoveYourCedricWeb.MapLive do
95110
</div>
96111
<% end) %>
97112
</div>
98-
99-
<div class="toolbar">
100-
<img class="morpheus" src="/images/morpheus.jpg">
101-
<button phx-click="update-path">Find the path</button>
102-
<button phx-click="walk-path">Walk the path</button>
103-
104-
<ul class="entities-list">
105-
<%= for entity <- @tile_map.entities do %>
106-
<li>
107-
<%= entity.name %> is at <%= entity.position |> List.first %> <%= entity.position |> List.last %> and is <%= phrasing_status(entity.status) %>
108-
</li>
109-
<% end %>
110-
</ul>
111-
</div>
112113
</div>
113114
"""
114115
end

0 commit comments

Comments
 (0)