mirror of
https://github.com/iv-org/invidious.git
synced 2024-11-08 13:42:27 +05:30
Included the check for RTL languages
This commit is contained in:
parent
905582db66
commit
7fe2af735d
@ -5,11 +5,20 @@ module Invidious::Frontend::Pagination
|
|||||||
|
|
||||||
private def first_page(str : String::Builder, locale : String?, url : String)
|
private def first_page(str : String::Builder, locale : String?, url : String)
|
||||||
str << %(<a href=") << url << %(" class="pure-button pure-button-secondary">)
|
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 << " "
|
||||||
|
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 << " "
|
||||||
|
str << translate(locale, "First page")
|
||||||
|
end
|
||||||
|
|
||||||
str << translate(locale, "First page")
|
str << "</a>"
|
||||||
str << " "
|
|
||||||
str << %(<i class="icon ion-ios-arrow-back"></i>)
|
|
||||||
str << "</a>"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
private def previous_page(str : String::Builder, locale : String?, url : String)
|
private def previous_page(str : String::Builder, locale : String?, url : String)
|
||||||
|
Loading…
Reference in New Issue
Block a user