Skip to content

Commit

Permalink
New pagination arrow buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
Aemiii91 committed May 18, 2024
1 parent 0fa3973 commit 6b20daf
Show file tree
Hide file tree
Showing 23 changed files with 121 additions and 86 deletions.
3 changes: 3 additions & 0 deletions .github/defs.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ def rel_path(path: str, from_path: str) -> str:

PREVIEW_ICON = f"<img src=\"{HAS_ICONPACK_ICON_URL}\" height=\"16\" title=\"Show full preview\">"

PREV_PAGE_ICON_URL = "https://github.com/OnionUI/Themes/assets/44569252/fb1e949d-00a9-47d2-ad8b-cf273dbcf1bd"
NEXT_PAGE_ICON_URL = "https://github.com/OnionUI/Themes/assets/44569252/a0717376-2b5b-4534-9eba-4d2d3961f06b"

NB_SPACE = "&nbsp;"
NB_SPACER = NB_SPACE * 2
LB_SPACER = " " + NB_SPACE
Expand Down
6 changes: 3 additions & 3 deletions .github/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,10 @@ def generate_pagination(current_page: int, num_pages: int) -> str:
buffer = ""
buffer += """---\n\n<table align="center"><tr>"""
if current_page > 0:
buffer += f"""<td align="right">\n\n[{NB_SPACER}PREV]({format_page_filename(current_page - 1, num_pages)})\n\n</td>"""
buffer += f"""<td align="center">\n\n{generate_page_links(current_page, num_pages)}\n\n</td>"""
buffer += f"""<td align="right" valign="middle">\n\n[![Previous page]({PREV_PAGE_ICON_URL})]({format_page_filename(current_page - 1, num_pages)})\n\n</td>"""
buffer += f"""<td align="center" valign="middle">\n\n{generate_page_links(current_page, num_pages)}\n\n</td>"""
if current_page < num_pages - 1:
buffer += f"<td>\n\n[NEXT{NB_SPACER}]({format_page_filename(current_page + 1, num_pages)})\n\n</td>"
buffer += f"""<td valign="middle">\n\n[![Next page]({NEXT_PAGE_ICON_URL})]({format_page_filename(current_page + 1, num_pages)})\n\n</td>"""
buffer += "</tr></table>"
return buffer

Expand Down
16 changes: 16 additions & 0 deletions .github/template/index.template.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,29 @@ $THEMES_NEW

<p>&nbsp;</p>

<table align="center"><td>

[SHOW ALL THEMES](generated/custom/index.md)

</td></table>

<p>&nbsp;</p>


## Recently Updated Themes

$THEMES_RECENTS

<p>&nbsp;</p>

<table align="center"><td>

[SHOW ALL THEMES](generated/custom/index.md)

</td></table>

<p>&nbsp;</p>


## How to Install

Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,14 @@ Do you want to share your own custom themes with the community? <sup><sub>❤️
</tr></table>


<p>&nbsp;</p>

<table align="center"><td>

[SHOW ALL THEMES](generated/custom/index.md)

</td></table>

<p>&nbsp;</p>


Expand Down Expand Up @@ -178,6 +186,14 @@ Do you want to share your own custom themes with the community? <sup><sub>❤️
</tr></table>


<p>&nbsp;</p>

<table align="center"><td>

[SHOW ALL THEMES](generated/custom/index.md)

</td></table>

<p>&nbsp;</p>


Expand Down
6 changes: 3 additions & 3 deletions generated/custom/index-01-79.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,11 @@

---

<table align="center"><tr><td align="right">
<table align="center"><tr><td align="right" valign="middle">

