diff --git a/html/_layouts/default.php b/html/_layouts/default.php index 98a564eecce20e85f2beac45df84f803af83fff1..547fc6c586b1f8efaf23570c78baad8aaa48dfdd 100644 --- a/html/_layouts/default.php +++ b/html/_layouts/default.php @@ -134,10 +134,6 @@ if( !empty($csv) ){ </div> </form> - - <div id="partien" class="div_left"> - </div> - <div class="div_right"> <h2 class="tabelle">Tabelle <button>Zweikampf</button><button>Assists</button><button>Tore</button><button class="active">Punktestand</button></h2> @@ -201,6 +197,11 @@ if( !empty($csv) ){ </table> </div> + + <div id="partien" class="div_left"> + </div> + + </body> diff --git a/html/assets/css/custom.scss b/html/assets/css/custom.scss index 95c10eb4906b4ac512967975f043228a9f0e54a8..1a4c456568e3a3d30ceb7ade708aeaa8421c96bd 100644 --- a/html/assets/css/custom.scss +++ b/html/assets/css/custom.scss @@ -49,14 +49,19 @@ body { } -.tabelle { +table.tabelle { width: 100%; padding: 5px; - padding-left: 10px; + /* padding-left: 10px; */ +} + +h2.tabelle { + padding:5px; } h2.tabelle { + max-width: 600px; background: cornflowerblue; button { float: right; @@ -96,6 +101,7 @@ table.tabelle { } td { padding-left: 3px; + padding-right: 3px; } } @@ -120,22 +126,36 @@ n { background:firebrick; } - .div_left, .div_right { - width: calc( 50% - 40px ); - float: left; - padding:10px; + width: calc( 100% - 30px ); + padding: 10px; } +@media screen and ( max-width: 500px ){ + body { + font-size: 0.8em; + } +} + +@media screen and ( min-width: 990px ){ + .div_left, .div_right { + width: calc( 50% - 40px ); + float: left; + padding:10px; + } + .div_right { + position: fixed; + right: 20px; + top: 9px; + } +} + + .div_left { text-align: right; } -.div_right { - position: fixed; - right: 20px; - top: 9px; -} + tr.begegnungen { &:nth-child(4n+1), &:nth-child(4n+3){ @@ -188,6 +208,7 @@ tr.stats { } #tabelle_punktestand { + max-width: 610px; tr { td,th { &:last-child { @@ -217,3 +238,7 @@ tr.stats { } } } + +td.p { color: green; } +td.u { color: orange; } +td.n { color: firebrick; } diff --git a/html/assets/js/script.js b/html/assets/js/script.js index 492e91f8253b243478d239dc6fd9b6621f8681bc..7bd3f9d64c911c9954804cd21243bf7d3054e62a 100644 --- a/html/assets/js/script.js +++ b/html/assets/js/script.js @@ -321,7 +321,7 @@ function calculateTabelle(saison,runde,show=true){ var hist=v[saison].Tr.map( (a) => '<'+a+'></'+a+'>' ).slice(-6).join(''); tmp+='<td>'+hist+'</td>'; tmp+='<td>'+v[saison].Tp+'/'+v[saison].Tn+'</td>'; - tmp+='<td>'+v[saison].Td+'</td>'; + tmp+='<td class="'+((v[saison].Td > 0 ) ? 'p' : (v[saison].Td == 0 ) ? 'u' : 'n')+'">'+((v[saison].Td > 0 ) ? '+' : '') + v[saison].Td+'</td>'; tmp+='<td>'+v[saison].P+'</td>'; $('#tabelle_punktestand tbody').append('<tr>'+tmp+'</tr>') } @@ -397,7 +397,7 @@ function calculateZwk(saison){ (( STATISTIK[v[0]] != undefined ) ? STATISTIK[v[0]].S : 0), team_flag+' '+(( v[1].name != null ) ? v[1].name+' ('+(v[1].age+saison*1-v[1].age_saison)+')' : '<a href="https://ultrasoccer.de/playerprofile/?id='+v[0]+'" target="ultrasoccer">'+v[0]+'</a>' ), team_name, - v[1].Z + (( v[1].Z > 0 ) ? '+' : '' )+v[1].Z ].join('</td><td>')+'</td>'; } );