Edit route + add cover

main
Alex 2 years ago
parent d97990064e
commit 7a4120a29c

@ -27,6 +27,9 @@
document.getElementById("genres").value = genre_names;
//document.querySelector('[alt="Game Cover "]').src = game.cover_image_path;
var cover_url = game['cover']['url'];
var replaced_url = cover_url.replace("thumb", "cover_big");
document.getElementById("cover").src = replaced_url;
}
@ -123,7 +126,7 @@
<input type="text" name="game_name" id="game_name" x-model="gameDetails.name" readonly class="w-full p-2 border-gray-300 rounded-md focus:border-blue-500 focus:outline-none focus:shadow-outline-blue dark:bg-gray-700 dark:text-gray-100 dark:border-gray-600">
</div>
<div>
<img x-bind:src="gameDetails.cover_image_path" alt="Game Cover " class="mt-2">
<img src="" id="cover" alt="Game Cover" class="mt-2">
</div>
<div>
<label for="game_slug" class="block text-sm font-medium text-gray-700 dark:text-gray-400">IGDB Slug</label>

Loading…
Cancel
Save