Skip to content

Commit

Permalink
Add icons back to blog posts list page
Browse files Browse the repository at this point in the history
Fixes #253
  • Loading branch information
Southpaw1496 committed Sep 16, 2024
1 parent 927d99a commit a145d89
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/components/setpieces/Paginator.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import PostEmbed from "@atoms/PostEmbed.astro";
import rtlSettings from "@data/RtlSettings";
import { localizePath } from "@util/Util";
import { t } from "i18next";
import { Icon } from "astro-icon/components"
const { page } = Astro.props;
const previousPage = page.currentPage - 1;
Expand Down Expand Up @@ -31,7 +32,7 @@ const { left, right } = rtlSettings();
disabled={onFirstPage}
href={!onFirstPage && localizePath("/blog/1")}
>
<span class="icon"><i class={`fas fa-angles-${left}`}></i></span>
<Icon name="mdi:chevron-double-left" />
<span class="is-hidden-mobile">{t("paginator-button-first")}</span>
</a>

Expand All @@ -41,7 +42,7 @@ const { left, right } = rtlSettings();
disabled={onFirstPage}
href={!onFirstPage && localizePath(`/blog/${previousPage}`)}
>
<span class="icon"><i class={`fas fa-angle-${left}`}></i></span>
<Icon name="mdi:chevron-left" />
<span class="is-hidden-mobile">{t("paginator-button-previous")}</span>
</a>

Expand Down Expand Up @@ -91,8 +92,8 @@ const { left, right } = rtlSettings();
disabled={onLastPage}
href={!onLastPage && localizePath(`/blog/${nextPage}`)}
>
<span class="icon"><i class={`fas fa-angle-${right}`}></i></span>
<span class="is-hidden-mobile">{t("paginator-button-next")}</span>
<Icon name="mdi:chevron-right" />
</a>

{/*@ts-ignore*/}
Expand All @@ -101,10 +102,17 @@ const { left, right } = rtlSettings();
disabled={onLastPage}
href={!onLastPage && localizePath(`/blog/${page.lastPage}`)}
>
<span class="icon"><i class={`fas fa-angles-${right}`}></i></span>
<span class="is-hidden-mobile">{t("paginator-button-last")}</span>
<Icon name="mdi:chevron-double-right" />
</a>
</nav>
</section>
</div>
</div>

<style>
[data-icon] {
width: 1.3em;
height: 1.3em
}
</style>

1 comment on commit a145d89

@Cozy-GitHub
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See preview on Cloudflare Pages: https://96e8f9e2.quiltmc-org.pages.dev

Please sign in to comment.