workflow_launcher/renderer.js
2024-03-11 16:01:07 +01:00

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)
})
});