diff --git a/app/assets/stylesheets/alchemy/_extends.scss b/app/assets/stylesheets/alchemy/_extends.scss index a290914268..73900918a5 100644 --- a/app/assets/stylesheets/alchemy/_extends.scss +++ b/app/assets/stylesheets/alchemy/_extends.scss @@ -58,5 +58,5 @@ %gradiated-toolbar { background: $toolbar-bg-color; padding: 8px 4px; - height: $toolbar-height; + height: $toolbar-height - 1px; } diff --git a/app/assets/stylesheets/alchemy/archive.scss b/app/assets/stylesheets/alchemy/archive.scss index e86eee24b7..e2a8e1c264 100644 --- a/app/assets/stylesheets/alchemy/archive.scss +++ b/app/assets/stylesheets/alchemy/archive.scss @@ -1,3 +1,10 @@ +#picture_archive.with_tag_filter, +#archive_all.with_tag_filter { + display: grid; + grid-template-columns: 2fr 0.5fr; + min-height: 100%; +} + .resources-header { padding: 0 2 * $default-padding; } @@ -20,7 +27,6 @@ padding-bottom: 60px; &.with_tag_filter { - width: calc(100% - 235px); overflow-x: auto; } } @@ -194,11 +200,9 @@ div.assign_image_list_image { div#library_sidebar { display: flex; flex-direction: column; - position: fixed; border-left: 1px solid $default-border-color; top: 0; right: 0; - width: 232px; padding: $top-menu-height + 2 * $default-padding 4 * $default-padding $pagination-height + 2 * $default-padding 4 * $default-padding; diff --git a/app/assets/stylesheets/alchemy/base.scss b/app/assets/stylesheets/alchemy/base.scss index a86af4c56a..9d02e6570a 100644 --- a/app/assets/stylesheets/alchemy/base.scss +++ b/app/assets/stylesheets/alchemy/base.scss @@ -28,7 +28,8 @@ noscript { color: $warning_text_color; background-color: $warning_background_color; - h1, p { + h1, + p { margin: 16px 0; } } @@ -43,7 +44,9 @@ body { cursor: default; // Fix for strange element window offset - &.pages.edit { overflow: hidden } + &.pages.edit { + overflow: hidden; + } &.prevent-scrolling { overflow: hidden; @@ -53,7 +56,6 @@ body { a { color: inherit; text-decoration: none; - transition: $transition-duration; &:hover { text-decoration: underline; @@ -64,7 +66,8 @@ a { } } -a:focus, [tabindex]:focus { +a:focus, +[tabindex]:focus { @include default-focus-style; } @@ -82,14 +85,18 @@ hr { width: 80%; max-width: 500px; margin: 2em auto; - padding: 4*$default-padding; + padding: 4 * $default-padding; background: $medium-gray; border-radius: $default-border-radius; } -.float_right { float: right } +.float_right { + float: right; +} -.float_left { float: left } +.float_left { + float: left; +} .center { text-align: center; @@ -124,11 +131,11 @@ hr { } .with_padding { - padding: 2*$default-padding; + padding: 2 * $default-padding; } .with_margin { - margin: 2*$default-margin; + margin: 2 * $default-margin; } a img { @@ -144,16 +151,28 @@ a img { } @-moz-keyframes spin { - from { -moz-transform: rotate(0deg); } - to { -moz-transform: rotate(360deg); } + from { + -moz-transform: rotate(0deg); + } + to { + -moz-transform: rotate(360deg); + } } @-webkit-keyframes spin { - from { -webkit-transform: rotate(0deg); } - to { -webkit-transform: rotate(360deg); } + from { + -webkit-transform: rotate(0deg); + } + to { + -webkit-transform: rotate(360deg); + } } @keyframes spin { - from {transform:rotate(0deg);} - to {transform:rotate(360deg);} + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } } diff --git a/app/assets/stylesheets/alchemy/buttons.scss b/app/assets/stylesheets/alchemy/buttons.scss index 28571d94f3..a782bc59cb 100644 --- a/app/assets/stylesheets/alchemy/buttons.scss +++ b/app/assets/stylesheets/alchemy/buttons.scss @@ -76,7 +76,6 @@ input.button { .icon { color: inherit; - transition: color 250ms; } &.disabled, diff --git a/app/assets/stylesheets/alchemy/elements.scss b/app/assets/stylesheets/alchemy/elements.scss index 0d01ddb3ad..f8c717bab3 100644 --- a/app/assets/stylesheets/alchemy/elements.scss +++ b/app/assets/stylesheets/alchemy/elements.scss @@ -1,12 +1,6 @@ #alchemy_elements_window { - position: absolute; - right: 0; - top: $top-menu-height; z-index: 20; - width: calc(100vw - #{$collapsed-main-menu-width}); - height: calc(100vh - #{$top-menu-height}); border-left: $default-border; - background-color: $light-gray; transition: $transition-duration ease-in-out; transform: translate3d(100%, 0, 0); diff --git a/app/assets/stylesheets/alchemy/frame.scss b/app/assets/stylesheets/alchemy/frame.scss index 9c3825f5ff..bbfd647fdf 100644 --- a/app/assets/stylesheets/alchemy/frame.scss +++ b/app/assets/stylesheets/alchemy/frame.scss @@ -1,3 +1,59 @@ +#alchemy { + display: grid; + grid-template-areas: + "left_menu top_menu top_menu" + "left_menu main_content main_content"; + grid-template-columns: 150px 1fr 48px; + grid-template-rows: 75px 1fr; + + &.collapsed-menu { + grid-template-columns: 48px 1fr 25vw; + } + + &.pages.edit { + grid-template-areas: + "left_menu top_menu top_menu" + "left_menu iframe main_content"; + } +} + +#main_content { + grid-area: main_content; + z-index: 0; + width: 100%; + height: 100%; + padding: $default-padding; +} + +#top_menu { + grid-area: top_menu; + @extend .disable-user-select; +} + +#left_menu { + position: relative; + z-index: 500; + background: red; + + grid-area: left_menu; + background-color: $main-menu-bg-color; + display: grid; + grid-template-rows: 1fr 48px; + @extend .disable-user-select; +} + +#main_navi { + max-height: 100vh; + padding-top: 28px; + padding-bottom: 80px; + + @media screen and (max-width: $medium-screen-break-point) { + overflow-x: hidden; + overflow-y: auto; + -webkit-overflow-scrolling: touch; + } +} + div#overlay { display: none; position: fixed; @@ -28,20 +84,8 @@ div#overlay_text_box { } } -#logout { - position: absolute; - z-index: 1; - bottom: 0; - left: 0; - width: 100%; - margin-bottom: 0; - - &:not(:hover) { - background-color: $main-menu-bg-color; - } -} - #header { + outline: 1px solid fuchsia; display: flex; height: $header-height; background: $header-background; @@ -71,20 +115,6 @@ div#overlay_text_box { } } -#main_content { - padding-top: 84px; - padding-right: 8px; - padding-bottom: 8px; - padding-left: $collapsed-main-menu-width + 8px; - z-index: 0; - width: 100%; - height: 100%; - - @media screen and (min-width: $large-screen-break-point) { - padding-left: $main-menu-width + 8px; - } -} - #user_info { display: flex; align-items: center; @@ -105,3 +135,9 @@ div#overlay_text_box { padding-right: 2 * $default-padding; } } + +#logout { + &:not(:hover) { + background-color: $main-menu-bg-color; + } +} diff --git a/app/assets/stylesheets/alchemy/navigation.scss b/app/assets/stylesheets/alchemy/navigation.scss index 0af2559379..4c6631c79d 100644 --- a/app/assets/stylesheets/alchemy/navigation.scss +++ b/app/assets/stylesheets/alchemy/navigation.scss @@ -1,56 +1,8 @@ -#top_menu { - position: fixed; - top: 0; - margin-left: $collapsed-main-menu-width; - padding-right: $collapsed-main-menu-width; - z-index: 20; - width: 100%; - @extend .disable-user-select; - - @media screen and (min-width: $large-screen-break-point) { - body:not(.collapsed-menu) & { - margin-left: $main-menu-width; - padding-right: $main-menu-width; - } - } -} - -#left_menu { - z-index: 30; - height: 100%; - position: fixed; - top: 0; - left: 0; - width: $collapsed-main-menu-width; - background-color: $main-menu-bg-color; - @extend .disable-user-select; - - @media screen and (min-width: $large-screen-break-point) { - body:not(.collapsed-menu) & { - width: $main-menu-width; - } - } -} - -#main_navi { - max-height: 100vh; - padding-top: 28px; - padding-bottom: 80px; - - @media screen and (max-width: $medium-screen-break-point) { - overflow-x: hidden; - overflow-y: auto; - -webkit-overflow-scrolling: touch; - } -} - .main_navi_entry { position: relative; display: block; line-height: 46px; - margin-bottom: 3 * $default-padding; - background-color: transparent; - transition: background-color $transition-duration $transition-easing; + // transition: background-color $transition-duration $transition-easing; &:hover { background-color: $main-menu-active-bg-color; @@ -92,7 +44,7 @@ visibility: hidden; opacity: 0; background-color: $main-menu-active-bg-color; - transition: opacity $transition-duration $transition-easing; + // transition: opacity $transition-duration $transition-easing; vertical-align: middle; cursor: pointer; @include truncate($collapsed-main-menu-entry-max-width, $wrap: nowrap); @@ -154,7 +106,7 @@ padding-left: 3 * $default-padding; font-weight: bold; color: $main-menu-text-color; - transition: color $transition-duration $transition-easing; + // transition: color $transition-duration $transition-easing; @include antialiased-font-smoothing; &:focus { diff --git a/app/assets/stylesheets/alchemy/search.scss b/app/assets/stylesheets/alchemy/search.scss index 67f3affd66..511208a35e 100644 --- a/app/assets/stylesheets/alchemy/search.scss +++ b/app/assets/stylesheets/alchemy/search.scss @@ -40,12 +40,10 @@ #toolbar, #overlay_toolbar { - .search_form { position: absolute; top: 0; right: 0; - height: 45px; } .search_field { @@ -57,8 +55,7 @@ height: 100%; border: none; background-color: transparentize($form-field-background-color, 0.25); - transition: - width $transition-duration ease-in-out, + transition: width $transition-duration ease-in-out, background-color $transition-duration linear; border-radius: 0; padding: 8px 16px 8px 32px; diff --git a/app/views/layouts/alchemy/admin.html.erb b/app/views/layouts/alchemy/admin.html.erb index dcbc372f7d..13418cd5fd 100644 --- a/app/views/layouts/alchemy/admin.html.erb +++ b/app/views/layouts/alchemy/admin.html.erb @@ -41,25 +41,26 @@ <%= alchemy_main_navigation_entry(alchemy_module) %> <% end %> <%= yield(:alchemy_main_navigation) %> + -
- <% if current_alchemy_user %> - <%= link_to_dialog( - %( - #{render_icon('logout-box-r', class: 'module')} - - ).html_safe, - alchemy.leave_admin_path, { - size: "300x155", - title: Alchemy.t("Leave Alchemy") - }, {'data-alchemy-hotkey' => 'alt+q'}) %> - <% else %> - <%= link_to(alchemy.root_path) do %> - - +
+ <% if current_alchemy_user %> + <%= link_to_dialog( + %( + #{render_icon('logout-box-r', class: 'module')} + + ).html_safe, + alchemy.leave_admin_path, { + size: "300x155", + title: Alchemy.t("Leave Alchemy") + }, {'data-alchemy-hotkey' => 'alt+q'}) %> + <% else %> + <%= link_to(alchemy.root_path) do %> + + + <% end %> <% end %> - <% end %> -
+
<% if current_alchemy_user %>