Compare commits

..

2 Commits

Author SHA1 Message Date
c58ccea3dd
Update: Random position width 2023-10-31 19:49:38 +01:00
6e99a3d193
Clean code 2023-10-31 19:44:40 +01:00
2 changed files with 3 additions and 4 deletions

View File

@ -36,7 +36,7 @@
<section class="container middle" *ngFor="let n of news; let index;"> <section class="container middle" *ngFor="let n of news; let index;">
<div class="content columns"> <div class="content columns">
<div class="col center"> <div class="col center">
<div class="button big" [ngStyle]="{transform:'translateX('+n.random+'%)'}"> <div class="button big" [ngStyle]="{transform:'translateX('+n.random+'vw)'}">
<h1>Podcast {{n.title}}</h1> <h1>Podcast {{n.title}}</h1>
</div> </div>
</div> </div>

View File

@ -21,7 +21,6 @@ export class AppComponent implements OnInit {
playerService.init_app$ playerService.init_app$
.subscribe( .subscribe(
(res:any) => { (res:any) => {
console.log('jsjs')
this.start = res; this.start = res;
} }
) )
@ -36,8 +35,8 @@ export class AppComponent implements OnInit {
randomPosition():number { randomPosition():number {
let seed = Math.random(); let seed = Math.random();
let max=200 let max=40
let min=-200 let min=-40
return Math.floor(Math.random() * (max - min + 1) + min) return Math.floor(Math.random() * (max - min + 1) + min)
} }
} }