Skip to content
This repository has been archived by the owner on Dec 26, 2023. It is now read-only.

Commit

Permalink
animation delay
Browse files Browse the repository at this point in the history
  • Loading branch information
ynssenem committed Apr 23, 2021
1 parent 519f388 commit 6df81f3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
9 changes: 7 additions & 2 deletions app/views/app.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import UIkit from "uikit";
import Icons from "../../node_modules/uikit/dist/js/uikit-icons";
import "../../assets/less/theme.less";

window.addEventListener("load", () => {
var bodyElement = document.getElementById("isbody");
bodyElement.style.display = "block";
UIkit.use(Icons);

var options = {
cls: "uk-animation-fade",
delay: 400,
delay: 300,
repeat: true,
};
UIkit.scrollspy(".uk-navbar", options);
Expand All @@ -15,7 +18,9 @@ window.addEventListener("load", () => {
UIkit.scrollspy(".tm-animation-item", options);
UIkit.scrollspy(".uk-article", options);
UIkit.scrollspy(".uk-navbar-container", options);
});

window.addEventListener("load", () => {
const aElements = document.getElementsByTagName("a");

for (let index = 0; index < aElements.length; index++) {
Expand All @@ -28,7 +33,7 @@ window.addEventListener("load", () => {
bodyElement.classList.add("uk-animation-fade");
setTimeout(() => {
window.location = event.target.href;
}, 1000);
}, 500);
}
});
}
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "greencheap/myblog",
"type": "greencheap-theme",
"version": "1.0.1",
"version": "1.0.2",
"title": "MyBlog",
"description": "A simple theme that will allow you to share your blogs with people",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion views/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<?= $view->render("head") ?>
<?php $view->script("theme", "theme:app/bundle/app.js"); ?>
</head>
<body id="isbody">
<body id="isbody" style="display: none">
<header class="uk-navbar-container uk-navbar-transparent">
<div class="uk-container" uk-navbar>
<div class="uk-navbar-left">
Expand Down

0 comments on commit 6df81f3

Please sign in to comment.