Skip to content
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

Make design more responsive #22

Merged
merged 1 commit into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ $ parcel build index.html
<details>
<summary>Tasks</summary>

- [ ] Ollama authentication
- [ ] Edit message / response
- [ ] Clear chat
- [ ] CSP
Expand Down
5 changes: 5 additions & 0 deletions css/ChatArea.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,9 @@
display: flex;
flex-direction: row;
overflow: auto;

}

#chat-menu-button {
background-color: var(--secondary-bg-color);
}
2 changes: 1 addition & 1 deletion css/ChatForm.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
}

.icon-send {
font-size: 18px;
font-size: 1.2rem;
}
}

Expand Down
2 changes: 1 addition & 1 deletion css/ChatHeader.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#chat-header {
// NOTE: Should match #chat-form border-top
border-bottom: 1px solid #ccc;
border-bottom: 1px solid #ddd;

@extend %box-shadow;

Expand Down
1 change: 1 addition & 0 deletions css/Sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ aside {
/* Sidebar styling */
#sidebar {
@extend %box-shadow;
background-color: var(--secondary-bg-color);

// NOTE: This should be the same as chat-header border-bottom
border-right: 1px solid #cccccc5e;
Expand Down
6 changes: 4 additions & 2 deletions css/colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
--tertiary-color: #eee;
--error-color: #ef4040;
--bg-color: #fafafa;
--secondary-bg-color: #f0f0f0;
--text-color: #333;
--text-color-lighten-20: #{color.adjust(#eee, $lightness:20%)};
--icon-color: var(--primary-color);
Expand All @@ -20,7 +21,7 @@
--border-color: #{color.adjust(#393e46, $lightness:60%)};
--border-hover-color: #{color.adjust(#393e46, $lightness:40%)};
--border-focus-color: #{color.adjust(#393e46, $lightness:30%)};
--box-shadow-color: rgb(196 204 213 / 74.9%);
--box-shadow-color: rgb(196 204 213 / 37%);
--box-shadow-modal-color: #444;
--modal-header-bg-color: var(--primary-color);
}
Expand All @@ -35,6 +36,7 @@
--tertiary-color: #d1d1d1;
--error-color: #ff6b6b;
--bg-color: #121212;
--secondary-bg-color: #222;
--text-color: #fafafa;
--text-color-lighten-20: #{color.adjust(#fafafa, $lightness:20%)};
--icon-color: var(--text-color);
Expand All @@ -46,7 +48,7 @@
--border-color: #{color.adjust(#4f5b66, $lightness:30%)};
--border-hover-color: #{color.adjust(#4f5b66, $lightness:50%)};
--border-focus-color: #{color.adjust(#4f5b66, $lightness:60%)};
--box-shadow-color: rgb(40 48 57 / 74.9%);
--box-shadow-color: rgb(40 48 57 / 30%);
--box-shadow-modal-color: #444;
--modal-header-bg-color: var(--bg-color);
}
Expand Down
8 changes: 4 additions & 4 deletions css/icons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

i[class^='icon-'] {
color: var(--icon-color);
font-size: 12px;
font-size: 0.75rem;
vertical-align: middle;
}

svg {
width: 24px;
height: 24px;
width: 1.5rem;
height: 1.5rem;
vertical-align: middle;
}

Expand All @@ -36,7 +36,7 @@ svg {

.icon-new::before {
content: '\002B';
font-size: 14px;
font-size: 0.875rem;
}

.icon-search::before {
Expand Down
9 changes: 8 additions & 1 deletion css/modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,16 @@
border-bottom: 1px solid var(--border-color);

.button {
background-color: var(--light-text-color);
border-radius: var(--border-radius);
padding: 0.5rem;
padding: 0.35rem;
line-height: 0.5rem;
border-radius: 1rem;
}

.button:hover {
position: relative;
top: -1px;
}

h2 {
Expand Down
10 changes: 9 additions & 1 deletion css/reset.scss
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,17 @@ table {
border-spacing: 0;
}

input, button, textarea, select {
font: inherit;
}

// Remove padding of everything and make border-box the default
html * {
margin: 0;
padding: 0;
box-sizing: border-box;
font-size: 16px; /* Standard font size for body */
}

html {
font-size: 16px; /* Standard font size for body, use rem to modify font-size */
}
11 changes: 11 additions & 0 deletions css/responsive.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@media (max-width: 1024px) {
html {
font-size: 0.875rem;
}
}

@media (max-width: 768px) {
html {
font-size: 0.75rem;
}
}
1 change: 1 addition & 0 deletions css/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
@import 'utils';
@import 'spinner';
@import 'style';
@import 'responsive';

// Components
@import 'Hoverable';
Expand Down
2 changes: 1 addition & 1 deletion dist/script.d573be0b.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/script.d573be0b.js.map

Large diffs are not rendered by default.

50 changes: 40 additions & 10 deletions dist/theme.7fcc2895.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/theme.7fcc2895.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/theme.7fcc2895.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"test": "node --test --test-reporter=spec",
"test:only": "node --test --test-reporter=spec --test-only",
"test:mobile": "MOBILE=true node --test --test-reporter=spec",
"test:video": "VIDEO=true node --test --test-reporter=spec",
"format": "prettier --write \"**/*.{js,html,scss}\"",
"lint-js": "eslint \"**/*.js\" --fix",
"lint-css": "stylelint \"**/*.scss\" --fix",
Expand Down
Binary file modified screenshots/darkmode-chat-collapsed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/darkmode-chat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/darkmode-screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/darkmode-settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/mobile-chat-collapsed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/mobile-chat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/mobile-screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/mobile-search.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified screenshots/mobile-settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading