mirror of
https://github.com/discourse/discourse.git
synced 2026-08-08 17:53:55 +08:00
This saves loading unnecessary bytes for non-staff users. Aligns with the existing core system for admin CSS. Also makes use of the feature for some obviously-admins-specific CSS files in gamification and ai plugins. More conversions are likely to come in follow-up commits.
33 lines
1.1 KiB
Text
Vendored
33 lines
1.1 KiB
Text
Vendored
<%= discourse_preload_color_scheme_stylesheets %>
|
|
|
|
<%- if rtl? %>
|
|
<%= discourse_stylesheet_preload_tag(:common_rtl) %>
|
|
<%= discourse_stylesheet_preload_tag(mobile_device? ? :mobile_rtl : :desktop_rtl) %>
|
|
<%- else %>
|
|
<%= discourse_stylesheet_preload_tag(:common) %>
|
|
<%= discourse_stylesheet_preload_tag(mobile_device? ? :mobile : :desktop) %>
|
|
<%- end %>
|
|
|
|
<%- if staff? %>
|
|
<%- if rtl? %>
|
|
<%= discourse_stylesheet_preload_tag(:admin_rtl) %>
|
|
<%- else %>
|
|
<%= discourse_stylesheet_preload_tag(:admin) %>
|
|
<%- end %>
|
|
<%- end %>
|
|
|
|
<%- if admin? %>
|
|
<%- if rtl? %>
|
|
<%= discourse_stylesheet_preload_tag(:wizard_rtl) %>
|
|
<%- else %>
|
|
<%= discourse_stylesheet_preload_tag(:wizard) %>
|
|
<%- end %>
|
|
<%- end %>
|
|
|
|
<%- Discourse.find_plugin_css_assets(include_official: allow_plugins?, include_unofficial: allow_third_party_plugins?, mobile_view: mobile_device?, desktop_view: !mobile_device?, include_admin: staff?, request: request, rtl: rtl?).each do |file| %>
|
|
<%= discourse_stylesheet_preload_tag(file) %>
|
|
<%- end %>
|
|
|
|
<%- if theme_id.present? %>
|
|
<%= discourse_stylesheet_preload_tag(mobile_device? ? :mobile_theme : :desktop_theme) %>
|
|
<%- end %>
|