Skip to content
This repository has been archived by the owner on Jul 12, 2021. It is now read-only.

Commit

Permalink
Improve responsive design
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelmeuli committed Dec 13, 2018
1 parent 165acf8 commit afe9342
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/renderer/assets/styles/base/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ $font-weight-bold: 700;
$line-height: 1.7;

// Spacing
$height-header: 37px;
$spacing-small: 15px;
$spacing-large: 30px;
$spacing-rel-small: 4vw;
Expand Down
1 change: 0 additions & 1 deletion src/renderer/assets/styles/elements/_editor.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.editor {
display: grid;
grid-template-rows: auto auto 1fr;
height: 100%;
padding: $spacing-rel-small;
overflow-y: auto;
border-radius: $border-radius-input;
Expand Down
34 changes: 30 additions & 4 deletions src/renderer/assets/styles/layout/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ body,
header {
position: absolute;
width: 100%;
height: 37px;
height: $height-header;
-webkit-app-region: drag;
}

Expand All @@ -40,17 +40,43 @@ header {
.diary {
display: flex;
align-items: center;
padding: $spacing-rel-large;

@media (max-width: 650px) {
padding: 2 * $spacing-large;
margin: 0 auto;
overflow-y: scroll;
flex-direction: column;

.sidebar {
margin: 0 auto (1.5 * $spacing-large);
flex-shrink: 0;
}

.editor {
min-height: 300px;
}
}

@media (min-width: 651px) {
padding: $spacing-rel-large;

.sidebar {
height: 100%;
}

.editor {
height: 100%;
margin-left: $spacing-rel-large;
}
}

.sidebar {
display: flex;
width: 7 * $calendar-cell-size;
height: 100%;
flex-direction: column;
}

.editor {
flex: 1;
margin-left: $spacing-rel-large;
}
}

0 comments on commit afe9342

Please sign in to comment.