Added base elements

This commit is contained in:
Yohan Boujon 2023-06-18 16:12:32 +02:00
parent eba507a6e1
commit aa6f87f4b4
9 changed files with 2682 additions and 0 deletions

BIN
assets/saoul.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 MiB

1
components/navbar.html Normal file
View file

@ -0,0 +1 @@
<p>Saul Bon Monsieur</p>

4
css/saoulbonmonsieur.css Normal file
View file

@ -0,0 +1,4 @@
.test {
width: 15%;
height: 15%;
}

21
index.html Normal file
View file

@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<title>Saoul Bonmonsieur | Site Web Officiel</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<script src="lib/anime.min.js"></script>
<script src="js/componentloader.js"></script>
<link href="css/saoulbonmonsieur.css" rel="stylesheet">
</head>
<body>
<div id="navbar"></div>
<img class="test" src="assets/saoul.png"></img>
<button onclick="superAnim()">Animate !</button>
</body>
</html>
<script src="js/index.js"></script>

16
js/componentloader.js Normal file
View file

@ -0,0 +1,16 @@
function load(url, element) {
fetch(url).then(res => {
return res.text();
}).then(htmltext => {
element.innerHTML = htmltext;
}).catch(
function (err) {
console.warn('Could not load the Navbar.', err)
}
);
}
window.addEventListener('load', function () {
load("../components/navbar.html", document.getElementById("navbar"));
})

10
js/index.js Normal file
View file

@ -0,0 +1,10 @@
var carreAnim = anime({
targets: '.test',
autoplay: false,
translateX: 250,
});
function superAnim() {
carreAnim.restart();
carreAnim.anime();
}

1310
lib/anime.es.js Normal file

File diff suppressed because it is too large Load diff

1312
lib/anime.js Normal file

File diff suppressed because it is too large Load diff

8
lib/anime.min.js vendored Normal file

File diff suppressed because one or more lines are too long