mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 09:26:54 -06:00
c2fcd55a80
Prior to this commit, we didn't have RTL versions of our admin and plugins CSS bundles and we always served LTR versions of those bundles even when users used an RTL locale, causing admin and plugins UI elements to never look as good as when an LTR locale was used. Example of UI issues prior to this commit were: missing margins, borders on the wrong side and buttons too close to each other etc. This commit creates an RTL version for the admin CSS bundle as well as RTL bundles for all the installed plugins and serves those RTL bundles to users/sites who use RTL locales.
32 lines
994 B
Plaintext
32 lines
994 B
Plaintext
<%= discourse_color_scheme_stylesheets %>
|
|
|
|
<%- if rtl? %>
|
|
<%= discourse_stylesheet_link_tag(mobile_view? ? :mobile_rtl : :desktop_rtl) %>
|
|
<%- else %>
|
|
<%= discourse_stylesheet_link_tag(mobile_view? ? :mobile : :desktop) %>
|
|
<%- end %>
|
|
|
|
<%- if staff? %>
|
|
<%- if rtl? %>
|
|
<%= discourse_stylesheet_link_tag(:admin_rtl) %>
|
|
<%- else %>
|
|
<%= discourse_stylesheet_link_tag(:admin) %>
|
|
<%- end %>
|
|
<%- end %>
|
|
|
|
<%- if admin? %>
|
|
<%- if rtl? %>
|
|
<%= discourse_stylesheet_link_tag(:wizard_rtl) %>
|
|
<%- else %>
|
|
<%= discourse_stylesheet_link_tag(:wizard) %>
|
|
<%- end %>
|
|
<%- end %>
|
|
|
|
<%- Discourse.find_plugin_css_assets(include_official: allow_plugins?, include_unofficial: allow_third_party_plugins?, mobile_view: mobile_view?, desktop_view: !mobile_view?, request: request, rtl: rtl?).each do |file| %>
|
|
<%= discourse_stylesheet_link_tag(file) %>
|
|
<%- end %>
|
|
|
|
<%- if theme_id.present? %>
|
|
<%= discourse_stylesheet_link_tag(mobile_view? ? :mobile_theme : :desktop_theme) %>
|
|
<%- end %>
|