discourse/app/helpers
Joe cfde4419f5
DEV: Preload CSS in the <head> (#17322)
This commit adds preload links for core/plugin/theme CSS stylesheets in the head.

Preload links are non-blocking and run in parallel. This means that they should have already been downloaded by the time we use the actual stylesheets (in the <body> tag).

Google is currently complaining about this here and this PR will address that warning.

This commit will also fix an issue in the splash screen where it sometimes doesn't respect the theme colors - causing a slightly jarring experience on dark themes.

Note that I opted not to add new specs because the underlying work required already has a lot of coverage. The new methods only change the output HTML so we can chuck that in the document <head>

This change also means that we can make all the stylesheets non-render blocking, but that will follow in a separate commit.
2022-07-05 00:23:09 +08:00
..
application_helper.rb DEV: Preload CSS in the <head> (#17322) 2022-07-05 00:23:09 +08:00
common_helper.rb FEATURE: Implement nonces for Google Tag Manager integration (#12531) 2021-03-26 11:19:31 -04:00
email_helper.rb FEATURE: Enables support for dark mode emails (#16520) 2022-04-20 13:00:04 -05:00
embed_helper.rb FIX: Display small post actions when embedding a topic (#9278) 2020-03-26 09:07:41 -03:00
emoji_helper.rb FEATURE: Render emojis on GitHub labels when oneboxing an issue. (#13531) 2021-06-25 14:48:36 -03:00
list_helper.rb DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
posts_helper.rb FEATURE: use canonical links in posts.rss feed (#16190) 2022-03-15 20:17:06 +11:00
qunit_helper.rb FIX: Defer scripts on theme-tests route (#17171) 2022-06-21 12:44:31 +08:00
topic_post_bookmarkable_helper.rb FIX: Use registered bookmarkables for BookmarkManager (#16695) 2022-05-11 09:51:03 +10:00
topics_helper.rb Improve support for old browsers (#9515) 2020-04-29 21:40:21 +03:00
user_notifications_helper.rb DEV: Correct typos and spelling mistakes (#12812) 2021-05-21 11:43:47 +10:00