Abhay557 / anime-card

an card which display name of anime and its poster.

Home Page:https://abhay557.github.io/anime-card/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Anime-card

an card which display name of anime and its poster.
its uses an api for data and displays its on html.

document.addEventListener('DOMContentLoaded', function () {
  fetch('https://random-api.xyz/api/anime/random')
    .then(response => response.json())
    .then(data => {
      const apiDataElement = document.getElementById('apiData');
      const apimediaElement = document.getElementById('apimedia');
      apiDataElement.textContent = data.results[0].title;
      apimediaElement.src = data.results[0].poster;
      console.log(data);
    })
    .catch(error => {
      console.error('Error fetching API data:', error);
    });
});

Inventory

API used in app - Random-api

Fonts - Google Fonts

Preview

About

an card which display name of anime and its poster.

https://abhay557.github.io/anime-card/

License:MIT License


Languages

Language:CSS 39.3%Language:HTML 32.2%Language:JavaScript 28.5%