-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve admin header #959
Improve admin header #959
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,6 +65,10 @@ body { | |
@include clearfix; | ||
} | ||
|
||
.content-under-header { | ||
padding-top: 89px; | ||
} | ||
|
||
// Header | ||
//--------------------------------------------------- | ||
.admin-nav-header { | ||
|
@@ -103,9 +107,16 @@ body { | |
} | ||
|
||
#content-header { | ||
padding: 15px 0; | ||
padding: 15px 14px; | ||
background-color: very-light($color-3, 4); | ||
border-bottom: 1px solid $color-border; | ||
position: fixed; | ||
left: $width-sidebar; | ||
width: calc(100% - #{$width-sidebar}); | ||
z-index: 1; | ||
@include display(flex); | ||
@include align-items(center); | ||
@include justify-content(space-between); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's just reorganize this a little bit: @include display(flex);
@include align-items(center);
@include justify-content(space-between);
position: fixed;
left: $width-sidebar;
width: calc(100% - #{$width-sidebar});
padding: 15px 14px;
border-bottom: 1px solid $color-border;
background-color: very-light($color-3, 4);
z-index: 1; |
||
|
||
.page-title { | ||
font-size: 20px; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,13 @@ | ||
<% if content_for?(:page_title) || content_for?(:page_actions) %> | ||
<div id="content-header" data-hook> | ||
<div class="container"> | ||
<div class="sixteen columns"> | ||
<div class="block-table"> | ||
<% if content_for?(:page_title) %> | ||
<div class="table-cell"> | ||
<h1 class="page-title <%= yield :page_title_classes %>"><%= yield :page_title %></h1> | ||
</div> | ||
<% end %> | ||
<h1 class="page-title <%= yield :page_title_classes %>"><%= yield :page_title %></h1> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you know what There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of having an empty #content-header {
@include display(flex);
@include align-items(center);
- @include justify-content(space-between);
}
+.page-actions {
+ @include flex-grow(1);
+ text-align: right;
+} There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This doesn't work quite like this since |
||
|
||
<% if content_for?(:page_actions) %> | ||
<div class="page-actions table-cell toolbar" data-hook="toolbar"> | ||
<ul class="inline-menu"> | ||
<%= yield :page_actions %> | ||
</ul> | ||
</div> | ||
<% end %> | ||
</div> | ||
<% if content_for?(:page_actions) %> | ||
<div class="toolbar" data-hook="toolbar"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jhawthorn is this a kind of class name that we need to keep around? I'd prefer to remove anything we're not actually using. |
||
<ul class="page-actions inline-menu"> | ||
<%= yield :page_actions %> | ||
</ul> | ||
</div> | ||
</div> | ||
<% end %> | ||
</div> | ||
<% end %> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,7 @@ | |
|
||
<%= render :partial => 'spree/admin/shared/content_header' %> | ||
|
||
<div class="container"> | ||
<div class="container<%= ' content-under-header' if (content_for?(:page_title) || content_for?(:page_actions)) %>"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As we discussed IRL, move this to |
||
<div class="row"> | ||
<div class="<%= 'with-sidebar ' if content_for?(:sidebar) %>" id="content" data-hook> | ||
<div class="<%= if content_for?(:sidebar) then 'twelve' else 'sixteen' end %> columns"> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this value represent? If it's the header's height we should save that as a value:
$height-header
and use it here and on the header.