{"size": 896, "ext": "js", "max_stars_repo_path": "static/js/view_logos.js", "max_stars_repo_name": "lukas-pilka/logoGenerator", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "static/js/view_logos.js", "max_issues_repo_name": "lukas-pilka/logoGenerator", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "static/js/view_logos.js", "max_forks_repo_name": "lukas-pilka/logoGenerator", "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": 30.8965517241, "max_line_length": 113, "alphanum_fraction": 0.6127232143}
const svgNS = "http://www.w3.org/2000/svg"


const companyNames = ["Pizzeria", "Pa", "Good Office", "Computeři"]
const template = document.getElementById("logo-wrapper-template")
const logosWrapper = document.getElementById("logos-wrapper")
const data = fetch("/get_logo_results?static=1", {
    method: "POST",
    credentials: 'same-origin',
    headers: {
        'Content-Type': 'application/json',
    },
    body: new FormData()
})
.then(response => response.json())
.then(logos => {
    logos.forEach((logo, index) => {
        fetch(`/svg/${logo.fontFamily.value}/${logo.initials.value ? companyNames[index] : companyNames[index]}`)
        .then(response => response.json())
        .then(data => {
            const path = document.createElementNS(svgNS, "path")
            path.setAttribute("d", data.svg)
            logo.svg = path
            buildLogo(logo)
        })
    })
})

