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

Commit

Permalink
1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ynssenem committed Apr 18, 2021
1 parent 3994574 commit 519f388
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 20 deletions.
15 changes: 13 additions & 2 deletions app/views/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ import "../../assets/less/theme.less";
window.addEventListener("load", () => {
UIkit.use(Icons);

var options = {
cls: "uk-animation-fade",
delay: 400,
repeat: true,
};
UIkit.scrollspy(".uk-navbar", options);
UIkit.scrollspy("footer", options);
UIkit.scrollspy(".uk-section", options);
UIkit.scrollspy(".tm-animation-item", options);
UIkit.scrollspy(".uk-article", options);
UIkit.scrollspy(".uk-navbar-container", options);

const aElements = document.getElementsByTagName("a");

for (let index = 0; index < aElements.length; index++) {
Expand All @@ -14,10 +26,9 @@ window.addEventListener("load", () => {
var bodyElement = document.getElementById("isbody");
bodyElement.classList.add("uk-animation-reverse");
bodyElement.classList.add("uk-animation-fade");
//bodyElement.classList.add("uk-animation-fast");
setTimeout(() => {
window.location = event.target.href;
}, 200);
}, 1000);
}
});
}
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.0",
"version": "1.0.1",
"title": "MyBlog",
"description": "A simple theme that will allow you to share your blogs with people",
"license": "MIT",
Expand Down
4 changes: 2 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
],

"positions" => [
"navbar" => "Navbar Items",
"navbar-vertical" => "Navbar Vertical",
"navbar" => "Navbar Right",
"navbar-vertical" => "Navbar Left",
"top" => "Top",
"sidebar" => "Sidebar",
"bottom" => "Bottom",
Expand Down
13 changes: 11 additions & 2 deletions views/blog/post.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,25 @@
</ul>
</div>
</div>

<div>
<ul uk-grid>
<li><a href="https://www.linkedin.com/shareArticle?url=<?= $view->url("@blog/id", ["id" => $post->id], 0) ?>
" target="_blank" uk-icon="linkedin"></a></li>
<li><a href="https://twitter.com/intent/tweet?text=<?= $post->title . " " . $view->url("@blog/id", ["id" => $post->id], 0) ?>" target="_blank" uk-icon="twitter"></a></li>
<li><a href="mailto:?body=<?= $post->title . " " . $view->url("@blog/id", ["id" => $post->id], 0) ?>"uk-icon="mail"></a></li>
</ul>
</div>

<h1 class="uk-heading-small uk-text-bold uk-margin"><a class="uk-link-reset" href="<?= $view->url("@blog/id", ["id" => $post->id]) ?>"><?= $post->title ?></a></h1>
<h1 class="uk-heading-small uk-text-bold uk-margin"><?= $post->title ?></h1>

<?php if ($post->excerpt): ?>
<div class="uk-margin tm-text"><?= $post->excerpt ?></div>
<?php endif; ?>
</div>

<?php if ($image = $post->get("image.src")): ?>
<a class="uk-display-block uk-margin-large" href="<?= $view->url("@blog/id", ["id" => $post->id]) ?>"><img src="<?= $image ?>" alt="<?= $post->get("image.alt") ?>" width="100%"></a>
<img src="<?= $image ?>" alt="<?= $post->get("image.alt") ?>" width="100%">
<?php endif; ?>

<div class="uk-container uk-container-xsmall uk-margin">
Expand Down
13 changes: 0 additions & 13 deletions views/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,19 +145,6 @@
<?php if ($view->position()->exists("footer")): ?>
<?= $view->position("footer", "positions/position-default.php") ?>
<?php endif; ?>

<script>
var options = {
cls: "uk-animation-fade",
delay: 400,
repeat: true,
};
UIkit.scrollspy("body", options);
UIkit.scrollspy(".uk-navbar", options);
UIkit.scrollspy(".tm-animation-item", options);
UIkit.scrollspy(".uk-article", options);
UIkit.scrollspy(".uk-navbar-container", options);
</script>
<?php $view->render("footer"); ?>
</body>
</html>

0 comments on commit 519f388

Please sign in to comment.