Skip to content

Commit

Permalink
improve: skip locked article animation
Browse files Browse the repository at this point in the history
  • Loading branch information
KawaiiZapic committed Sep 5, 2024
1 parent 2770911 commit 69bb235
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
</div>
<div class="grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-3 grid-gap-4">
<?php while ($this->next()){ ?>
<mdui-card clickable="false" class="flex flex-col matecho-article-card">
<mdui-card clickable="false" class="flex flex-col matecho-article-card" <?php if($this->hidden) { ?> data-article-hidden <?php } ?> >
<a href="<?php $this->permalink(); ?>" title="<?php $this->title(); ?>" class="h-240px flex-shrink-0 block w-full bg-center bg-cover block" style="background-image: url('<?php Matecho::cover($this);?>')"></a>
<div class="matecho-article-card__meta pa-4 flex-grow-1">
<div class="text-sm mb-1 uppercase" style="color: rgb(var(--mdui-color-primary-light));">
Expand Down
3 changes: 3 additions & 0 deletions src/pages/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ export function init() {
document
.querySelectorAll("mdui-card.matecho-article-card")
.forEach(parent => {
if (parent.getAttribute("data-article-hidden") !== null) {
return;
}
parent.querySelectorAll("a[href]").forEach(href => {
href.addEventListener("click", () => {
const pSize = parent.getBoundingClientRect();
Expand Down

0 comments on commit 69bb235

Please sign in to comment.