feat: improve game grid
This commit is contained in:
		
					parent
					
						
							
								b2f80dedf2
							
						
					
				
			
			
				commit
				
					
						06f2ae5d86
					
				
			
		
					 2 changed files with 49 additions and 17 deletions
				
			
		| 
						 | 
					@ -18,24 +18,52 @@
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      <div class="slider-container">
 | 
					      <div class="slider-container">
 | 
				
			||||||
        <div class="slider-grid">
 | 
					        <div class="min-w-full space-y-4">
 | 
				
			||||||
          <div class="card group" *ngFor="let game of featuredGames">
 | 
					          <!-- Top row with 3 games -->
 | 
				
			||||||
            <div class="relative overflow-hidden rounded-lg">
 | 
					          <div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4">
 | 
				
			||||||
              <img
 | 
					            <div class="card group" *ngFor="let game of featuredGames.slice(0, 3)">
 | 
				
			||||||
                [src]="game.image"
 | 
					              <div class="relative overflow-hidden rounded-lg">
 | 
				
			||||||
                [alt]="game.name"
 | 
					                <img
 | 
				
			||||||
                class="w-full aspect-[4/3] object-cover transition-transform duration-300 group-hover:scale-105"
 | 
					                  [src]="game.image"
 | 
				
			||||||
              />
 | 
					                  [alt]="game.name"
 | 
				
			||||||
              <div
 | 
					                  class="w-full aspect-[4/3] object-cover transition-transform duration-300 group-hover:scale-105"
 | 
				
			||||||
                class="absolute inset-0 bg-gradient-to-t from-deep-blue/95 via-deep-blue/50 to-transparent opacity-0 group-hover:opacity-100 transition-all duration-300 ease-in-out"
 | 
					                />
 | 
				
			||||||
              >
 | 
					 | 
				
			||||||
                <div
 | 
					                <div
 | 
				
			||||||
                  class="absolute bottom-4 left-4 right-4 transform translate-y-4 group-hover:translate-y-0 transition-transform duration-300"
 | 
					                  class="absolute inset-0 bg-gradient-to-t from-deep-blue/95 via-deep-blue/50 to-transparent opacity-0 group-hover:opacity-100 transition-all duration-300 ease-in-out"
 | 
				
			||||||
                >
 | 
					                >
 | 
				
			||||||
                  <h4 class="game-heading">{{ game.name }}</h4>
 | 
					                  <div
 | 
				
			||||||
                  <button class="button-primary w-full py-2" (click)="navigateToGame(game.route)">
 | 
					                    class="absolute bottom-4 left-4 right-4 transform translate-y-4 group-hover:translate-y-0 transition-transform duration-300"
 | 
				
			||||||
                    Jetzt Spielen
 | 
					                  >
 | 
				
			||||||
                  </button>
 | 
					                    <h4 class="game-heading">{{ game.name }}</h4>
 | 
				
			||||||
 | 
					                    <button class="button-primary w-full py-2" (click)="navigateToGame(game.route)">
 | 
				
			||||||
 | 
					                      Jetzt Spielen
 | 
				
			||||||
 | 
					                    </button>
 | 
				
			||||||
 | 
					                  </div>
 | 
				
			||||||
 | 
					                </div>
 | 
				
			||||||
 | 
					              </div>
 | 
				
			||||||
 | 
					            </div>
 | 
				
			||||||
 | 
					          </div>
 | 
				
			||||||
 | 
					          
 | 
				
			||||||
 | 
					          <!-- Bottom row with 2 games centered -->
 | 
				
			||||||
 | 
					          <div class="grid grid-cols-1 sm:grid-cols-2 gap-4 max-w-2xl mx-auto xl:max-w-3xl xl:gap-6">
 | 
				
			||||||
 | 
					            <div class="card group" *ngFor="let game of featuredGames.slice(3, 5)">
 | 
				
			||||||
 | 
					              <div class="relative overflow-hidden rounded-lg">
 | 
				
			||||||
 | 
					                <img
 | 
				
			||||||
 | 
					                  [src]="game.image"
 | 
				
			||||||
 | 
					                  [alt]="game.name"
 | 
				
			||||||
 | 
					                  class="w-full aspect-[4/3] object-cover transition-transform duration-300 group-hover:scale-105"
 | 
				
			||||||
 | 
					                />
 | 
				
			||||||
 | 
					                <div
 | 
				
			||||||
 | 
					                  class="absolute inset-0 bg-gradient-to-t from-deep-blue/95 via-deep-blue/50 to-transparent opacity-0 group-hover:opacity-100 transition-all duration-300 ease-in-out"
 | 
				
			||||||
 | 
					                >
 | 
				
			||||||
 | 
					                  <div
 | 
				
			||||||
 | 
					                    class="absolute bottom-4 left-4 right-4 transform translate-y-4 group-hover:translate-y-0 transition-transform duration-300"
 | 
				
			||||||
 | 
					                  >
 | 
				
			||||||
 | 
					                    <h4 class="game-heading">{{ game.name }}</h4>
 | 
				
			||||||
 | 
					                    <button class="button-primary w-full py-2" (click)="navigateToGame(game.route)">
 | 
				
			||||||
 | 
					                      Jetzt Spielen
 | 
				
			||||||
 | 
					                    </button>
 | 
				
			||||||
 | 
					                  </div>
 | 
				
			||||||
                </div>
 | 
					                </div>
 | 
				
			||||||
              </div>
 | 
					              </div>
 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -52,7 +52,7 @@ a {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.slider-grid {
 | 
					.slider-grid {
 | 
				
			||||||
  @apply min-w-full grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4;
 | 
					  @apply min-w-full grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.welcome-bonus {
 | 
					.welcome-bonus {
 | 
				
			||||||
| 
						 | 
					@ -71,6 +71,10 @@ a {
 | 
				
			||||||
  @apply font-bold text-text-primary text-sm mb-2;
 | 
					  @apply font-bold text-text-primary text-sm mb-2;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.game-heading {
 | 
				
			||||||
 | 
					  @apply font-bold text-text-primary text-lg mb-2;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.game-heading-xl {
 | 
					.game-heading-xl {
 | 
				
			||||||
  @apply font-bold text-text-primary text-xl mb-2;
 | 
					  @apply font-bold text-text-primary text-xl mb-2;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue