Pairing page: print pairables instead of games when no game yet

This commit is contained in:
Claude Brisson
2024-01-30 17:12:22 +01:00
parent 7fd3619382
commit 08d572db7b
3 changed files with 38 additions and 13 deletions

View File

@@ -442,10 +442,43 @@
margin-top: 0.1em !important; margin-top: 0.1em !important;
} }
#logo, #lang, .steps, #filter-box, #footer, #pairing-left, #pairing-buttons, button, #standings-params, #logout { #logo, #lang, .steps, #filter-box, #footer, #unpairables, #pairing-buttons, button, #standings-params, #logout, .pairing-stats, .result-sheets {
display: none !important; display: none !important;
} }
body {
&.nogame {
#pairables {
max-height: unset !important;
max-width: unset !important;
font-size: 1rem !important;
line-height: 1.1rem !important;
min-width: 60vw;
&::before {
top: 0;
}
}
#paired {
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;
}
}
#pairables {
display: none !important;
}
}
}
.circular.label { .circular.label {
transform: scale(0.7); transform: scale(0.7);
} }
@@ -454,17 +487,6 @@
max-width: unset !important; max-width: unset !important;
} }
#paired {
max-height: unset !important;
max-width: unset !important;
font-size: 1rem !important;
line-height: 1.1rem !important;
min-width: 60vw;
&::before {
top: 0;
}
}
} }
.page { .page {

View File

@@ -169,4 +169,7 @@ onLoad(()=>{
if (store.has('unpairablesScroll')) $('#unpairables')[0].scrollTop = store('unpairablesScroll'); if (store.has('unpairablesScroll')) $('#unpairables')[0].scrollTop = store('unpairablesScroll');
if (store.has('pairedScroll')) $('#paired')[0].scrollTop = store('pairedScroll'); if (store.has('pairedScroll')) $('#paired')[0].scrollTop = store('pairedScroll');
}, 0); }, 0);
if ($('#paired .listitem').length === 0) {
$('body').addClass('nogame');
}
}); });

View File

@@ -20,7 +20,7 @@
<button class="ui floating choose-round prev-round button">&laquo;</button> <button class="ui floating choose-round prev-round button">&laquo;</button>
<span class="active-round">$round</span> <span class="active-round">$round</span>
<button class="ui floating choose-round next-round button">&raquo;</button> <button class="ui floating choose-round next-round button">&raquo;</button>
<span class="norbeak">( $pairables.size() pairable, $games.size() games )</span> <span class="pairing-stats nobreak">( $pairables.size() pairable, $games.size() games )</span>
</div> </div>
<div id="pairing-lists"> <div id="pairing-lists">
<div id="pairing-left"> <div id="pairing-left">