fixed small styling issues

This commit is contained in:
Joachim 2018-09-08 14:40:46 +02:00
parent 2ca6434815
commit 084f022280
2 changed files with 19 additions and 15 deletions

View File

@ -3,30 +3,30 @@
<!--top level header: race + race 1 + race 2 + ... + penalty + total + result--> <!--top level header: race + race 1 + race 2 + ... + penalty + total + result-->
<div class="toplevelheader" style="grid-column: 1; grid-row : 1">race</div> <div class="toplevelheader" style="grid-column: 1; grid-row : 1">race</div>
<ng-container *ngFor="let y of ' '.repeat(maxLaps).split(''), let lapindex = index"> <!--<ng-container *ngFor="let y of ' '.repeat(maxLaps).split(''), let lapindex = index">-->
<div class="toplevelheader" [ngStyle]="{'grid-column': (1+lapindex+1), 'grid-row' : 1}">lap {{lapindex+1}}</div> <!--<div class="toplevelheader" [ngStyle]="{'grid-column': (1+lapindex+1), 'grid-row' : 1}">lap {{lapindex+1}}</div>-->
</ng-container> <!--</ng-container>-->
<div class="toplevelheader" [ngStyle]="{'grid-column': maxLaps+2, 'grid-row' : 1}">penalty</div> <div class="toplevelheader" [ngStyle]="{'grid-column': 2, 'grid-row' : 1}">penalty</div>
<div class="toplevelheader" [ngStyle]="{'grid-column': maxLaps+3, 'grid-row' : 1}">total</div> <div class="toplevelheader" [ngStyle]="{'grid-column': 3, 'grid-row' : 1}">total</div>
<div class="toplevelheader" [ngStyle]="{'grid-column': maxLaps+4, 'grid-row' : 1}">result</div> <div class="toplevelheader" [ngStyle]="{'grid-column': 4, 'grid-row' : 1}">result</div>
<!--start looping over teams, make a block for each--> <!--start looping over teams, make a block for each-->
<ng-container *ngFor="let team of teams; let teamindex = index"> <ng-container *ngFor="let team of teams; let teamindex = index">
<!--first multi row spanning cell: the team name --> <!--first multi row spanning cell: the team name -->
<div class="teamname" <div class="teamname"
[ngStyle]="{'grid-row':2+(teamindex*(maxRaces+1)), 'grid-column-start':2, 'grid-column-end': 2+maxRaces+1}"> [ngStyle]="{'grid-row':2+(teamindex*(maxRaces+1)), 'grid-column-start':2, 'grid-column-end': 2+maxRaces}">
{{team.name}} {{team.name}}
</div> </div>
<!--all the team contents: for each race a line --> <!--all the team contents: for each race a line -->
<ng-container *ngFor="let y of ' '.repeat(maxRaces).split(''), let raceindex = index"> <ng-container *ngFor="let y of ' '.repeat(maxRaces).split(''), let raceindex = index">
<!--also loop over laps: then we're in the right cell--> <!--also loop over laps: then we're in the right cell-->
<ng-container *ngFor="let z of ' '.repeat(maxLaps).split(''), let lapindex = index"> <!--<ng-container *ngFor="let z of ' '.repeat(maxLaps).split(''), let lapindex = index">-->
<!--add the time --> <!--add the time -->
<div [ngStyle]="{'grid-column':lapindex+2, 'grid-row':2+(teamindex*(maxRaces+1))+raceindex+1}"> <!--<div [ngStyle]="{'grid-column':lapindex+2, 'grid-row':2+(teamindex*(maxRaces+1))+raceindex+1}">-->
<span class="timecell">{{getLapTime(team.idteam, raceindex, lapindex)/1000 | number:'1.2-2'}}</span> <!--<span class="timecell">{{getLapTime(team.idteam, raceindex, lapindex)/1000 | number:'1.2-2'}}</span>-->
</div> <!--</div>-->
</ng-container> <!--</ng-container>-->
<!--add a race header--> <!--add a race header-->
<div class="lapheader" [ngStyle]="{'grid-column':1, 'grid-row':2+(teamindex*(maxRaces+1))+raceindex+1}"> <div class="lapheader" [ngStyle]="{'grid-column':1, 'grid-row':2+(teamindex*(maxRaces+1))+raceindex+1}">
@ -34,10 +34,10 @@
</div> </div>
<!--do a penalty for this race/team combo--> <!--do a penalty for this race/team combo-->
<div class="penaltycell" [ngStyle]="{'grid-column':maxLaps+2, 'grid-row':2+(teamindex*(maxRaces+1))+raceindex+1}"> <div class="penaltycell" [ngStyle]="{'grid-column':2, 'grid-row':2+(teamindex*(maxRaces+1))+raceindex+1}">
<span class="timecell">{{getPenaltySum(raceindex, team.idteam)/1000 | number:'1.2-2'}}</span> <span class="timecell">{{getPenaltySum(raceindex, team.idteam)/1000 | number:'1.2-2'}}</span>
</div> </div>
<div class="totalcell" [ngStyle]="{'grid-column':maxLaps+3, 'grid-row':2+(teamindex*(maxRaces+1))+raceindex+1}"> <div class="totalcell" [ngStyle]="{'grid-column':3, 'grid-row':2+(teamindex*(maxRaces+1))+raceindex+1}">
<span class="timecell">{{getRaceTime(raceindex, team.idteam)/1000 | number:'1.2-2'}}</span> <span class="timecell">{{getRaceTime(raceindex, team.idteam)/1000 | number:'1.2-2'}}</span>
</div> </div>
@ -45,7 +45,7 @@
</ng-container> </ng-container>
<!--this only has to be added once for each team...--> <!--this only has to be added once for each team...-->
<div class="resultcell" [ngStyle]="{'grid-column':maxLaps+4, <div class="resultcell" [ngStyle]="{'grid-column':4,
'grid-row-start':2+(teamindex*(maxRaces+1))+1, 'grid-row-start':2+(teamindex*(maxRaces+1))+1,
'grid-row-end': 2+(teamindex*(maxRaces+1))+1+maxRaces}"> 'grid-row-end': 2+(teamindex*(maxRaces+1))+1+maxRaces}">
<span class="timecell">{{getAvgOfBestTwo(team.idteam)/1000 | number:'1.2-2'}}</span> <span class="timecell">{{getAvgOfBestTwo(team.idteam)/1000 | number:'1.2-2'}}</span>

View File

@ -12,3 +12,7 @@ app-poule {
button.active { button.active {
background-color: #1dd21d; background-color: #1dd21d;
} }
.button-row {
text-align: center;
margin-top: 10px;
}