create new branch

This commit is contained in:
2024-06-25 00:14:10 +02:00
parent 9570e3d1ae
commit 4c9af83342
2 changed files with 91 additions and 94 deletions

View File

@@ -1,31 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Riot App</title>
<script src="https://cdn.tailwindcss.com"></script>
</head>
<head>
<meta charset="utf-8">
<title>Riot App</title>
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body class="bg-neutral-50">
<onzer></onzer>
<onzer></onzer>
<script src="https://unpkg.com/animore/animore.js"></script>
<script src="https://unpkg.com/riot@9/riot+compiler.min.js"></script>
<script src="https://unpkg.com/animore/animore.js"></script>
<script src="https://unpkg.com/riot@9/riot+compiler.min.js"></script>
<script type="riot" src="./onzer.riot"></script>
<script type="javascript" src="./onzer.riot"></script>
<script type="riot" src="./onzer.riot"></script>
<script type="text/javascript">
function fetch_data(){
return fetch("https://dwarves.iut-fbleau.fr/~fauvet/api/albums").then(response => {
return response.json();
} )
}
<script type="text/javascript">
async function fetch_data() {
return fetch("https://dwarves.iut-fbleau.fr/~fauvet/api/albums").then(response => {
return response.json();
});
}
riot.compile().then(() => {
riot.mount('onzer', {items: fetch_data()});
})
</script>
riot.compile().then(async () => {
const data = await fetch_data();
riot.mount('onzer', { items: data });
});
</script>
</body>
</html>