diff options
Diffstat (limited to 'app/views/layouts')
-rw-r--r-- | app/views/layouts/_loading_hints.html.haml | 3 | ||||
-rw-r--r-- | app/views/layouts/_page.html.haml | 7 | ||||
-rw-r--r-- | app/views/layouts/_snowplow.html.haml | 2 | ||||
-rw-r--r-- | app/views/layouts/application.html.haml | 9 | ||||
-rw-r--r-- | app/views/layouts/dashboard.html.haml | 7 | ||||
-rw-r--r-- | app/views/layouts/explore.html.haml | 6 | ||||
-rw-r--r-- | app/views/layouts/header/_registration_enabled_callout.html.haml | 10 | ||||
-rw-r--r-- | app/views/layouts/nav/sidebar/_admin.html.haml | 31 | ||||
-rw-r--r-- | app/views/layouts/nav/sidebar/_your_work.html.haml | 1 | ||||
-rw-r--r-- | app/views/layouts/oauth_error.html.haml | 72 | ||||
-rw-r--r-- | app/views/layouts/snippets.html.haml | 4 |
11 files changed, 62 insertions, 90 deletions
diff --git a/app/views/layouts/_loading_hints.html.haml b/app/views/layouts/_loading_hints.html.haml index b1d1447ae2a..60ab6927fd2 100644 --- a/app/views/layouts/_loading_hints.html.haml +++ b/app/views/layouts/_loading_hints.html.haml @@ -18,4 +18,7 @@ -# See https://github.com/web-platform-tests/wpt/pull/36930 %link{ rel: 'preload', href: font_path('gitlab-sans/GitLabSans.woff2'), as: 'font', crossorigin: css_crossorigin } %link{ rel: 'preload', href: font_path('jetbrains-mono/JetBrainsMono.woff2'), as: 'font', crossorigin: css_crossorigin } + %link{ rel: 'preload', href: font_path('jetbrains-mono/JetBrainsMono-Bold.woff2'), as: 'font', crossorigin: css_crossorigin } + %link{ rel: 'preload', href: font_path('jetbrains-mono/JetBrainsMono-Italic.woff2'), as: 'font', crossorigin: css_crossorigin } + %link{ rel: 'preload', href: font_path('jetbrains-mono/JetBrainsMono-BoldItalic.woff2'), as: 'font', crossorigin: css_crossorigin } = preload_link_tag(path_to_stylesheet('fonts'), crossorigin: css_crossorigin) diff --git a/app/views/layouts/_page.html.haml b/app/views/layouts/_page.html.haml index bb1d051f71f..010ddd8da39 100644 --- a/app/views/layouts/_page.html.haml +++ b/app/views/layouts/_page.html.haml @@ -1,5 +1,10 @@ +- if show_super_sidebar? + - @left_sidebar = true .layout-page.hide-when-top-nav-responsive-open{ class: page_with_sidebar_class } - - if defined?(nav) && nav + - if show_super_sidebar? + - sidebar_data = super_sidebar_context(current_user).to_json + %aside.js-super-sidebar.nav-sidebar{ data: { root_path: root_path, sidebar: sidebar_data, toggle_new_nav_endpoint: profile_preferences_url } } + - elsif defined?(nav) && nav = render "layouts/nav/sidebar/#{nav}" .content-wrapper.content-wrapper-margin{ class: "#{@content_wrapper_class}" } .mobile-overlay diff --git a/app/views/layouts/_snowplow.html.haml b/app/views/layouts/_snowplow.html.haml index 22cc8027202..0b5c4730b64 100644 --- a/app/views/layouts/_snowplow.html.haml +++ b/app/views/layouts/_snowplow.html.haml @@ -7,7 +7,7 @@ ;(function(p,l,o,w,i,n,g){if(!p[i]){p.GlobalSnowplowNamespace=p.GlobalSnowplowNamespace||[]; p.GlobalSnowplowNamespace.push(i);p[i]=function(){(p[i].q=p[i].q||[]).push(arguments) };p[i].q=p[i].q||[];n=l.createElement(o);g=l.getElementsByTagName(o)[0];n.async=1; - n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","#{asset_url('snowplow/sp.js')}","snowplow")); + n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","#{escaped_url(asset_url('snowplow/sp.js'))}","snowplow")); window.snowplowOptions = #{Gitlab::Tracking.options(@group).to_json} diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 455d18a5ae8..fa79219df4a 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -11,7 +11,14 @@ = render "layouts/visual_review" if ENV['REVIEW_APPS_ENABLED'] = render 'peek/bar' = header_message - = render partial: "layouts/header/default", locals: { project: @project, group: @group } + + - if show_super_sidebar? # TODO: Move this CSS to a better place + :css + body { + --header-height: 0px; + } + - else + = render partial: "layouts/header/default", locals: { project: @project, group: @group } = render 'layouts/page', sidebar: sidebar, nav: nav = footer_message diff --git a/app/views/layouts/dashboard.html.haml b/app/views/layouts/dashboard.html.haml index c10be282952..028c22fe9e5 100644 --- a/app/views/layouts/dashboard.html.haml +++ b/app/views/layouts/dashboard.html.haml @@ -1,6 +1,9 @@ - page_title _("Dashboard") - header_title _("Dashboard"), root_path unless header_title -- sidebar "dashboard" -- @hide_breadcrumbs = true +- if Feature.enabled?(:your_work_sidebar, current_user) + - @left_sidebar = true + - nav "your_work" +- else + - @hide_breadcrumbs = true = render template: "layouts/application" diff --git a/app/views/layouts/explore.html.haml b/app/views/layouts/explore.html.haml index 24751ab4e06..389dee853ba 100644 --- a/app/views/layouts/explore.html.haml +++ b/app/views/layouts/explore.html.haml @@ -1,7 +1,11 @@ - page_title _("Explore") -- @hide_breadcrumbs = true + +- if current_user && Feature.enabled?(:your_work_sidebar, current_user) + - @left_sidebar = true + - nav "your_work" - unless current_user + - @hide_breadcrumbs = true - header_title _("Explore GitLab"), explore_root_path = render template: "layouts/application" diff --git a/app/views/layouts/header/_registration_enabled_callout.html.haml b/app/views/layouts/header/_registration_enabled_callout.html.haml index 52c39fce961..5c70136a932 100644 --- a/app/views/layouts/header/_registration_enabled_callout.html.haml +++ b/app/views/layouts/header/_registration_enabled_callout.html.haml @@ -9,9 +9,7 @@ = c.body do = _("Your GitLab instance allows anyone to register for an account, which is a security risk on public-facing GitLab instances. You should deactivate new sign ups if public users aren't expected to register for an account.") = c.actions do - = link_to general_admin_application_settings_path(anchor: 'js-signup-settings'), class: 'btn gl-alert-action btn-confirm btn-md gl-button' do - %span.gl-button-text - = _('Deactivate') - %button.btn.gl-alert-action.btn-default.btn-md.gl-button.js-close - %span.gl-button-text - = _('Acknowledge') + = render Pajamas::ButtonComponent.new(variant: :confirm, href: general_admin_application_settings_path(anchor: 'js-signup-settings')) do + = _('Deactivate') + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-close gl-ml-3'}) do + = _('Acknowledge') diff --git a/app/views/layouts/nav/sidebar/_admin.html.haml b/app/views/layouts/nav/sidebar/_admin.html.haml index 717175e8eb3..24b301fadce 100644 --- a/app/views/layouts/nav/sidebar/_admin.html.haml +++ b/app/views/layouts/nav/sidebar/_admin.html.haml @@ -7,14 +7,14 @@ %span.sidebar-context-title = _('Admin Area') %ul.sidebar-top-level-items{ data: { qa_selector: 'admin_overview_submenu_content' } } - = nav_link(controller: %w[dashboard admin admin/projects users groups admin/topics jobs runners gitaly_servers cohorts], html_options: {class: 'home'}) do + = nav_link(controller: %w[dashboard admin admin/projects users groups admin/topics gitaly_servers cohorts], html_options: {class: 'home'}) do = link_to admin_root_path, class: 'has-sub-items' do .nav-icon-container = sprite_icon('overview') %span.nav-item-name = _('Overview') %ul.sidebar-sub-level-items - = nav_link(controller: %w[dashboard admin admin/projects users groups jobs runners gitaly_servers cohorts], html_options: { class: "fly-out-top-item" }) do + = nav_link(controller: %w[dashboard admin admin/projects users groups gitaly_servers cohorts], html_options: { class: "fly-out-top-item" }) do = link_to admin_root_path do %strong.fly-out-top-item-name = _('Overview') @@ -39,18 +39,31 @@ = link_to admin_topics_path, title: _('Topics') do %span = _('Topics') - = nav_link path: 'jobs#index' do - = link_to admin_jobs_path, title: _('Jobs') do + = nav_link(controller: :gitaly_servers) do + = link_to admin_gitaly_servers_path, title: 'Gitaly Servers' do %span - = _('Jobs') - = nav_link path: ['runners#index', 'runners#show'] do + = _('Gitaly Servers') + + = nav_link(controller: %w[runners jobs]) do + = link_to admin_runners_path, class: 'has-sub-items' do + .nav-icon-container + = sprite_icon('rocket') + %span.nav-item-name + = _('CI/CD') + %ul.sidebar-sub-level-items + = nav_link(controller: %w[runners jobs], html_options: { class: "fly-out-top-item" }) do + = link_to admin_runners_path do + %strong.fly-out-top-item-name + = _('CI/CD') + %li.divider.fly-out-top-item + = nav_link(controller: :runners) do = link_to admin_runners_path, title: _('Runners') do %span = _('Runners') - = nav_link(controller: :gitaly_servers) do - = link_to admin_gitaly_servers_path, title: 'Gitaly Servers' do + = nav_link(controller: :jobs) do + = link_to admin_jobs_path, title: _('Jobs') do %span - = _('Gitaly Servers') + = _('Jobs') = nav_link(controller: admin_analytics_nav_links) do = link_to admin_dev_ops_reports_path, data: { qa_selector: 'admin_analytics_link' }, class: 'has-sub-items' do diff --git a/app/views/layouts/nav/sidebar/_your_work.html.haml b/app/views/layouts/nav/sidebar/_your_work.html.haml new file mode 100644 index 00000000000..0eba5045ab1 --- /dev/null +++ b/app/views/layouts/nav/sidebar/_your_work.html.haml @@ -0,0 +1 @@ += render partial: 'shared/nav/sidebar', object: Sidebars::YourWork::Panel.new(Sidebars::Context.new(current_user: current_user, container: nil)) diff --git a/app/views/layouts/oauth_error.html.haml b/app/views/layouts/oauth_error.html.haml index 03b387f8181..8d241dfd207 100644 --- a/app/views/layouts/oauth_error.html.haml +++ b/app/views/layouts/oauth_error.html.haml @@ -3,35 +3,10 @@ %head %meta{ :content => "width=device-width, initial-scale=1, maximum-scale=1", :name => "viewport" } %title= yield(:title) + = stylesheet_link_tag 'application_utilities' + %style + = Rails.application.assets_manifest.find_sources('errors.css').first.to_s.html_safe :css - body { - color: #666; - text-align: center; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - margin: auto; - font-size: 16px; - } - - .container { - margin: auto 20px; - } - - h3 { - color: #456; - font-size: 22px; - font-weight: 600; - margin-bottom: 6px; - } - - p { - max-width: 470px; - margin: 16px auto; - } - - .subtitle { - margin: 0 auto 20px; - } - svg { width: 280px; height: 280px; @@ -82,46 +57,5 @@ 25% {opacity: 1;} } - .light { - color: #8D8D8D; - } - - hr { - max-width: 600px; - margin: 18px auto; - border: 0; - border-top: 1px solid #EEE; - } - - .btn { - padding: 8px 14px; - border-radius: 3px; - border: 1px solid; - display: inline-block; - text-decoration: none; - margin: 4px 8px; - font-size: 14px; - } - - .primary { - color: #fff; - background-color: #1aaa55; - border-color: #168f48; - } - - .primary:hover { - background-color: #168f48; - } - - .secondary { - color: #1aaa55; - background-color: #fff; - border-color: #1aaa55; - } - - .secondary:hover { - background-color: #f3fff8; - } - %body = yield diff --git a/app/views/layouts/snippets.html.haml b/app/views/layouts/snippets.html.haml index 54b5ec85ccc..fd331d4b6c8 100644 --- a/app/views/layouts/snippets.html.haml +++ b/app/views/layouts/snippets.html.haml @@ -2,6 +2,10 @@ - header_title _("Snippets"), snippets_path - snippets_upload_path = snippets_upload_path(@snippet, current_user) +- if current_user && Feature.enabled?(:your_work_sidebar, current_user) + - @left_sidebar = true + - nav "your_work" + - content_for :page_specific_javascripts do - if snippets_upload_path = javascript_tag do |