feat: implemented a "fade in" animation on every page

This commit is contained in:
Laureηt 2021-08-30 13:43:46 +02:00
parent 92b0652cda
commit 1eae4e9de7
No known key found for this signature in database
GPG key ID: D88C6B294FD40994
3 changed files with 65 additions and 37 deletions

View file

@ -23,21 +23,28 @@ username: Laureηt
{{ content | safe }}
<footer>
&copy; {% year %} {{ username }}
&copy; {% year %}
{{ username }}
</footer>
<script>
var elm_mouseover = document.querySelectorAll('[data-chaffle]');
var elm_onload = document.querySelectorAll('[data-chaffle-onLoad]');
Array.prototype.forEach.call(elm_mouseover, function (el) {
Array
.prototype
.forEach
.call(elm_mouseover, function (el) {
var chaffle = new Chaffle(el)
el.addEventListener('mouseover', function () {
chaffle.init();
});
});
Array.prototype.forEach.call(elm_onload, function (el) {
Array
.prototype
.forEach
.call(elm_onload, function (el) {
var chaffle = new Chaffle(el)
chaffle.init();
setInterval(function () {

View file

@ -30,21 +30,28 @@ username: Laureηt
</div>
<footer>
&copy; {% year %} {{ username }}
&copy; {% year %}
{{ username }}
</footer>
<script>
var elm_mouseover = document.querySelectorAll('[data-chaffle]');
var elm_onload = document.querySelectorAll('[data-chaffle-onLoad]');
Array.prototype.forEach.call(elm_mouseover, function (el) {
Array
.prototype
.forEach
.call(elm_mouseover, function (el) {
var chaffle = new Chaffle(el)
el.addEventListener('mouseover', function () {
chaffle.init();
});
});
Array.prototype.forEach.call(elm_onload, function (el) {
Array
.prototype
.forEach
.call(elm_onload, function (el) {
var chaffle = new Chaffle(el)
chaffle.init();
setInterval(function () {

View file

@ -14,6 +14,8 @@ body {
max-width: 40em;
margin: 0 auto;
padding: 1em;
animation: intro .3s both;
animation-delay: .15s;
}
body,
@ -89,6 +91,7 @@ footer {
body {
font-size: 17px;
}
ol,
ul {
padding-left: 17px;
@ -112,3 +115,14 @@ header>ul>li {
display: inline;
margin-right: .5em;
}
@keyframes intro {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}