feat: created footer and header in layout.njk

This commit is contained in:
Laureηt 2020-11-19 16:25:01 +01:00
parent fbac0713f7
commit d271d1c1c3
2 changed files with 33 additions and 4 deletions

View file

@ -1,3 +1,6 @@
---
---
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
@ -5,8 +8,38 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ title }}</title> <title>{{ title }}</title>
<link rel="stylesheet" href="/css/design.css"> <link rel="stylesheet" href="/css/design.css">
<script src="javascript/chaffle.min.js"></script>
</head> </head>
<body> <body>
<header>
<span data-chaffle-onload="", data-chaffle="en", style="width: 170px; display: block;">{{ username }}</span>
</header>
{{ content | safe }} {{ content | safe }}
<footer>
&copy; {% year %} {{ username }}
</footer>
<script>
var elements = document.querySelectorAll('[data-chaffle]');
var elm = document.querySelectorAll('[data-chaffle-onLoad]');
Array.prototype.forEach.call(elements, function (el) {
var chaffle = new Chaffle(el)
el.addEventListener('mouseover', function () {
chaffle.init();
});
});
Array.prototype.forEach.call(elm, function (el) {
var chaffle = new Chaffle(el, {
delay: 200
})
chaffle.init();
});
</script>
</body> </body>
</html> </html>

View file

@ -3,10 +3,6 @@ username: Laureηt
layout: layout.njk layout: layout.njk
--- ---
<header>
<span data-chaffle-onload="", data-chaffle="en", style="width: 170px; display: block;">{{ username }}</span>
</header>
<h1>whoami</h1> <h1>whoami</h1>
<p>Hi, my name's Laurent Fainsin, and I'm currently an L3 engineering student at <a href="https://www.enseeiht.fr/">ENSEEIHT</a> in France. I study Computer Science and this is my personnal ePortfolio to showcase my work. Here is my <a href="/cv.pdf">resume</a> if you are professionally interested.</p> <p>Hi, my name's Laurent Fainsin, and I'm currently an L3 engineering student at <a href="https://www.enseeiht.fr/">ENSEEIHT</a> in France. I study Computer Science and this is my personnal ePortfolio to showcase my work. Here is my <a href="/cv.pdf">resume</a> if you are professionally interested.</p>