mirror of
https://github.com/tiennm99/cv-latex.git
synced 2026-08-06 22:42:07 +00:00
23 lines
688 B
HTML
23 lines
688 B
HTML
<html lang="vi">
|
|
<body>
|
|
<script>
|
|
const owner = `tiennm99`;
|
|
const repo = `cv`;
|
|
const url = `https://api.github.com/repos/${owner}/${repo}/contents/`;
|
|
fetch(url).then(response => {
|
|
if (!response.ok) {
|
|
throw new Error("HTTP error " + response.status);
|
|
}
|
|
return response.json();
|
|
}).then(data => {
|
|
let htmlString = "<ul>";
|
|
for (let file of data) {
|
|
htmlString += `<li><a href="${file.path}">${file.name}</a></li>`;
|
|
}
|
|
htmlString += "</ul>";
|
|
document.getElementsByTagName("body")[0].innerHTML = htmlString;
|
|
}).catch(error => console.error("Error:", error));
|
|
</script>
|
|
</body>
|
|
</html>
|