Review printing

This commit is contained in:
Claude Brisson
2024-06-17 12:09:56 +02:00
parent 8adbaf014f
commit d4a937a2f6
8 changed files with 117 additions and 31 deletions

View File

@@ -2,6 +2,8 @@
VERSION=$(grep '<version>' pom.xml | head -1 | egrep -o '[0-9.]+')
echo Installing Pairgoth version $VERSION
mvn -DskipTests=true install
if [ !-f "$HOME/.m2/repository/org/jeudego/pairgoth/pairgoth-common/$VERSION/pairgoth-common-$VERSION.jar" ]

View File

@@ -520,6 +520,10 @@
@media print {
@page {
size: A4;
}
body {
width: unset;
height: unset;
@@ -527,6 +531,14 @@
overflow: visible;
}
#center #inner > .section {
margin: 0 0.5em;
}
#players-list {
max-width: 98vw;
}
.roundbox {
border: none;
}
@@ -537,7 +549,7 @@
margin-top: 0.1em !important;
}
#logo, #lang, .steps, #filter-box, #reglist-mode, #footer, #unpairables, #pairing-buttons, button, #standings-params, #logout, .pairing-stats, .result-sheets, .toggle, #overview {
#header, #logo, #lang, .steps, #filter-box, #reglist-mode, #footer, #unpairables, #pairing-buttons, button, #standings-params, #logout, .pairing-stats, .result-sheets, .toggle, #overview {
display: none !important;
}
@@ -545,6 +557,10 @@
overflow-y: hidden;
}
#paired {
display: none !important;
}
body {
&.nogame {
#pairables {
@@ -558,22 +574,17 @@
top: 0;
}
}
#paired {
#print-pairings {
display: none !important;
}
}
&:not(.nogame) {
#paired {
max-height: unset !important;
max-width: unset !important;
font-size: 1rem !important;
line-height: 1.1rem !important;
min-width: 60vw;
&::before {
top: 0;
#print-pairings {
display: table;
.left {
text-align: left;
}
}
@@ -596,7 +607,7 @@
font-size: 1.4rem;
line-height: 1.5rem;
height: 24vh;
border-bottom: 1px dotted gray;
border-bottom: 2px dotted gray;
display: flex;
flex-flow: column nowrap;
justify-content: space-evenly;
@@ -664,11 +675,21 @@
color: black !important;
}
.participation .ui.label {
#participation-stats {
display: none;
}
#players-list tr > :first-child {
display: none;
}
#players-list #players .participation .ui.label {
background: none;
border: none;
font-weight: bold;
min-width: unset;
font-size: 1rem !important;
min-width: unset !important;
min-height: unset !important;
padding: 0 !important;
&.red {
color: rgba(0,0,0,0);
text-decoration: solid line-through black;
@@ -678,12 +699,37 @@
}
}
table { border-top: none; }
table tr td, table tr th { page-break-inside:avoid; }
table thead th {
border-top: 1px solid rgba(34, 36, 38, .1);
table {
border-top: none;
font-size: 1rem;
font-weight: bold;
tr td, tr th {
page-break-inside:avoid;
height: 2em;
}
thead {
display:table-header-group;
th {
border-top: 1px solid rgba(34, 36, 38, .1);
&:after {
display: none;
}
}
}
thead { display:table-header-group; }
tfoot { display:table-footer-group; }
}
#results-table td.looser {
font-weight: normal;
}
#print-pairings table {
font-size: 1.2rem;
}
#pairing-round, #results-round, #standings-round {
font-size: 1.1rem;
}
#standings-table {
font-size: 0.70rem;
}
}
}

View File

