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,12 +50,10 @@
= 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
= stylesheet_link_tag_defer "application_utilities_dark"
- else
= stylesheet_link_tag_defer "application"
- if content_for?(:page_specific_styles)
= yield :page_specific_styles
= stylesheet_link_tag_defer "application_utilities"
- unless use_startup_css?
......@@ -70,13 +68,9 @@
= 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
= webpack_controller_bundle_tags
......
......@@ -7,7 +7,6 @@
= 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 :head
%body
......
- 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