Added base elements
This commit is contained in:
parent
eba507a6e1
commit
aa6f87f4b4
9 changed files with 2682 additions and 0 deletions
BIN
assets/saoul.png
Normal file
BIN
assets/saoul.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.9 MiB |
1
components/navbar.html
Normal file
1
components/navbar.html
Normal file
|
@ -0,0 +1 @@
|
|||
<p>Saul Bon Monsieur</p>
|
4
css/saoulbonmonsieur.css
Normal file
4
css/saoulbonmonsieur.css
Normal file
|
@ -0,0 +1,4 @@
|
|||
.test {
|
||||
width: 15%;
|
||||
height: 15%;
|
||||
}
|
21
index.html
Normal file
21
index.html
Normal 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
16
js/componentloader.js
Normal 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
10
js/index.js
Normal 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
1310
lib/anime.es.js
Normal file
File diff suppressed because it is too large
Load diff
1312
lib/anime.js
Normal file
1312
lib/anime.js
Normal file
File diff suppressed because it is too large
Load diff
8
lib/anime.min.js
vendored
Normal file
8
lib/anime.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
Add table
Reference in a new issue