@@ -99,13 +99,13 @@
background-color: #D0FFD0;
}
.participation {
white-space: nowrap;
/* white-space: nowrap; */
.ui.label {
cursor: pointer;
font-size: 0.8rem;
min-width: 2em;
min-height: 2em;
padding: .5em !important;
padding: .5em;
line-height: 1em;
text-align: center;
border-radius: 500rem;
@@ -360,7 +360,14 @@
width: 6em;
}
}
}
#print-pairables {
width: 100%;
display: none;
}
#print-pairings {
width: 100%;
display: none;
}
.pairing-buttons {
display: flex;

View File

@@ -91,7 +91,7 @@ Preliminary only Inscriptions préliminaires
Publish Publier
Publish standings Publier le classement
Rank Niveau
Rating Classement
Rating Class.
Reg Inscr.
Register Inscrire
Registration Inscriptions

View File

@@ -27,7 +27,11 @@
#stop
#end
#set($games = $utils.removeBye($roundPairing.games))
#foreach($game in $games)
#set($pages = ($games.size() + 3) / 4)
#foreach($i in [1..$games.size()])
#set($j = ($i - 1) / 4 + (($i - 1) % 4) * $pages)
#if($j < $games.size())
#set($game = $games[$j])
#set($white = $pmap[$game.w])
#set($black = $pmap[$game.b])
#if($foreach.index % 4 == 0)
@@ -36,7 +40,7 @@
<div class="page-item">
<div class="title">$tour.name</div>
<div class="subtitle">Result sheet</div>
<div class="subtitle"></div>
<div class="details">
<div>Table $game.t</div>
#set($komi = $tour.komi)
@@ -71,6 +75,7 @@
</div>
#end
#end
#end
</div>
<script type="text/javascript">
onLoad(() => {

View File

@@ -58,7 +58,7 @@
#set($white = $pmap[$game.w])
#set($black = $pmap[$game.b])
<div class="listitem game" data-id="$game.id">
<div class="table" data-value="$game.t">#$game.t</div>
<div class="table" data-value="$game.t">${game.t}.</div>
<div class="white" data-id="$game.w">#if($white)$white.name#if($white.firstname) $white.firstname#end#{else}BIP#end</div>
<div class="levels">#if($white)#rank($white.rank)#end&nbsp;/&nbsp;#if($black)#rank($black.rank)#end</div>
<div class="black" data-id="$game.b">#if($black)$black.name#if($black.firstname) $black.firstname#end#{else}BIP#end</div>
@@ -71,6 +71,32 @@
</div>
</div>
</div>
#if($games.size())
<div id="print-pairings">
<table class="ui striped table">
<thead>
<tr>
<th>Tbl</th>
<th>White</th>
<th>Black</th>
<th>Hd</th>
</tr>
</thead>
<tbody>
#foreach($game in $games)
#set($white = $pmap[$game.w])
#set($black = $pmap[$game.b])
<tr>
<td>${game.t}</td>
<td class="left">#if($white)${white.name} ${white.firstname} (#rank($white.rank), $white.country $white.club)#{else}BIP#end</td>
<td class="left">#if($black)${black.name} ${black.firstname} (#rank($black.rank), $black.country $black.club)#{else}BIP#end</td>
<td>${game.h}</td>
</tr>
#end
</tbody>
</table>
</div>
#end
</div>
<div id="edit-pairing" class="popup">

View File

@@ -20,7 +20,7 @@
<option value="final">Final only</option>
</select>
</div>
<div>
<div id="participation-stats">
$parts.size() participants, $utils.countFinals($parts) confirmed.
</div>
</div>

View File

@@ -29,7 +29,7 @@
#set($black = $pmap[$game.b])
#if($black && $white)
<tr id="result-$game.id" data-id="$game.id">
<td data-sort="$game.t">#$game.t</td>
<td data-sort="$game.t">${game.t}.</td>
<td class="white player #if($game.r == 'w' || $game.r == '#') winner #elseif($game.r == 'b' || $game.r == '0') looser #end" data-id="$white.id" data-sort="$white.name#if($white.firstname) $white.firstname#end"><span>#if($white)$white.name#if($white.firstname) $white.firstname#end #rank($white.rank)#{else}BIP#end</span></td>
<td class="black player #if($game.r == 'b' || $game.r == '#') winner #elseif($game.r == 'w' || $game.r == '0') looser #end" data-id="$black.id" data-sort="$black.name#if($black.firstname) $black.firstname#end"><span>#if($black)$black.name#if($black.firstname) $black.firstname#end #rank($black.rank)#{else}BIP#end</span></td>
<td class="result centered" data-sort="$game.r" data-result="$game.r">$dispRst[$game.r]</td>