mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-25 01:14:43 +00:00
119 lines
3.0 KiB
Plaintext
119 lines
3.0 KiB
Plaintext
<style>
|
|
table.smallText tr td { font-size: 10px; }
|
|
/*
|
|
* Bracket Layout Specifics
|
|
*/
|
|
.bracket {
|
|
display: flex;
|
|
font-size: 10px;
|
|
}
|
|
.game {
|
|
min-width: 150px;
|
|
min-height: 50px;
|
|
/*background-color: #ddd;*/
|
|
border: 1px solid #ddd;
|
|
margin: 5px;
|
|
}
|
|
|
|
/*.game:after {
|
|
content:'';
|
|
border-color: #4f7a38;
|
|
border-width: 2px;
|
|
position: absolute;
|
|
display: block;
|
|
width: 10px;
|
|
right: -11px;
|
|
}
|
|
|
|
.game:nth-of-type(odd):after {
|
|
border-right-style: solid;
|
|
border-top-style: solid;
|
|
height: 100%;
|
|
top: 50%;
|
|
}
|
|
|
|
.game:nth-of-type(even):after {
|
|
border-right-style: solid;
|
|
border-bottom-style: solid;
|
|
height: 100%;
|
|
top: -50%;
|
|
}
|
|
|
|
.game:before {
|
|
content:'';
|
|
border-top: 2px solid #4f7a38;
|
|
position: absolute;
|
|
height: 2px;
|
|
width: 10px;
|
|
left: -10px;
|
|
top: 50%;
|
|
}*/
|
|
|
|
.round {
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: space-around;
|
|
}
|
|
|
|
.game-top {
|
|
border-bottom:1px solid #ddd;
|
|
padding: 2px;
|
|
min-height: 12px;
|
|
}
|
|
|
|
.bout-number {
|
|
text-align: center;
|
|
/*padding-top: 15px;*/
|
|
}
|
|
.bracket-winner {
|
|
border-bottom:1px solid #ddd;
|
|
padding: 2px;
|
|
min-height: 12px;
|
|
}
|
|
|
|
.game-bottom {
|
|
border-top:1px solid #ddd;
|
|
padding: 2px;
|
|
min-height: 12px;
|
|
}
|
|
</style>
|
|
<table class='smallText'>
|
|
<h5><strong><%= @tournament.name %> - <%= @weight.max %> Bracket</strong></h5>
|
|
<tr>
|
|
<% if @tournament.tournament_type == "Pool to bracket" %>
|
|
<td valign="top" style="padding: 10px;">
|
|
<% @matches = @tournament.matches.select{|m| m.weight_id == @weight.id} %>
|
|
<% @wrestlers = Wrestler.where(weight_id: @weight.id) %>
|
|
<% @pools = @weight.pool_rounds(@matches) %>
|
|
<%= render 'pool' %>
|
|
</td>
|
|
|
|
|
|
<td valign="top" style="padding: 10px;">
|
|
<% if @weight.pool_bracket_type == "twoPoolsToFinal" %>
|
|
<%= render 'twoPoolFinalBracket' %>
|
|
<% end %>
|
|
<% if @weight.pool_bracket_type == "twoPoolsToSemi" %>
|
|
<%= render 'twoPoolSemiBracket' %>
|
|
<% end %>
|
|
<% if @weight.pool_bracket_type == "fourPoolsToQuarter" %>
|
|
<%= render 'fourPoolQuarterBracket' %>
|
|
<% end %>
|
|
<% if @weight.pool_bracket_type == "eightPoolsToQuarter" %>
|
|
<%= render 'fourPoolQuarterBracket' %>
|
|
<% end %>
|
|
<% if @weight.pool_bracket_type == "fourPoolsToSemi" %>
|
|
<%= render 'fourPoolSemiBracket' %>
|
|
<% end %>
|
|
</td>
|
|
<% elsif @tournament.tournament_type.include? "Modified 16 Man Double Elimination" %>
|
|
<td valign="top" style="padding: 10px;">
|
|
<%= render 'modified_sixteen_man_double_elimination_bracket' %>
|
|
</td>
|
|
<% elsif @tournament.tournament_type.include? "Regular Double Elimination" %>
|
|
<td valign="top" style="padding: 10px;">
|
|
<%= render 'double_elimination_bracket' %>
|
|
</td>
|
|
<% end %>
|
|
</tr>
|
|
</table> |