diff --git a/html/_layouts/default.php b/html/_layouts/default.php index cb3ee13b43f1bbc14a2d39ec930aaa0ed9c8d095..51c60f3ce2d0be2c46100fc66ab981d22a5ff85e 100644 --- a/html/_layouts/default.php +++ b/html/_layouts/default.php @@ -419,32 +419,35 @@ if( !empty($csv) ){ </tbody> </table> - <table id="tabelle_team" class="tabelle d-none" ondblclick="backToActiveTable()"> - <thead> - <tr> - <th></th> - <th>Nt</th> - <th>Spieler</th> - <th>Alter</th> - <th>S/T/A</th> - <th>Zwk</th> - </tr> - </thead> - <tbody> - </tbody> - </table> - - <table id="tabelle_historie" class="tabelle d-none" ondblclick="backToActiveTable()"> - <thead> - <tr> - </tr> - </thead> - <tbody> - </tbody> - </table> + <div class="scrollen_team"> + <table id="tabelle_team" class="tabelle d-none" ondblclick="backToActiveTable()"> + <thead> + <tr> + <th></th> + <th>Nt</th> + <th>Spieler</th> + <th>Alter</th> + <th>S/T/A</th> + <th>Zwk</th> + </tr> + </thead> + <tbody> + </tbody> + </table> + </div> + <div class="scrollen"> + <table id="tabelle_historie" class="tabelle d-none" ondblclick="backToActiveTable()"> + <thead> + <tr> + </tr> + </thead> + <tbody> + </tbody> + </table> + </div> - <h3>Spielerdebüts</h3> - <table id="news"> + <h3 class="news">Spielerdebüts</h3> + <table id="news" class="news"> <thead> <th>Zeit</th> <th></th> diff --git a/html/assets/css/custom.scss b/html/assets/css/custom.scss index f793f5bc43bc0596852b57bfdd611a1bb29309fd..ba0c8c5cb14f1cdfac1585e0d1a5ca95504a459a 100644 --- a/html/assets/css/custom.scss +++ b/html/assets/css/custom.scss @@ -266,6 +266,7 @@ tr.stats { /* &:nth-child(4) { width: 50px; } */ } } + margin-bottom: 5em; } td.p { color: green; } @@ -382,9 +383,10 @@ td.n { color: firebrick; } } .face { - position: fixed; + /* position: fixed; top: 100px; right: 65%; + */ > img { position: absolute; &:nth-child(1){ z-index: 1 } @@ -408,7 +410,7 @@ td.n { color: firebrick; } } .tabelle td.face { - position: initial; + position: sticky; img { width: 20px; } @@ -449,4 +451,13 @@ i.fas { td.managervoted { background: palegoldenrod; +} + +div.scrollen { + overflow: scroll; +} + +div.scrollen_team { + overflow: auto; + max-height: 80vh; } \ No newline at end of file diff --git a/html/assets/js/script.js b/html/assets/js/script.js index f11ccbb91b562b7d83b01e306dd4e724652829a1..37bf6d6ee6f5e5982cdef50ec44488360b13a052 100644 --- a/html/assets/js/script.js +++ b/html/assets/js/script.js @@ -472,7 +472,7 @@ function calculatePunktestand(saison,runde,show=true){ function calculateTabelle(saison,param){ var STATISTIK=saison == 0 ? STATISTIK_ALL : STATISTIK_SAISON; - var n=Object.entries( STATISTIK ).sort( (a,b) => ( a[1][param] < b[1][param] || ( a[1][param] == b[1][param] && a[1].S > b[1].S ) ) ? 1 : -1 ).slice(0,10).map( + var n=Object.entries( STATISTIK ).sort( (a,b) => ( a[1][param] < b[1][param] || ( a[1][param] == b[1][param] && a[1].S > b[1].S ) ) ? 1 : -1 ).slice(0,20).map( function(v,i){ var team=TEAMS.filter( (a) => ( a.nt == v[1].nt ) ); @@ -574,6 +574,7 @@ function calculateTabelle(saison,param){ ); $('#tabelle_'+param+' tbody').html( n ); + $('.news').toggleClass('d-none', false); } function calculateTeam(saison,nt){ @@ -693,6 +694,7 @@ function calculateEwige(){ $('#tabelle_P').toggleClass('d-none'); $('h4.tabelle > button.punktestand').toggleClass('active',true); $('h4.tabelle').toggleClass('d-none',false); + $('.news').toggleClass('d-none', true); } function backToActiveTable(){ @@ -727,6 +729,8 @@ function calculateHistorie(){ $('button.active').toggleClass('active',false); $('#historie').toggleClass('active',true); $('h4.tabelle').toggleClass('d-none',true); + $('.news').toggleClass('d-none', true); + $('.rest')[0].scrollIntoView(); } var R=undefined;