update champion card
All checks were successful
ci / docker (push) Successful in 4m17s

This commit is contained in:
Álvaro 2024-06-09 02:48:45 +02:00
parent 192748bb1d
commit 74a086c855

View File

@ -13,13 +13,22 @@ defmodule LolAnalyticsWeb.ChampionComponents.ChampionCard do
~H"""
<.link patch={"/champions/#{@props.id}"}>
<div class="flex flex-col rounded-xl bg-clip-border overflow-hidden bg-gray-200">
<img src={"https://ddragon.leagueoflegends.com/cdn/14.11.1/img/champion/#{@props.image}"} />
<div class="py-2" />
<div class="flex mx-auto">
<div class="flex flex-column overflow-hidden">
<div class=" px-4 py-1 opacity-80 gap-2 absolute z-10 align-bottom flex mx-auto bg-black w-max">
<img src={team_position_image(@props.team_position)} class="w-5 h-5" />
<h3><%= @props.name %></h3>
<h3 class="text-white"><%= @props.name %></h3>
</div>
<div class="py-2" />
<img
class="static w-40 h-40"
src={"https://ddragon.leagueoflegends.com/cdn/14.11.1/img/champion/#{@props.image}"}
/>
</div>
<div class="py-1" />
<div class="pl-2">
<h3>Win rate: <%= @props.win_rate %></h3>
<h3>Wins: <%= @props.wins %> / <%= @props.total_games %></h3>
</div>
<div class="py-1" />
</div>
</.link>
"""