[&nbsp;&nbsp;PREV](index-02-6b.md)
[![Previous page](https://github.com/OnionUI/Themes/assets/44569252/fb1e949d-00a9-47d2-ad8b-cf273dbcf1bd)](index-02-6b.md)

</td><td align="center">
</td><td align="center" valign="middle">

[&nbsp;1&nbsp;](index.md)&nbsp;&hellip; [&nbsp;7&nbsp;](index-07-fc.md) [&nbsp;8&nbsp;](index-06-21.md) [&nbsp;9&nbsp;](index-05-2a.md) [&nbsp;10&nbsp;](index-04-d8.md) [&nbsp;11&nbsp;](index-03-11.md) [&nbsp;12&nbsp;](index-02-6b.md) &nbsp;**13**&nbsp;

Expand Down
10 changes: 5 additions & 5 deletions generated/custom/index-02-6b.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,16 +210,16 @@

---

<table align="center"><tr><td align="right">
<table align="center"><tr><td align="right" valign="middle">

[&nbsp;&nbsp;PREV](index-03-11.md)
[![Previous page](https://github.com/OnionUI/Themes/assets/44569252/fb1e949d-00a9-47d2-ad8b-cf273dbcf1bd)](index-03-11.md)

</td><td align="center">
</td><td align="center" valign="middle">

[&nbsp;1&nbsp;](index.md)&nbsp;&hellip; [&nbsp;7&nbsp;](index-07-fc.md) [&nbsp;8&nbsp;](index-06-21.md) [&nbsp;9&nbsp;](index-05-2a.md) [&nbsp;10&nbsp;](index-04-d8.md) [&nbsp;11&nbsp;](index-03-11.md) &nbsp;**12**&nbsp; [&nbsp;13&nbsp;](index-01-79.md)

</td><td>
</td><td valign="middle">

[NEXT&nbsp;&nbsp;](index-01-79.md)
[![Next page](https://github.com/OnionUI/Themes/assets/44569252/a0717376-2b5b-4534-9eba-4d2d3961f06b)](index-01-79.md)

</td></tr></table>
10 changes: 5 additions & 5 deletions generated/custom/index-03-11.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,16 +210,16 @@

---

<table align="center"><tr><td align="right">
<table align="center"><tr><td align="right" valign="middle">

[&nbsp;&nbsp;PREV](index-04-d8.md)
[![Previous page](https://github.com/OnionUI/Themes/assets/44569252/fb1e949d-00a9-47d2-ad8b-cf273dbcf1bd)](index-04-d8.md)

</td><td align="center">
</td><td align="center" valign="middle">

[&nbsp;1&nbsp;](index.md)&nbsp;&hellip; [&nbsp;7&nbsp;](index-07-fc.md) [&nbsp;8&nbsp;](index-06-21.md) [&nbsp;9&nbsp;](index-05-2a.md) [&nbsp;10&nbsp;](index-04-d8.md) &nbsp;**11**&nbsp; [&nbsp;12&nbsp;](index-02-6b.md) [&nbsp;13&nbsp;](index-01-79.md)

</td><td>
</td><td valign="middle">

[NEXT&nbsp;&nbsp;](index-02-6b.md)
[![Next page](https://github.com/OnionUI/Themes/assets/44569252/a0717376-2b5b-4534-9eba-4d2d3961f06b)](index-02-6b.md)

</td></tr></table>
10 changes: 5 additions & 5 deletions generated/custom/index-04-d8.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,16 +210,16 @@

---

<table align="center"><tr><td align="right">
<table align="center"><tr><td align="right" valign="middle">

[&nbsp;&nbsp;PREV](index-05-2a.md)
[![Previous page](https://github.com/OnionUI/Themes/assets/44569252/fb1e949d-00a9-47d2-ad8b-cf273dbcf1bd)](index-05-2a.md)

</td><td align="center">
</td><td align="center" valign="middle">

[&nbsp;1&nbsp;](index.md)&nbsp;&hellip; [&nbsp;7&nbsp;](index-07-fc.md) [&nbsp;8&nbsp;](index-06-21.md) [&nbsp;9&nbsp;](index-05-2a.md) &nbsp;**10**&nbsp; [&nbsp;11&nbsp;](index-03-11.md) [&nbsp;12&nbsp;](index-02-6b.md) [&nbsp;13&nbsp;](index-01-79.md)

</td><td>
</td><td valign="middle">

[NEXT&nbsp;&nbsp;](index-03-11.md)
[![Next page](https://github.com/OnionUI/Themes/assets/44569252/a0717376-2b5b-4534-9eba-4d2d3961f06b)](index-03-11.md)

</td></tr></table>
10 changes: 5 additions & 5 deletions generated/custom/index-05-2a.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,16 +210,16 @@

---

<table align="center"><tr><td align="right">
<table align="center"><tr><td align="right" valign="middle">

[&nbsp;&nbsp;PREV](index-06-21.md)
[![Previous page](https://github.com/OnionUI/Themes/assets/44569252/fb1e949d-00a9-47d2-ad8b-cf273dbcf1bd)](index-06-21.md)

</td><td align="center">
</td><td align="center" valign="middle">

[&nbsp;1&nbsp;](index.md)&nbsp;&hellip; [&nbsp;7&nbsp;](index-07-fc.md) [&nbsp;8&nbsp;](index-06-21.md) &nbsp;**9**&nbsp; [&nbsp;10&nbsp;](index-04-d8.md) [&nbsp;11&nbsp;](index-03-11.md) [&nbsp;12&nbsp;](index-02-6b.md) [&nbsp;13&nbsp;](index-01-79.md)

</td><td>
</td><td valign="middle">

[NEXT&nbsp;&nbsp;](index-04-d8.md)
[![Next page](https://github.com/OnionUI/Themes/assets/44569252/a0717376-2b5b-4534-9eba-4d2d3961f06b)](index-04-d8.md)

</td></tr></table>
10 changes: 5 additions & 5 deletions generated/custom/index-06-21.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,16 +210,16 @@

---

<table align="center"><tr><td align="right">
<table align="center"><tr><td align="right" valign="middle">

[&nbsp;&nbsp;PREV](index-07-fc.md)
[![Previous page](https://github.com/OnionUI/Themes/assets/44569252/fb1e949d-00a9-47d2-ad8b-cf273dbcf1bd)](index-07-fc.md)

</td><td align="center">
</td><td align="center" valign="middle">

[&nbsp;1&nbsp;](index.md)&nbsp;&hellip; &nbsp;[&nbsp;6&nbsp;](index-08-bc.md) [&nbsp;7&nbsp;](index-07-fc.md) &nbsp;**8**&nbsp; [&nbsp;9&nbsp;](index-05-2a.md) [&nbsp;10&nbsp;](index-04-d8.md) &hellip;&nbsp;[&nbsp;13&nbsp;](index-01-79.md)

</td><td>
</td><td valign="middle">

[NEXT&nbsp;&nbsp;](index-05-2a.md)
[![Next page](https://github.com/OnionUI/Themes/assets/44569252/a0717376-2b5b-4534-9eba-4d2d3961f06b)](index-05-2a.md)

</td></tr></table>
10 changes: 5 additions & 5 deletions generated/custom/index-07-fc.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,16 +210,16 @@

---

<table align="center"><tr><td align="right">
<table align="center"><tr><td align="right" valign="middle">

[&nbsp;&nbsp;PREV](index-08-bc.md)
[![Previous page](https://github.com/OnionUI/Themes/assets/44569252/fb1e949d-00a9-47d2-ad8b-cf273dbcf1bd)](index-08-bc.md)

</td><td align="center">
</td><td align="center" valign="middle">

[&nbsp;1&nbsp;](index.md)&nbsp;&hellip; &nbsp;[&nbsp;5&nbsp;](index-09-9d.md) [&nbsp;6&nbsp;](index-08-bc.md) &nbsp;**7**&nbsp; [&nbsp;8&nbsp;](index-06-21.md) [&nbsp;9&nbsp;](index-05-2a.md) &hellip;&nbsp;[&nbsp;13&nbsp;](index-01-79.md)

</td><td>
</td><td valign="middle">

[NEXT&nbsp;&nbsp;](index-06-21.md)
[![Next page](https://github.com/OnionUI/Themes/assets/44569252/a0717376-2b5b-4534-9eba-4d2d3961f06b)](index-06-21.md)

</td></tr></table>
10 changes: 5 additions & 5 deletions generated/custom/index-08-bc.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,16 +210,16 @@

---

<table align="center"><tr><td align="right">
<table align="center"><tr><td align="right" valign="middle">

[&nbsp;&nbsp;PREV](index-09-9d.md)
[![Previous page](https://github.com/OnionUI/Themes/assets/44569252/fb1e949d-00a9-47d2-ad8b-cf273dbcf1bd)](index-09-9d.md)

</td><td align="center">
</td><td align="center" valign="middle">

[&nbsp;1&nbsp;](index.md)&nbsp;&hellip; &nbsp;[&nbsp;4&nbsp;](index-10-be.md) [&nbsp;5&nbsp;](index-09-9d.md) &nbsp;**6**&nbsp; [&nbsp;7&nbsp;](index-07-fc.md) [&nbsp;8&nbsp;](index-06-21.md) &hellip;&nbsp;[&nbsp;13&nbsp;](index-01-79.md)

</td><td>
</td><td valign="middle">

[NEXT&nbsp;&nbsp;](index-07-fc.md)
[![Next page](https://github.com/OnionUI/Themes/assets/44569252/a0717376-2b5b-4534-9eba-4d2d3961f06b)](index-07-fc.md)

</td></tr></table>
10 changes: 5 additions & 5 deletions generated/custom/index-09-9d.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,16 +210,16 @@

---

<table align="center"><tr><td align="right">
<table align="center"><tr><td align="right" valign="middle">

[&nbsp;&nbsp;PREV](index-10-be.md)
[![Previous page](https://github.com/OnionUI/Themes/assets/44569252/fb1e949d-00a9-47d2-ad8b-cf273dbcf1bd)](index-10-be.md)

</td><td align="center">
</td><td align="center" valign="middle">

[&nbsp;1&nbsp;](index.md) [&nbsp;2&nbsp;](index-12-ca.md) [&nbsp;3&nbsp;](index-11-8c.md) [&nbsp;4&nbsp;](index-10-be.md) &nbsp;**5**&nbsp; [&nbsp;6&nbsp;](index-08-bc.md) [&nbsp;7&nbsp;](index-07-fc.md) &hellip;&nbsp;[&nbsp;13&nbsp;](index-01-79.md)

</td><td>
</td><td valign="middle">

[NEXT&nbsp;&nbsp;](index-08-bc.md)
[![Next page](https://github.com/OnionUI/Themes/assets/44569252/a0717376-2b5b-4534-9eba-4d2d3961f06b)](index-08-bc.md)

</td></tr></table>
10 changes: 5 additions & 5 deletions generated/custom/index-10-be.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,16 +210,16 @@

---

<table align="center"><tr><td align="right">
<table align="center"><tr><td align="right" valign="middle">

[&nbsp;&nbsp;PREV](index-11-8c.md)
[![Previous page](https://github.com/OnionUI/Themes/assets/44569252/fb1e949d-00a9-47d2-ad8b-cf273dbcf1bd)](index-11-8c.md)

</td><td align="center">
</td><td align="center" valign="middle">

[&nbsp;1&nbsp;](index.md) [&nbsp;2&nbsp;](index-12-ca.md) [&nbsp;3&nbsp;](index-11-8c.md) &nbsp;**4**&nbsp; [&nbsp;5&nbsp;](index-09-9d.md) [&nbsp;6&nbsp;](index-08-bc.md) [&nbsp;7&nbsp;](index-07-fc.md) &hellip;&nbsp;[&nbsp;13&nbsp;](index-01-79.md)

</td><td>
</td><td valign="middle">

[NEXT&nbsp;&nbsp;](index-09-9d.md)
[![Next page](https://github.com/OnionUI/Themes/assets/44569252/a0717376-2b5b-4534-9eba-4d2d3961f06b)](index-09-9d.md)

</td></tr></table>
10 changes: 5 additions & 5 deletions generated/custom/index-11-8c.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,16 +210,16 @@

---

<table align="center"><tr><td align="right">
<table align="center"><tr><td align="right" valign="middle">

[&nbsp;&nbsp;PREV](index-12-ca.md)
[![Previous page](https://github.com/OnionUI/Themes/assets/44569252/fb1e949d-00a9-47d2-ad8b-cf273dbcf1bd)](index-12-ca.md)

</td><td align="center">
</td><td align="center" valign="middle">

[&nbsp;1&nbsp;](index.md) [&nbsp;2&nbsp;](index-12-ca.md) &nbsp;**3**&nbsp; [&nbsp;4&nbsp;](index-10-be.md) [&nbsp;5&nbsp;](index-09-9d.md) [&nbsp;6&nbsp;](index-08-bc.md) [&nbsp;7&nbsp;](index-07-fc.md) &hellip;&nbsp;[&nbsp;13&nbsp;](index-01-79.md)

</td><td>
</td><td valign="middle">

[NEXT&nbsp;&nbsp;](index-10-be.md)
[![Next page](https://github.com/OnionUI/Themes/assets/44569252/a0717376-2b5b-4534-9eba-4d2d3961f06b)](index-10-be.md)

</td></tr></table>
10 changes: 5 additions & 5 deletions generated/custom/index-12-ca.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,16 +210,16 @@

---

<table align="center"><tr><td align="right">
<table align="center"><tr><td align="right" valign="middle">

[&nbsp;&nbsp;PREV](index.md)
[![Previous page](https://github.com/OnionUI/Themes/assets/44569252/fb1e949d-00a9-47d2-ad8b-cf273dbcf1bd)](index.md)

</td><td align="center">
</td><td align="center" valign="middle">

[&nbsp;1&nbsp;](index.md) &nbsp;**2**&nbsp; [&nbsp;3&nbsp;](index-11-8c.md) [&nbsp;4&nbsp;](index-10-be.md) [&nbsp;5&nbsp;](index-09-9d.md) [&nbsp;6&nbsp;](index-08-bc.md) [&nbsp;7&nbsp;](index-07-fc.md) &hellip;&nbsp;[&nbsp;13&nbsp;](index-01-79.md)

</td><td>
</td><td valign="middle">

[NEXT&nbsp;&nbsp;](index-11-8c.md)
[![Next page](https://github.com/OnionUI/Themes/assets/44569252/a0717376-2b5b-4534-9eba-4d2d3961f06b)](index-11-8c.md)

</td></tr></table>
6 changes: 3 additions & 3 deletions generated/custom/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,12 @@

---

<table align="center"><tr><td align="center">
<table align="center"><tr><td align="center" valign="middle">

&nbsp;**1**&nbsp; [&nbsp;2&nbsp;](index-12-ca.md) [&nbsp;3&nbsp;](index-11-8c.md) [&nbsp;4&nbsp;](index-10-be.md) [&nbsp;5&nbsp;](index-09-9d.md) [&nbsp;6&nbsp;](index-08-bc.md) [&nbsp;7&nbsp;](index-07-fc.md) &hellip;&nbsp;[&nbsp;13&nbsp;](index-01-79.md)

</td><td>
</td><td valign="middle">

[NEXT&nbsp;&nbsp;](index-12-ca.md)
[![Next page](https://github.com/OnionUI/Themes/assets/44569252/a0717376-2b5b-4534-9eba-4d2d3961f06b)](index-12-ca.md)

</td></tr></table>
6 changes: 3 additions & 3 deletions generated/icons_themes/index-01-79.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,11 @@

---

<table align="center"><tr><td align="right">
<table align="center"><tr><td align="right" valign="middle">

[&nbsp;&nbsp;PREV](index-02-6b.md)
[![Previous page](https://github.com/OnionUI/Themes/assets/44569252/fb1e949d-00a9-47d2-ad8b-cf273dbcf1bd)](index-02-6b.md)

</td><td align="center">
</td><td align="center" valign="middle">

[&nbsp;1&nbsp;](index.md) [&nbsp;2&nbsp;](index-03-11.md) [&nbsp;3&nbsp;](index-02-6b.md) &nbsp;**4**&nbsp;

Expand Down
Loading

0 comments on commit 6b20daf

Please sign in to comment.