Commit aecc7db7 authored by Lukas Eipert's avatar Lukas Eipert

Remove unnecessary content_for? checks

We are checking whether we have any content before we yield content
blocks. This is unnecessary, because if the content block is empty,
it'll simply yield an empty string.

Furthermore it seems like the content block library_javascripts is
unnecessary can be deprecated in favor of page_specific_javascripts.
parent 185b5541
......@@ -50,13 +50,11 @@
= render 'layouts/startup_css'
- if user_application_theme == 'gl-dark'
= stylesheet_link_tag_defer "application_dark"
- if content_for?(:page_specific_styles)
= yield :page_specific_styles
= yield :page_specific_styles
= stylesheet_link_tag_defer "application_utilities_dark"
- else
= stylesheet_link_tag_defer "application"
- if content_for?(:page_specific_styles)
= yield :page_specific_styles
= yield :page_specific_styles
= stylesheet_link_tag_defer "application_utilities"
- unless use_startup_css?
= stylesheet_link_tag_defer "themes/#{user_application_theme_css_filename}" if user_application_theme_css_filename
......@@ -70,14 +68,10 @@
= Gon::Base.render_data(nonce: content_security_policy_nonce)
- if content_for?(:library_javascripts)
= yield :library_javascripts
= javascript_include_tag locale_path unless I18n.locale == :en
= webpack_bundle_tag "sentry" if Gitlab.config.sentry.enabled
- if content_for?(:page_specific_javascripts)
= yield :page_specific_javascripts
= yield :page_specific_javascripts
= webpack_controller_bundle_tags
= webpack_bundle_tag 'performance_bar' if performance_bar_enabled?
......
......@@ -7,8 +7,7 @@
= stylesheet_link_tag 'https://unpkg.com/@atlaskit/reduced-ui-pack@10.5.5/dist/bundle.css'
= javascript_include_tag 'https://connect-cdn.atl-paas.net/all.js'
= javascript_include_tag 'https://unpkg.com/jquery@3.3.1/dist/jquery.min.js'
- if content_for?(:page_specific_styles)
= yield :page_specific_styles
= yield :page_specific_styles
= yield :head
%body
.ac-content
......
- page_title _("CI Lint")
- page_description _("Validate your GitLab CI configuration file")
- unless Feature.enabled?(:monaco_ci, default_enabled: true)
- content_for :library_javascripts do
- content_for :page_specific_javascripts do
= page_specific_javascript_tag('lib/ace.js')
%h2.pt-3.pb-3= _("Validate your GitLab CI configuration")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment