{"size": 987, "ext": "js", "max_stars_repo_path": "src/js/htmlBuilder.js", "max_stars_repo_name": "b-zuj/spa-gallery-frontend", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/js/htmlBuilder.js", "max_issues_repo_name": "b-zuj/spa-gallery-frontend", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/js/htmlBuilder.js", "max_forks_repo_name": "b-zuj/spa-gallery-frontend", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 28.2, "max_line_length": 67, "alphanum_fraction": 0.6909827761}
export default (data, container) => {
  const containerElement = container;
  if (containerElement.innerHTML !== '') {
    containerElement.innerHTML = '';
  }

  let html = '';
  data.forEach(picture => {
    const article = document.createElement('article');
    article.classList.add('card');

    const innerCard = document.createElement('div');
    innerCard.classList.add('flipcard-inner');

    const cardFront = document.createElement('div');
    cardFront.classList.add('flipcard-front');
    cardFront.style.backgroundImage = `url(${picture.urls.small})`;

    const cardBack = document.createElement('div');
    cardBack.classList.add('flipcard-back');

    const p = document.createElement('p');
    p.textContent = picture.alt_description;

    cardBack.appendChild(p);

    innerCard.appendChild(cardFront);
    innerCard.appendChild(cardBack);
    article.appendChild(innerCard);
    html += article.outerHTML;
  });
  containerElement.innerHTML = html;
  return html;
};
