mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-25 01:14:43 +00:00
Fixed bout sheets to fit on a single page.
This commit is contained in:
@@ -1,112 +1,124 @@
|
||||
<style>
|
||||
.pagebreak {
|
||||
page-break-after: always;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
width: 7in; /* width: 7in; */
|
||||
height: 9.5in; /* or height: 9.5in; */
|
||||
font-size: 10px;
|
||||
position: left;
|
||||
left: 1in;
|
||||
height: 1in;
|
||||
}
|
||||
.pagebreak {
|
||||
page-break-after: always;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 8.5in;
|
||||
height: 11in;
|
||||
font-size: 10px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
table-layout: fixed; /* Ensure consistent column widths */
|
||||
}
|
||||
|
||||
th, td {
|
||||
border: 1px solid black;
|
||||
text-align: center;
|
||||
vertical-align: middle; /* Center-align text vertically */
|
||||
font-size: 8px; /* Reduce font size */
|
||||
padding: 1px; /* Minimize padding */
|
||||
line-height: 1; /* Compact line spacing */
|
||||
}
|
||||
|
||||
tbody {
|
||||
height: calc(100% - 50px); /* Adjust based on heading and footer content */
|
||||
display: table-row-group;
|
||||
}
|
||||
|
||||
tr {
|
||||
height: 50px; /* Default row height */
|
||||
}
|
||||
|
||||
tr.small-row {
|
||||
height: 15px; /* Smaller height for choice rows */
|
||||
}
|
||||
|
||||
.fixed-width {
|
||||
width: 80px; /* Fixed width for specific columns */
|
||||
max-width: 80px;
|
||||
word-wrap: break-word; /* Wrap long content within the fixed width */
|
||||
overflow: hidden; /* Hide overflow if content is too long */
|
||||
}
|
||||
|
||||
h4, p {
|
||||
margin: 0;
|
||||
padding: 2px; /* Minimized padding for text */
|
||||
}
|
||||
|
||||
.narrow {
|
||||
height: 0.9in; /* Adjust for periods or content */
|
||||
}
|
||||
</style>
|
||||
|
||||
<% @matches.each do |match| %>
|
||||
<% if match.w1 && match.w2 %>
|
||||
<% w1 = Wrestler.find(match.w1) %>
|
||||
<% w2 = Wrestler.find(match.w2) %>
|
||||
<% end %>
|
||||
<table class='pagebreak table table-striped table-bordered table-condensed'>
|
||||
<h4><strong>Bout Number: <%= match.bout_number %></strong></h4>
|
||||
<h4><strong>Weight Class: <%= match.weight.max %></strong></h4>
|
||||
<h4><strong>Round: <%= match.round %></strong></h4>
|
||||
<h4><strong>Bracket Position: <%= match.bracket_position %></strong></h4>
|
||||
<p><strong>Key: </strong>Takedown: T2, Escape: E1, Reversal: R2, Nearfall: N2 or N3, Stalling: S, Caution: C, Penalty Point: P1</p>
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Circle Winner</th>
|
||||
<th>
|
||||
<p><%= match.w1_name %></p>
|
||||
<p><%= if w1 then w1.school.name end %></p>
|
||||
</th>
|
||||
<th>
|
||||
<p><%= match.w2_name %></p>
|
||||
<p><%= if w2 then w2.school.name end %></p>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td></td>
|
||||
<div class="pagebreak">
|
||||
<p><strong>Bout Number:</strong> <%= match.bout_number %> <strong>Weight Class:</strong> <%= match.weight.max %> <strong>Round:</strong> <%= match.round %> <strong>Bracket Position:</strong> <%= match.bracket_position %></p>
|
||||
<p><strong>Key: </strong>Takedown: T3, Escape: E1, Reversal: R2, Nearfall: N2 or N3 or N4, Stalling: S, Caution: C, Penalty Point: P1</p>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr class="small-row">
|
||||
<th class="fixed-width">Circle Winner</th>
|
||||
<th>
|
||||
<p><%= match.w1_name %>-<%= w1&.school&.name %></p>
|
||||
</th>
|
||||
<th>
|
||||
<p><%= match.w2_name %>-<%= w2&.school&.name %></p>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="small-row">
|
||||
<td class="fixed-width"></td>
|
||||
<td>red / green (circle one)</td>
|
||||
<td>red / green (circle one)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Period 1</td>
|
||||
<td><br><br><br><br><br><br><br><br><br></td>
|
||||
<td><br><br><br><br><br><br><br><br><br></td>
|
||||
<% ['Period 1'].each do |period| %>
|
||||
<tr>
|
||||
<td class="fixed-width"><%= period %></td>
|
||||
<td class="narrow"></td>
|
||||
<td class="narrow"></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% ['Period 2', 'Period 3'].each do |period| %>
|
||||
<tr class="small-row">
|
||||
<td class="fixed-width">Choice (if applicable)</td>
|
||||
<td>top / bottom / neutral / defer (circle one)</td>
|
||||
<td>top / bottom / neutral / defer (circle one)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="fixed-width"><%= period %></td>
|
||||
<td class="narrow"></td>
|
||||
<td class="narrow"></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% ['Overtime 1', 'Overtime 2', 'Overtime 3'].each do |period| %>
|
||||
<tr class="small-row">
|
||||
<td class="fixed-width">Choice (if applicable)</td>
|
||||
<td>top / bottom / neutral / defer (circle one)</td>
|
||||
<td>top / bottom / neutral / defer (circle one)</td>
|
||||
</tr>
|
||||
<tr class="small-row">
|
||||
<td class="fixed-width"><%= period %></td>
|
||||
<td class="narrow"></td>
|
||||
<td class="narrow"></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<tr class="small-row">
|
||||
<td class="fixed-width"><strong>Final Score</strong> (or pin time, default, disqualified, etc)</td>
|
||||
<td class="narrow"></td>
|
||||
<td class="narrow"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Choice</td>
|
||||
<td>top / bottom / neutral / defer (circle one)</td>
|
||||
<td>top / bottom / neutral / defer (circle one)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Period 2</td>
|
||||
<td><br><br><br><br><br><br><br><br><br></td>
|
||||
<td><br><br><br><br><br><br><br><br><br></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Choice</td>
|
||||
<td>top / bottom / neutral / defer (circle one)</td>
|
||||
<td>top / bottom / neutral / defer (circle one)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Period 3</td>
|
||||
<td><br><br><br><br><br><br><br><br><br></td>
|
||||
<td><br><br><br><br><br><br><br><br><br></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Overtime 1</td>
|
||||
<td><br></td>
|
||||
<td><br></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Choice</td>
|
||||
<td>top / bottom / neutral / defer (circle one)</td>
|
||||
<td>top / bottom / neutral / defer (circle one)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Overtime 2</td>
|
||||
<td><br><br></td>
|
||||
<td><br><br></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Choice</td>
|
||||
<td>top / bottom / neutral / defer (circle one)</td>
|
||||
<td>top / bottom / neutral / defer (circle one)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Overtime 3</td>
|
||||
<td><br><br></td>
|
||||
<td><br><br></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Choice</td>
|
||||
<td>top / bottom / neutral / defer (circle one)</td>
|
||||
<td>top / bottom / neutral / defer (circle one)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Overtime 4</td>
|
||||
<td><br><br></td>
|
||||
<td><br><br></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Final Score</strong> (or pin time, default, disqualified, etc)</td>
|
||||
<td><br><br></td>
|
||||
<td><br><br></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user