6 392
edições
Sem resumo de edição |
Sem resumo de edição |
||
Linha 70: | Linha 70: | ||
margin-top: 10px; | margin-top: 10px; | ||
cursor: pointer; | cursor: pointer; | ||
width: | width: 15px; | ||
height: | height: 15px; | ||
background: url('https://wiki.pokexgames.com/images/2/2d/Comvip.png') no-repeat center; | background: url('https://wiki.pokexgames.com/images/2/2d/Comvip.png') no-repeat center; | ||
background-size: contain; | background-size: contain; | ||
display: block; | display: block; | ||
margin: | margin: 0 auto; | ||
} | } | ||
</style> | </style> | ||
Linha 175: | Linha 175: | ||
<img src="${imageInfo.imageUrl}" alt="${imageName}"> | <img src="${imageInfo.imageUrl}" alt="${imageName}"> | ||
</div> | </div> | ||
<div class="variations-container | <div class="variations-container"> | ||
`; | `; | ||
Linha 181: | Linha 181: | ||
imagesHtml += ` | imagesHtml += ` | ||
<div class="variation-item"> | <div class="variation-item"> | ||
<img src="${variation.additionalImages[0]}" alt="Variation Image" class="variation-image"> | <img src="${variation.additionalImages[0]}" alt="Variation Image" class="variation-image" data-variation-index="${index}"> | ||
<div class="swap-button" data-variation-index="${index}"></div> | |||
<div class="image-info"> | <div class="image-info"> | ||
<b>Nome do Addon</b>: ${variation.description} | <b>Nome do Addon</b>: ${variation.description} | ||
<b>Como Obter</b>: <a href="${variation.obtain.url}" target="_blank">${variation.obtain.text}</a> | <b>Como Obter</b>: <a href="${variation.obtain.url}" target="_blank">${variation.obtain.text}</a> | ||
</div> | </div> | ||
<div class="swap-button" data-index="${index}"></div> | <div class="swap-button" data-variation-index="${index}"></div> | ||
</div> | </div> | ||
`; | `; | ||
Linha 198: | Linha 199: | ||
// Alternar imagens ao clicar no botão de troca | // Alternar imagens ao clicar no botão de troca | ||
const swapButtons = document.querySelectorAll('.swap-button'); | const swapButtons = document.querySelectorAll('.swap-button'); | ||
swapButtons.forEach(button => { | swapButtons.forEach(button => { | ||
const index = button.getAttribute('data-index'); | const index = button.getAttribute('data-variation-index'); | ||
const variation = imageInfo.variations[index]; | const variation = imageInfo.variations[index]; | ||
let currentImageIndex = 0; | let currentImageIndex = 0; |