Skip to content

Commit

Permalink
Hide and show article icons on small screens
Browse files Browse the repository at this point in the history
  • Loading branch information
kizzandev committed Feb 11, 2024
1 parent 6d89e01 commit 8610b8a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ import { ViewTransitions } from 'astro:transitions';
if (!firstEl) continue;

firstEl.classList.add(
'w-[48px]',
'hidden',
'sm:block',
'sm:min-w-[84px]',
'sm:min-h-[84px]',
'rounded-md',
Expand All @@ -171,7 +172,7 @@ import { ViewTransitions } from 'astro:transitions';
`<img src="${s.getAttribute(
'data-article-icon',
)}" alt="${s.getAttribute('data-article-icon-alt')}"
class="w-[48px] sm:min-w-[84px] sm:min-h-[84px] rounded-md"
class="hidden sm:block sm:min-w-[84px] sm:min-h-[84px] rounded-md"
/>` + s.innerHTML;
}
});
Expand Down

0 comments on commit 8610b8a

Please sign in to comment.