mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-25 01:14:43 +00:00
Created bracket and extra flag for wrestler
This commit is contained in:
@@ -22,6 +22,7 @@ class StaticPagesController < ApplicationController
|
||||
|
||||
end
|
||||
def brackets
|
||||
|
||||
if params[:weight]
|
||||
@weight = Weight.find(params[:weight])
|
||||
@tournament = Tournament.find(@weight.tournament_id)
|
||||
|
||||
125
app/views/static_pages/_bracket.html.erb
Normal file
125
app/views/static_pages/_bracket.html.erb
Normal file
@@ -0,0 +1,125 @@
|
||||
<style>
|
||||
/*
|
||||
* Flex Layout Specifics
|
||||
*/
|
||||
main{
|
||||
display:flex;
|
||||
flex-direction:row;
|
||||
}
|
||||
.round{
|
||||
display:flex;
|
||||
flex-direction:column;
|
||||
justify-content:center;
|
||||
width:200px;
|
||||
list-style:none;
|
||||
padding:0;
|
||||
}
|
||||
.round .spacer{ flex-grow:1; }
|
||||
.round .spacer:first-child,
|
||||
.round .spacer:last-child{ flex-grow:.5; }
|
||||
|
||||
.round .game-spacer{
|
||||
flex-grow:1;
|
||||
}
|
||||
|
||||
/*
|
||||
* General Styles
|
||||
*/
|
||||
body{
|
||||
font-family:sans-serif;
|
||||
font-size:small;
|
||||
padding:10px;
|
||||
line-height:1.4em;
|
||||
}
|
||||
|
||||
li.game{
|
||||
padding-left:20px;
|
||||
}
|
||||
|
||||
li.game.winner{
|
||||
font-weight:bold;
|
||||
}
|
||||
li.game span{
|
||||
float:right;
|
||||
margin-right:5px;
|
||||
}
|
||||
|
||||
li.game-top{ border-bottom:1px solid #aaa; }
|
||||
|
||||
li.game-spacer{
|
||||
border-right:1px solid #aaa;
|
||||
min-height:40px;
|
||||
}
|
||||
|
||||
li.game-bottom{
|
||||
border-top:1px solid #aaa;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
<h5>Bracket After Pool</h5>
|
||||
<main id="bracket">
|
||||
<ul class="round round-1">
|
||||
<li class="spacer"> </li>
|
||||
|
||||
<li class="game game-top ">Winner Pool 1 <span>Score</span></li>
|
||||
<li class="game game-spacer"> </li>
|
||||
<li class="game game-bottom ">Runner Up Pool 2<span>Score</span></li>
|
||||
|
||||
<li class="spacer"> </li>
|
||||
|
||||
<li class="game game-top ">Runner Up Pool 3<span>Score</span></li>
|
||||
<li class="game game-spacer"> </li>
|
||||
<li class="game game-bottom ">Winner Pool 4 <span>Score</span></li>
|
||||
|
||||
<li class="spacer"> </li>
|
||||
|
||||
<li class="game game-top ">Winner Pool 3<span>Score</span></li>
|
||||
<li class="game game-spacer"> </li>
|
||||
<li class="game game-bottom ">Runner Up Pool 4<span>Score</span></li>
|
||||
|
||||
<li class="spacer"> </li>
|
||||
|
||||
<li class="game game-top ">Runner Up Pool 1<span>Score</span></li>
|
||||
<li class="game game-spacer"> </li>
|
||||
<li class="game game-bottom ">Winner Pool 2<span>Score</span></li>
|
||||
|
||||
<li class="spacer"> </li>
|
||||
</ul>
|
||||
<ul class="round round-2">
|
||||
<li class="spacer"> </li>
|
||||
|
||||
<li class="game game-top "> <span></span></li>
|
||||
<li class="game game-spacer"> </li>
|
||||
<li class="game game-bottom "><span></span></li>
|
||||
|
||||
<li class="spacer"> </li>
|
||||
|
||||
<li class="game game-top "> <span></span></li>
|
||||
<li class="game game-spacer"> </li>
|
||||
<li class="game game-bottom "> <span></span></li>
|
||||
|
||||
<li class="spacer"> </li>
|
||||
|
||||
</ul>
|
||||
<ul class="round round-3">
|
||||
<li class="spacer"> </li>
|
||||
|
||||
<li class="game game-top "> <span></span></li>
|
||||
<li class="game game-spacer"> </li>
|
||||
<li class="game game-bottom "> <span></span></li>
|
||||
|
||||
<li class="spacer"> </li>
|
||||
|
||||
</ul>
|
||||
<ul class="round round-4">
|
||||
<li class="spacer"> </li>
|
||||
|
||||
<li class="game game-top "> <span></span></li>
|
||||
|
||||
|
||||
<li class="spacer"> </li>
|
||||
</ul>
|
||||
</main>
|
||||
@@ -87,4 +87,9 @@
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
|
||||
</br>
|
||||
</br>
|
||||
<%= render 'bracket' %>
|
||||
@@ -46,7 +46,11 @@
|
||||
<%= f.label "Seed Criteria" %><br>
|
||||
<%= f.text_field :criteria %>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<%= f.label "Check box if extra" %> <%= f.check_box :extra %>
|
||||
</div>
|
||||
</br>
|
||||
</br>
|
||||
<div class="actions">
|
||||
<%= f.submit %>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user