Skip to content

Commit

Permalink
wip: add grid styles
Browse files Browse the repository at this point in the history
  • Loading branch information
lassediercks committed Dec 14, 2023
1 parent a51a933 commit 2fe6038
Show file tree
Hide file tree
Showing 9 changed files with 127 additions and 125 deletions.
2 changes: 1 addition & 1 deletion app/assets/stylesheets/alchemy/_extends.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,5 @@
%gradiated-toolbar {
background: $toolbar-bg-color;
padding: 8px 4px;
height: $toolbar-height;
height: $toolbar-height - 1px;
}
10 changes: 7 additions & 3 deletions app/assets/stylesheets/alchemy/archive.scss
Original file line number Diff line number Diff line change
@@ -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;
}
Expand All @@ -20,7 +27,6 @@
padding-bottom: 60px;

&.with_tag_filter {
width: calc(100% - 235px);
overflow-x: auto;
}
}
Expand Down Expand Up @@ -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;
Expand Down
49 changes: 34 additions & 15 deletions app/assets/stylesheets/alchemy/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ noscript {
color: $warning_text_color;
background-color: $warning_background_color;

h1, p {
h1,
p {
margin: 16px 0;
}
}
Expand All @@ -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;
Expand All @@ -53,7 +56,6 @@ body {
a {
color: inherit;
text-decoration: none;
transition: $transition-duration;

&:hover {
text-decoration: underline;
Expand All @@ -64,7 +66,8 @@ a {
}
}

a:focus, [tabindex]:focus {
a:focus,
[tabindex]:focus {
@include default-focus-style;
}

Expand All @@ -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;
Expand Down Expand Up @@ -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 {
Expand All @@ -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);
}
}
1 change: 0 additions & 1 deletion app/assets/stylesheets/alchemy/buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ input.button {

.icon {
color: inherit;
transition: color 250ms;
}

&.disabled,
Expand Down
6 changes: 0 additions & 6 deletions app/assets/stylesheets/alchemy/elements.scss
Original file line number Diff line number Diff line change
@@ -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);

Expand Down
90 changes: 63 additions & 27 deletions app/assets/stylesheets/alchemy/frame.scss
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -105,3 +135,9 @@ div#overlay_text_box {
padding-right: 2 * $default-padding;
}
}

#logout {
&:not(:hover) {
background-color: $main-menu-bg-color;
}
}
54 changes: 3 additions & 51 deletions app/assets/stylesheets/alchemy/navigation.scss
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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 {
Expand Down
5 changes: 1 addition & 4 deletions app/assets/stylesheets/alchemy/search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,10 @@

#toolbar,
#overlay_toolbar {

.search_form {
position: absolute;
top: 0;
right: 0;
height: 45px;
}

.search_field {
Expand All @@ -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;
Expand Down
Loading

0 comments on commit 2fe6038

Please sign in to comment.