diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2018-09-18 19:14:49 +0100 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2018-09-19 16:19:26 +0100 |
commit | dbab04b94254aa121eb265748e19761adc2b0afb (patch) | |
tree | db013053085ee0a97f5ac13463b3326b400323c5 | |
parent | 354f0bccbf8d530fbb5a1eb2b3cea931c644cc59 (diff) | |
download | gitlab-ce-dbab04b94254aa121eb265748e19761adc2b0afb.tar.gz |
Lazy load xterm css colors
Manually includes the xterm custom colors
on the 3 files that will need it: job log page,
job terminal page, environment terminal page
Reduces main CSS bundle
-rw-r--r-- | app/assets/stylesheets/page_bundles/xterm.scss (renamed from app/assets/stylesheets/pages/xterm.scss) | 2 | ||||
-rw-r--r-- | app/views/projects/jobs/show.html.haml | 3 | ||||
-rw-r--r-- | changelogs/unreleased/44768-lazy-load-xterm-css.yml | 5 | ||||
-rw-r--r-- | config/application.rb | 1 |
4 files changed, 11 insertions, 0 deletions
diff --git a/app/assets/stylesheets/pages/xterm.scss b/app/assets/stylesheets/page_bundles/xterm.scss index 7d40c61da26..7f040ac9b96 100644 --- a/app/assets/stylesheets/pages/xterm.scss +++ b/app/assets/stylesheets/page_bundles/xterm.scss @@ -1,3 +1,5 @@ +@import 'framework/variables'; + .build-page { // color codes are based on http://en.wikipedia.org/wiki/File:Xterm_256color_chart.svg // see also: https://gist.github.com/jasonm23/2868981 diff --git a/app/views/projects/jobs/show.html.haml b/app/views/projects/jobs/show.html.haml index cf8d42976f8..5321bc46e73 100644 --- a/app/views/projects/jobs/show.html.haml +++ b/app/views/projects/jobs/show.html.haml @@ -3,6 +3,9 @@ - breadcrumb_title "##{@build.id}" - page_title "#{@build.name} (##{@build.id})", "Jobs" +- content_for :page_specific_javascripts do + = stylesheet_link_tag 'page_bundles/xterm' + %div{ class: container_class } .build-page.js-build-page #js-build-header-vue diff --git a/changelogs/unreleased/44768-lazy-load-xterm-css.yml b/changelogs/unreleased/44768-lazy-load-xterm-css.yml new file mode 100644 index 00000000000..85f7b1984e0 --- /dev/null +++ b/changelogs/unreleased/44768-lazy-load-xterm-css.yml @@ -0,0 +1,5 @@ +--- +title: Lazy load xterm custom colors css +merge_request: +author: +type: performance diff --git a/config/application.rb b/config/application.rb index f3c53fa63f3..79fdd8a1a63 100644 --- a/config/application.rb +++ b/config/application.rb @@ -134,6 +134,7 @@ module Gitlab config.assets.precompile << "notify.css" config.assets.precompile << "mailers/*.css" config.assets.precompile << "page_bundles/ide.css" + config.assets.precompile << "page_bundles/xterm.css" config.assets.precompile << "performance_bar.css" config.assets.precompile << "lib/ace.js" config.assets.precompile << "test.css" |