modified code
This commit is contained in:
parent
b26d9f1bf8
commit
7e2bb9a22e
12
index.html
12
index.html
@ -4,7 +4,6 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>Riot App</title>
|
<title>Riot App</title>
|
||||||
<script src="https://cdn.tailwindcss.com"></script>
|
<script src="https://cdn.tailwindcss.com"></script>
|
||||||
<script type="javascript" src="model.js"></script>
|
|
||||||
</head>
|
</head>
|
||||||
<body class="bg-neutral-50">
|
<body class="bg-neutral-50">
|
||||||
|
|
||||||
@ -17,8 +16,17 @@
|
|||||||
<script type="javascript" src="./onzer.riot"></script>
|
<script type="javascript" src="./onzer.riot"></script>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<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.compile().then(() => {
|
||||||
riot.mount('onzer');
|
riot.mount('onzer', {
|
||||||
|
items : await fetch_data()
|
||||||
|
}
|
||||||
|
);
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
5
model.js
5
model.js
@ -1,5 +0,0 @@
|
|||||||
function getSongs(){
|
|
||||||
return fetch(`https://dwarves.iut-fbleau.fr/~fauvet/api/songs`).then(response => {
|
|
||||||
return response;
|
|
||||||
})
|
|
||||||
}
|
|
@ -34,7 +34,6 @@
|
|||||||
placeholder: "Rechercher dans les albums",
|
placeholder: "Rechercher dans les albums",
|
||||||
search: "albums"
|
search: "albums"
|
||||||
};
|
};
|
||||||
|
|
||||||
this.paintButton();
|
this.paintButton();
|
||||||
this.album_style = "isActivate";
|
this.album_style = "isActivate";
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user