Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
29633a94c0 |
@@ -1,8 +1,3 @@
|
|||||||
<style>
|
|
||||||
*{
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<main class="main">
|
<main class="main">
|
||||||
<div class="row justify-content-md-center">
|
<div class="row justify-content-md-center">
|
||||||
<h1>Please select the number of teams:</h1>
|
<h1>Please select the number of teams:</h1>
|
||||||
@@ -40,7 +35,7 @@
|
|||||||
<button type="button" (click)="onButtonGenerate(playerNames.value)" class="btn btn-primary">Generate</button>
|
<button type="button" (click)="onButtonGenerate(playerNames.value)" class="btn btn-primary">Generate</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<table class="table table-striped">
|
<table class="table table-striped custom-table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col">Size</th>
|
<th scope="col">Size</th>
|
||||||
@@ -50,8 +45,8 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
@for (team of teamsArray; track $index) {
|
@for (team of teamsArray; track $index) {
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ team.length | number }}</td>
|
<td style="text-wrap: wrap;">{{ team.length | number }}</td>
|
||||||
<td>{{ team }}</td>
|
<td class="wrap-cell">{{ team }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
*{
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.custom-table {
|
||||||
|
//table-layout: fixed;
|
||||||
|
width: 100%; /* Or a specific max-width */
|
||||||
|
}
|
||||||
|
.wrap-cell{
|
||||||
|
word-break: break-word;
|
||||||
|
white-space: normal;
|
||||||
|
}
|
||||||
@@ -23,7 +23,7 @@ export class AppComponent implements OnInit {
|
|||||||
constructor(private activatedRoute: ActivatedRoute){}
|
constructor(private activatedRoute: ActivatedRoute){}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
//consiedr using Angular's ActivatedRoute here instead
|
//TODO consider using Angular's ActivatedRoute here instead
|
||||||
const params = new URLSearchParams(window.location.search);
|
const params = new URLSearchParams(window.location.search);
|
||||||
const names = params.get('names')?.replaceAll(',', '\n');
|
const names = params.get('names')?.replaceAll(',', '\n');
|
||||||
if (names) this.playerNamesValue = names;
|
if (names) this.playerNamesValue = names;
|
||||||
|
|||||||
Reference in New Issue
Block a user