Skip to content

Commit 947183f

Browse files
committed
Updated the header layout.
1 parent 210a782 commit 947183f

File tree

1 file changed

+13
-20
lines changed

1 file changed

+13
-20
lines changed

lib/karaokium_web/templates/layout/_header.html.heex

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,41 +9,34 @@
99
/>
1010
<% end %>
1111
<div>
12-
<div id="goToDiv">
13-
<button style="min-width: 50px; padding: 5px 10px;" onclick="clickedbutton();">
14-
Go To
15-
</button>
16-
</div>
17-
<div id="menu" class="hidden block">
18-
<ul>
19-
<%= for entry <- menu(@conn) do %>
20-
<li>
21-
<button style="min-width: 50px; padding: 5px 10px;" onclick="clickedbutton();">
22-
Go To
23-
</button>
24-
<%= unless Enum.empty?(entry.submenu) do %>
12+
<ul>
13+
<%= for entry <- menu(@conn) do %>
14+
<button style="padding: 5px 10px;" onclick="clickedbutton();">
15+
Go To
16+
</button>
17+
<%= unless Enum.empty?(entry.submenu) do %>
18+
<li class="block">
19+
<div id="menu" class="hidden">
2520
<ul class="block">
2621
<%= for subentry <- entry.submenu do %>
27-
<li>
22+
<li class="text-center">
2823
<a href={subentry.url}><%= subentry.title %></a>
2924
</li>
3025
<% end %>
3126
</ul>
32-
<% end %>
27+
</div>
3328
</li>
3429
<% end %>
35-
</ul>
36-
</div>
30+
<% end %>
31+
</ul>
3732
<script>
3833
var isClicked = false
3934
function clickedbutton() {
4035
isClicked = !isClicked
4136
if(isClicked){
42-
document.getElementById("goToDiv").className = "hidden"
43-
document.getElementById("menu").className = ""
37+
document.getElementById("menu").className = "text-left"
4438
}
4539
else{
46-
document.getElementById("goToDiv").className = ""
4740
document.getElementById("menu").className = "hidden"
4841
}
4942
}

0 commit comments

Comments
 (0)