From b489923f66fe5b5584e55f1b29fc25e630f57cc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Sat, 28 Jan 2023 02:48:04 +0100 Subject: [PATCH] Move menu button to the left in the admin section So now it uses the same interface and styles as the main layout. On small screens, it's easier to play with the menu when the button is on the left because the menu it opens is aligned to the left. Note that now we can get rid of the title-bar class; we didn't use the styles in the public area since commit dcec003d0, and we were overriding all the Foundation styles in the admin area with the exception of the padding, which we no longer need. --- .../stylesheets/foundation_and_overrides.scss | 1 - app/assets/stylesheets/layout.scss | 5 ----- .../stylesheets/layout/admin_header.scss | 6 ------ .../layout/admin_header_component.html.erb | 18 ++++++++---------- 4 files changed, 8 insertions(+), 22 deletions(-) diff --git a/app/assets/stylesheets/foundation_and_overrides.scss b/app/assets/stylesheets/foundation_and_overrides.scss index 95dd7511c..b093af62b 100644 --- a/app/assets/stylesheets/foundation_and_overrides.scss +++ b/app/assets/stylesheets/foundation_and_overrides.scss @@ -43,7 +43,6 @@ @include foundation-table; @include foundation-tabs; @include foundation-thumbnail; -@include foundation-title-bar; @include foundation-tooltip; @include foundation-visibility-classes; @include foundation-float-classes; diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss index e8484e498..e3b2837e3 100644 --- a/app/assets/stylesheets/layout.scss +++ b/app/assets/stylesheets/layout.scss @@ -616,11 +616,6 @@ body > header, cursor: inherit; } -.title-bar { - background: none; - float: right; -} - .dropdown.menu > li { a { diff --git a/app/assets/stylesheets/layout/admin_header.scss b/app/assets/stylesheets/layout/admin_header.scss index 46271c8f4..e695f9e83 100644 --- a/app/assets/stylesheets/layout/admin_header.scss +++ b/app/assets/stylesheets/layout/admin_header.scss @@ -77,10 +77,4 @@ height: auto !important; } } - - .title-bar { - color: inherit; - position: absolute; - right: 12px; - } } diff --git a/app/components/layout/admin_header_component.html.erb b/app/components/layout/admin_header_component.html.erb index f6f3b9f04..903cc4541 100644 --- a/app/components/layout/admin_header_component.html.erb +++ b/app/components/layout/admin_header_component.html.erb @@ -8,15 +8,6 @@
- <% if show_account_menu? %> -
- -
- <% end %> -

<%= link_to namespace_path do %> @@ -26,7 +17,14 @@

<% if show_account_menu? %> -
+
+ +
+ +
<%= render Layout::AccountMenuComponent.new(user) %>
<% end %>