summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRadoslavL <rlelchev@abv.bg>2023-09-27 11:37:01 +0300
committerRadoslavL <rlelchev@abv.bg>2023-09-27 11:37:01 +0300
commit7fe2af735db9ee98b1b87b46224abf4429833b8a (patch)
tree207c2491c1266d7575589f13a580cf4730bc00c8 /src
parent905582db6684233645a05bca0094b597499cbbbb (diff)
downloadinvidious-7fe2af735db9ee98b1b87b46224abf4429833b8a.tar.gz
invidious-7fe2af735db9ee98b1b87b46224abf4429833b8a.tar.bz2
invidious-7fe2af735db9ee98b1b87b46224abf4429833b8a.zip
Included the check for RTL languages
Diffstat (limited to 'src')
-rw-r--r--src/invidious/frontend/pagination.cr17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/invidious/frontend/pagination.cr b/src/invidious/frontend/pagination.cr
index 85e588ff..40a9a62e 100644
--- a/src/invidious/frontend/pagination.cr
+++ b/src/invidious/frontend/pagination.cr
@@ -5,11 +5,20 @@ module Invidious::Frontend::Pagination
private def first_page(str : String::Builder, locale : String?, url : String)
str << %(<a href=") << url << %(" class="pure-button pure-button-secondary">)
+
+ if locale_is_rtl?(locale)
+ # Inverted arrow ("first" points to the right)
+ str << translate(locale, "First page")
+ str << "&nbsp;&nbsp;"
+ str << %(<i class="icon ion-ios-arrow-forward"></i>)
+ else
+ # Regular arrow ("first" points to the left)
+ str << %(<i class="icon ion-ios-arrow-back"></i>)
+ str << "&nbsp;&nbsp;"
+ str << translate(locale, "First page")
+ end
- str << translate(locale, "First page")
- str << "&nbsp;&nbsp;"
- str << %(<i class="icon ion-ios-arrow-back"></i>)
- str << "</a>"
+ str << "</a>"
end
private def previous_page(str : String::Builder, locale : String?, url : String)