19 lines
566 B
JavaScript
19 lines
566 B
JavaScript
|
const workflowsList = document.getElementById('workflows')
|
||
|
fetch('./workflows.json')
|
||
|
.then((response) => response.json())
|
||
|
.then((workflowsJson) => {
|
||
|
workflowsJson.workflows.forEach((site) => {
|
||
|
let li = document.createElement("li")
|
||
|
let img = document.createElement('img')
|
||
|
let a = document.createElement('a')
|
||
|
img.src = site.logo
|
||
|
img.alt = site.name
|
||
|
a.href = site.script
|
||
|
a.appendChild(img)
|
||
|
li.appendChild(a)
|
||
|
li.appendChild(document.createTextNode(site.name))
|
||
|
workflowsList.appendChild(li)
|
||
|
})
|
||
|
});
|
||
|
|