ludo
parent
6395a54999
commit
647f80d075
@ -0,0 +1,13 @@
|
||||
FROM node:alpine
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
COPY . /usr/src/app
|
||||
|
||||
RUN npm install -g @angular/cli
|
||||
|
||||
RUN npm install
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
CMD ["ng", "serve", "--host", "127.0.0.1", "--port", "8080"]
|
@ -0,0 +1,40 @@
|
||||
section {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%,-50%);
|
||||
min-height: 50vh;
|
||||
min-width: 50vw;
|
||||
}
|
||||
|
||||
thead, tr {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
thead {
|
||||
border-bottom: 1px solid #000;
|
||||
}
|
||||
|
||||
th, td {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
tbody {
|
||||
width: 100%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.pagination {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.pagination > * {
|
||||
margin: 20px;
|
||||
}
|
@ -1,27 +1,29 @@
|
||||
<app-book-menu></app-book-menu>
|
||||
|
||||
<h2>User list</h2>
|
||||
<section>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Pseudo</th>
|
||||
<th scope="col" (click)="changeWatchedvar('nbPts')">Nombre de points</th>
|
||||
<th scope="col" (click)="changeWatchedvar('streak')">Streak</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr *ngFor="let user of users">
|
||||
<td>{{user.login}}</td>
|
||||
<td>{{user.points}}</td>
|
||||
<td>{{user.streak}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
<div class="pagination">
|
||||
<button (click)="loadPage(-1)">
|
||||
<
|
||||
</button>
|
||||
<p>{{nbPage}}/{{userService.getNbPage()}}</p>
|
||||
<button (click)="loadPage(1)">
|
||||
>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Pseudo</th>
|
||||
<th scope="col" (click)="changeWatchedvar('nbPts')">Nombre de points</th>
|
||||
<th scope="col" (click)="changeWatchedvar('streak')">Streak</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr *ngFor="let user of users">
|
||||
<td >{{user.login}}</td>
|
||||
<td>{{user.points}}</td>
|
||||
<td>{{user.streak}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
<br>
|
||||
<button (click)="loadPage(-1)">
|
||||
<
|
||||
</button>
|
||||
<button (click)="loadPage(1)">
|
||||
>
|
||||
</button>
|
||||
</section>
|
Loading…
Reference in new issue