This repository has been archived on 2023-03-18. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
osr-discourse-src/app/assets/javascripts/discourse/app/index.html
T
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

51 lines
1.5 KiB
HTML

<!DOCTYPE html>
<bootstrap-content key="html-tag">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Discourse - Ember CLI</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, user-scalable=yes, viewport-fit=cover">
<bootstrap-content key="before-script-load">
{{content-for "before-script-load"}}
<bootstrap-content key="discourse-preload-stylesheets">
{{content-for "discourse-preload-stylesheets"}}
<script defer src="{{rootURL}}assets/vendor.js"></script>
<script defer src="{{rootURL}}assets/discourse.js"></script>
<ember-auto-import-scripts defer entrypoint="app"></ember-auto-import-scripts>
<bootstrap-content key="head">
{{content-for "head"}}
</head>
<body>
<discourse-assets>
<discourse-assets-stylesheets>
<bootstrap-content key="discourse-stylesheets">
{{content-for "discourse-stylesheets"}}
</discourse-assets-stylesheets>
<discourse-assets-json>
<bootstrap-content key="preloaded">
</discourse-assets-json>
<discourse-assets-icons></discourse-assets-icons>
</discourse-assets>
<bootstrap-content key="body">
{{content-for "body"}}
<section id='main'>
</section>
<bootstrap-content key="hidden-login-form">
<script defer src="{{rootURL}}assets/start-discourse.js"></script>
<bootstrap-content key="body-footer">
{{content-for "body-footer"}}
</body>
</html>