View open issues on index.html
This commit is contained in:
parent
7406dd09af
commit
f5b74ebd36
40
index.html
40
index.html
|
|
@ -14,7 +14,40 @@
|
|||
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#000000">
|
||||
<meta name="msapplication-TileColor" content="#2b5797">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
<script>
|
||||
async function getIssues() {
|
||||
let response = await fetch("https://benjamin.stadlbauer.wien/git/api/v1/repos/Benjamin/personal-website/issues?state=open", {
|
||||
headers: {
|
||||
"Accept": "application/json"
|
||||
}
|
||||
});
|
||||
|
||||
return await response.json();
|
||||
}
|
||||
async function fillIssues() {
|
||||
let issues = [];
|
||||
|
||||
try {
|
||||
issues = await getIssues();
|
||||
let ul = document.getElementById("issues");
|
||||
|
||||
issues.forEach(issue => {
|
||||
let li = document.createElement("li");
|
||||
li.appendChild(document.createTextNode(issue.title));
|
||||
ul.appendChild(li);
|
||||
})
|
||||
} catch (ex) {
|
||||
console.warn("Could not fetch open issues via API");
|
||||
console.warn(ex);
|
||||
document.getElementById("open_issues_p").remove()
|
||||
document.getElementById("issues").remove()
|
||||
}
|
||||
}
|
||||
|
||||
window.onload = (event) => {
|
||||
fillIssues();
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
|
@ -29,7 +62,7 @@
|
|||
<main>
|
||||
<h1>Benjamin’s Website</h1>
|
||||
<p>Welcome to my website which is still under construction.</p>
|
||||
<p>I am currently working on the <a href="cv.html">curriculum vitae</a> part of the website, where one will find
|
||||
<p>I finished updating my <a href="cv.html">curriculum vitae</a> part of the website, where one will find
|
||||
some information about my professional background.</p>
|
||||
<p>I will of course invest more time into this website
|
||||
<ul>
|
||||
|
|
@ -37,6 +70,11 @@
|
|||
<li>to make it more accessible.</li>
|
||||
</ul>
|
||||
</p>
|
||||
<p id="open_issues_p">
|
||||
These are the open issues for my website:
|
||||
<ul id="issues">
|
||||
</ul>
|
||||
</p>
|
||||
<footer>
|
||||
<h2>About this website</h2>
|
||||
<p>I started this website as a pet-project
|
||||
|
|
|
|||
Loading…
Reference in a new issue