Skip to content

Commit

Permalink
chore: UI sidebar and dialog improvements (#186)
Browse files Browse the repository at this point in the history
  • Loading branch information
fynnfluegge authored Feb 1, 2025
1 parent 4c239e1 commit 69769d2
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 51 deletions.
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
.overlay {
display: none;
position: fixed;
top: -20%;
left: 0;
width: 100%;
height: 120%;
background-color: rgba(0, 0, 0, 0.15);
color: black;
align-items: center;
justify-content: center;
z-index: 2;
}

.dialog {
position: absolute;
background-color: var(--menu-color);
color: lightgray;
border-radius: 6px;
Expand All @@ -21,6 +8,7 @@
padding: 12px;
width: 700px;
text-align: center;
top: 120px;
}

.open {
Expand Down
16 changes: 2 additions & 14 deletions webapp/src/app/component/dialog-llm/llm-dialog.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,8 @@
padding: 8px 16px;
}

.overlay {
display: none;
position: fixed;
top: -20%;
left: 0;
width: 100%;
height: 120%;
background-color: rgba(0, 0, 0, 0.15);
color: black;
align-items: center;
justify-content: center;
z-index: 2;
}

.dialog {
position: absolute;
background-color: var(--menu-color);
color: lightgray;
border-radius: 6px;
Expand All @@ -29,6 +16,7 @@
padding: 12px;
width: 800px;
text-align: center;
top: 120px;
}

.open {
Expand Down
2 changes: 1 addition & 1 deletion webapp/src/app/component/editor/editor.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ div.center {
transition: 0.25s;
position: absolute;
bottom: 12px;
width: calc(100% - 264px);
width: calc(100% - 364px);
}

//---- snackbar ---- //
Expand Down
8 changes: 4 additions & 4 deletions webapp/src/app/component/navigation/sidenav.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@

<div
class="sidebar"
[style.left.px]="showSidebar ? '0' : '-200'"
[style.left.px]="showSidebar ? '0' : '-300'"
(document:keydown.meta.control.n)="addNewItem(null)"
>
<button
Expand Down Expand Up @@ -293,7 +293,7 @@
(keyup.escape)="cancelEditItem(node, itemValue.value)"
placeholder="New document..."
class="input-field"
style="width: 140px; height: 24px; font-size: 14px; padding: 4px"
style="width: 240px; height: 24px; font-size: 14px; padding: 4px"
/>
</mat-form-field>
<button
Expand Down Expand Up @@ -430,8 +430,8 @@

<div
class="container-t"
[style.margin-left.px]="showSidebar ? '260' : '60'"
[style.width]="showSidebar ? 'calc(100% - 280px)' : 'calc(100% - 80px)'"
[style.margin-left.px]="showSidebar ? '360' : '60'"
[style.width]="showSidebar ? 'calc(100% - 380px)' : 'calc(100% - 80px)'"
>
<app-editor
*ngIf="!showZettelkasten"
Expand Down
22 changes: 5 additions & 17 deletions webapp/src/app/component/navigation/sidenav.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,11 @@ span:hover {

.sidebar {
position: absolute;
left: -200px;
transition: 0.25s;
margin: 0;
margin-top: 52px;
padding: 0;
width: 240px;
width: 340px;
background: var(--menu-color);
color: lightgray;
position: fixed;
Expand Down Expand Up @@ -336,33 +335,22 @@ input:checked + .slider:before {
border-radius: 50%;
}

.overlay {
display: none;
position: fixed;
top: -30%;
left: 0;
width: 100%;
height: 130%;
background-color: rgba(0, 0, 0, 0.15);
color: black;
align-items: center;
justify-content: center;
z-index: 2;
}

.open {
display: flex;
}

.dialog {
position: absolute;
background-color: var(--menu-color);
color: var(--font-color);
border-radius: 6px;
border: 0.1px solid rgb(63, 66, 65);
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
padding: 12px;
width: 600px;
width: 800px;
max-width: 75%;
text-align: center;
top: 120px;
}

#searchButton {
Expand Down
15 changes: 14 additions & 1 deletion webapp/src/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ pre[class*="language-"] {
.autocomplete {
display: flex;
flex-direction: column;
height: 396px;
height: 496px;
max-height: 75vh;
overflow-x: hidden;
}

Expand Down Expand Up @@ -362,3 +363,15 @@ code {
transform: rotate(360deg);
}
}

.overlay {
display: none;
position: fixed;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.15);
color: black;
align-items: center;
justify-content: center;
z-index: 2;
}

0 comments on commit 69769d2

Please sign in to comment.