SAE_RIOT_2024/index.html

36 lines
794 B
HTML
Raw Normal View History

2024-06-20 15:08:44 +02:00
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Riot App</title>
2024-06-20 16:46:54 +02:00
<script src="https://cdn.tailwindcss.com"></script>
2024-06-20 15:08:44 +02:00
</head>
2024-06-21 00:21:46 +02:00
<body class="bg-neutral-50">
2024-06-20 15:08:44 +02:00
<onzer></onzer>
<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>
2024-06-21 00:21:46 +02:00
<script type="javascript" src="./onzer.riot"></script>
2024-06-20 15:08:44 +02:00
<script type="text/javascript">
2024-06-21 14:48:38 +02:00
function fetch_data(){
2024-06-21 14:32:31 +02:00
return fetch("https://dwarves.iut-fbleau.fr/~fauvet/api/albums").then(response => {
return response.json();
} )
}
2024-06-21 14:48:38 +02:00
async function wait_data(){
return await this.fetch_data()
}
2024-06-20 15:08:44 +02:00
riot.compile().then(() => {
2024-06-21 14:55:23 +02:00
riot.mount('onzer', {items: wait_data()});
2024-06-20 15:08:44 +02:00
})
</script>
</body>
</html>