Skip to content

Commit

Permalink
CLDR-17462 main CSS should be loaded in the bundle, not by Java.
Browse files Browse the repository at this point in the history
- move redesign.css and surveytool.css out of java printfs and into index.js
- this gives us the capability for minimization and reduces network loads
  • Loading branch information
srl295 committed May 30, 2024
1 parent 4a10a6c commit 005be9a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
2 changes: 2 additions & 0 deletions tools/cldr-apps/js/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
// global stylesheets
import "./css/cldrForum.css";
import "../../../cldr-code/src/main/resources/org/unicode/cldr/tool/reports.css";
import "../../../cldr-apps/src/main/webapp/surveytool.css";
import "../../../cldr-apps/src/main/webapp/css/redesign.css";

// module stylesheets need to go here. See cldrVue.mjs
// example: import 'someModule/dist/someModule.css'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,21 +209,12 @@ private void serveRunnningNormallyPage(

private void includeCss(HttpServletRequest request, PrintWriter out) {
final String contextPath = request.getContextPath();
final String cb = getCacheBustingExtension(request);
out.write(
"<link rel='stylesheet' href='" + contextPath + "/surveytool" + cb + ".css' />\n");
/*
* Note: cldrForum.css is loaded through webpack
*/
// bootstrap.min.css -- cf. bootstrap.min.js elsewhere in this file
out.write(
"<link rel='stylesheet' href='//stackpath.bootstrapcdn.com/bootswatch/3.1.1/spacelab/bootstrap.min.css' />\n");
out.write(
"<link rel='stylesheet' href='"
+ contextPath
+ "/css/redesign"
+ cb
+ ".css' />\n");
}

private static final String DD_CLIENT_TOKEN = System.getenv("DD_CLIENT_TOKEN");
Expand Down

0 comments on commit 005be9a

Please sign in to comment.