-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f32e98a
commit 359b6a2
Showing
5 changed files
with
73 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,48 @@ | ||
<%= if @karaoke.status == :started do %> | ||
<%= unless is_nil(@karaoke.performing_id) do %> | ||
<section style="margin-top: -50px;"> | ||
<aside style="padding: 0;"> | ||
<img alt="HTML only" src={hd(@karaoke.performing.song.album.images).url} height="285" /> | ||
<div style="padding: 0 0.5rem;"> | ||
<h3><%= @karaoke.performing.song.name %></h3> | ||
<p> | ||
<strong><%= @karaoke.performing.song.album.name %></strong> | ||
</p> | ||
<p> | ||
<em><%= Enum.map(@karaoke.performing.song.artists, & &1.name) |> Enum.join(", ") %></em> | ||
</p> | ||
<center> | ||
<table style="padding: 0; margin-bottom: 10px;"> | ||
<tbody> | ||
<tr> | ||
<td><strong>Team</strong></td> | ||
<td><%= @karaoke.performing.team.name || "No name" %></td> | ||
</tr> | ||
<tr> | ||
<td><strong>Score</strong></td> | ||
<td><%= score(@karaoke.performing) %></td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</center> | ||
</div> | ||
</aside> | ||
</section> | ||
<section style=""></section> | ||
<div id="karaoke"> | ||
<%= if @karaoke.status == :started do %> | ||
<%= unless is_nil(@karaoke.performing_id) do %> | ||
<section style="margin-top: -50px;"> | ||
<aside style="padding: 0;"> | ||
<img alt="HTML only" src={hd(@karaoke.performing.song.album.images).url} height="285" /> | ||
<div style="padding: 0 0.5rem;"> | ||
<h3><%= @karaoke.performing.song.name %></h3> | ||
<p> | ||
<strong><%= @karaoke.performing.song.album.name %></strong> | ||
</p> | ||
<p> | ||
<em><%= Enum.map(@karaoke.performing.song.artists, & &1.name) |> Enum.join(", ") %></em> | ||
</p> | ||
<center> | ||
<table style="padding: 0; margin-bottom: 10px;"> | ||
<tbody> | ||
<tr> | ||
<td><strong>Team</strong></td> | ||
<td><%= @karaoke.performing.team.name || "No name" %></td> | ||
</tr> | ||
<tr> | ||
<td><strong>Score</strong></td> | ||
<td><%= score(@karaoke.performing) %></td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</center> | ||
</div> | ||
</aside> | ||
</section> | ||
<section style=""></section> | ||
|
||
<section> | ||
<%= if @karaoke.performing.voting? and not has_voted?(@current_user, @karaoke.performing) do %> | ||
<header> | ||
<p>Vote now!</p> | ||
</header> | ||
<%= for pontuation <- 1..10 do %> | ||
<button phx-click="vote" phx-value-pontuation={pontuation} style="margin: 10px;"><%= pontuation %></button> | ||
<section> | ||
<%= if @karaoke.performing.voting? and not has_voted?(@current_user, @karaoke.performing) do %> | ||
<header> | ||
<p>Vote now!</p> | ||
</header> | ||
<%= for pontuation <- 1..10 do %> | ||
<button phx-click="vote" phx-value-pontuation={pontuation} style="margin: 10px;"><%= pontuation %></button> | ||
<% end %> | ||
<% end %> | ||
<% end %> | ||
</section> | ||
</section> | ||
<% end %> | ||
<% else %> | ||
<.status karaoke={@karaoke} /> | ||
<% end %> | ||
<% else %> | ||
<.status karaoke={@karaoke} /> | ||
<% end %> | ||
</div> |