YoonJ-C commited on
Commit
9501e9b
·
1 Parent(s): 043cba6

UI improvements: chat interface and styling updates

Browse files

- Redesigned chat input area with improved spacing and positioning
- Replaced text-based send button with arrow icon for cleaner UI
- Improved voice button positioning and visual integration
- Enhanced chat message area background
- Temporarily streamlined auth UI for Google Sign-in only

Files changed (2) hide show
  1. static/style.css +40 -11
  2. templates/index.html +17 -9
static/style.css CHANGED
@@ -572,7 +572,7 @@ button:disabled {
572
  height: 250px;
573
  overflow-y: auto;
574
  padding: var(--space-sm);
575
- background: transparent;
576
  }
577
 
578
  .chat-message {
@@ -611,18 +611,20 @@ button:disabled {
611
 
612
  .chat-input-area {
613
  display: flex;
614
- gap: var(--space-xs);
 
615
  padding: var(--space-sm);
616
  background: transparent;
617
  border-top: none;
 
618
  }
619
 
620
  .chat-input {
621
  flex: 1;
622
- padding: var(--space-sm) var(--space-sm);
623
  border: none;
624
  background: var(--bg-white);
625
- border-radius: var(--radius-sm);
626
  font-size: var(--font-size-sm);
627
  outline: none;
628
  color: var(--text-primary);
@@ -633,16 +635,34 @@ button:disabled {
633
  box-shadow: var(--shadow-md);
634
  }
635
 
 
 
636
  .chat-send-btn {
637
- padding: var(--space-sm) var(--space-lg);
 
 
 
 
638
  background: var(--primary-dark);
639
  color: var(--text-inverse);
640
  border: none;
641
- border-radius: var(--radius-sm);
642
  cursor: pointer;
643
  font-weight: var(--font-weight-medium);
644
  font-size: var(--font-size-sm);
645
  transition: background var(--transition-fast);
 
 
 
 
 
 
 
 
 
 
 
 
646
  }
647
 
648
  .chat-send-btn:hover {
@@ -656,22 +676,31 @@ button:disabled {
656
  }
657
 
658
  .voice-btn {
659
- padding: var(--space-sm) var(--space-sm);
660
- background: var(--primary-dark);
661
- color: var(--text-inverse);
 
 
662
  border: none;
663
  border-radius: var(--radius-sm);
664
  cursor: pointer;
665
  font-size: var(--font-size-lg);
666
  transition: all var(--transition-fast);
 
 
 
 
 
667
  }
668
 
669
  .voice-btn:hover {
670
- background: var(--info);
 
 
671
  }
672
 
673
  .voice-btn.recording {
674
- background: var(--error);
675
  animation: pulse 1s infinite;
676
  }
677
 
 
572
  height: 250px;
573
  overflow-y: auto;
574
  padding: var(--space-sm);
575
+ background: var(--bg-white);
576
  }
577
 
578
  .chat-message {
 
611
 
612
  .chat-input-area {
613
  display: flex;
614
+ align-items: center;
615
+ gap: 0; /* Remove gap since voice button is absolutely positioned */
616
  padding: var(--space-sm);
617
  background: transparent;
618
  border-top: none;
619
+ position: relative;
620
  }
621
 
622
  .chat-input {
623
  flex: 1;
624
+ padding: var(--space-sm); /* Reduced right padding for better spacing */
625
  border: none;
626
  background: var(--bg-white);
627
+ border-radius: 999px;
628
  font-size: var(--font-size-sm);
629
  outline: none;
630
  color: var(--text-primary);
 
635
  box-shadow: var(--shadow-md);
636
  }
637
 
638
+ /* Removed the plus icon ::before pseudo-element */
639
+
640
  .chat-send-btn {
641
+ padding: 0;
642
+ width: 36px;
643
+ height: 36px;
644
+ min-width: 36px;
645
+ margin-left: var(--space-xs); /* Add margin instead of gap */
646
  background: var(--primary-dark);
647
  color: var(--text-inverse);
648
  border: none;
649
+ border-radius: var(--radius-full);
650
  cursor: pointer;
651
  font-weight: var(--font-weight-medium);
652
  font-size: var(--font-size-sm);
653
  transition: background var(--transition-fast);
654
+ display: flex;
655
+ align-items: center;
656
+ justify-content: center;
657
+ flex-shrink: 0;
658
+ }
659
+
660
+ .chat-send-btn::after {
661
+ content: '↑';
662
+ font-size: var(--font-size-base);
663
+ line-height: 1;
664
+ font-weight: var(--font-weight-bold); /* Make arrow thicker */
665
+ -webkit-text-stroke: 0.5px; /* Additional thickness */
666
  }
667
 
668
  .chat-send-btn:hover {
 
676
  }
677
 
678
  .voice-btn {
679
+ padding: 0;
680
+ width: auto;
681
+ height: auto;
682
+ background: transparent; /* Transparent to sit inside input visually */
683
+ color: var(--text-primary); /* Match input text color */
684
  border: none;
685
  border-radius: var(--radius-sm);
686
  cursor: pointer;
687
  font-size: var(--font-size-lg);
688
  transition: all var(--transition-fast);
689
+ display: flex;
690
+ align-items: center;
691
+ justify-content: center;
692
+ position: absolute;
693
+ right: calc(16px + var(--space-xs) + var(--space-sm)); /* Position to left of send button */
694
  }
695
 
696
  .voice-btn:hover {
697
+ background: transparent;
698
+ color: var(--text-primary);
699
+ opacity: 0.7;
700
  }
701
 
702
  .voice-btn.recording {
703
+ color: var(--error);
704
  animation: pulse 1s infinite;
705
  }
706
 
templates/index.html CHANGED
@@ -76,12 +76,15 @@
76
  Continue with Google
77
  </button>
78
 
79
- <div class="divider">
 
 
 
 
80
  <span>or</span>
81
  </div>
82
- {% endif %}
83
-
84
- <!-- Around line 84-88 -->
85
  {% if firebase_config and firebase_config.apiKey %}
86
  <input type="email" id="authEmail" placeholder="Email">
87
  {% else %}
@@ -105,6 +108,9 @@
105
  <p class="switch-link" onclick="switchAuth()">
106
  {{ 'Already have an account? Sign In' if is_signup else 'New here? Sign Up' }}
107
  </p>
 
 
 
108
  {% else %}
109
  {% if show_reset_form %}
110
  <input type="password" id="resetPassword" placeholder="New Password">
@@ -119,10 +125,12 @@
119
  <p class="switch-link" onclick="window.location.href='/login'">
120
  Back to Sign In
121
  </p>
122
- {% endif %}
123
  </div>
124
  {% else %}
125
- <!-- Assessment Interface -->
 
 
126
  <h2>{{ title }}</h2>
127
  <p>{{ message }} <i class="fas fa-heart"></i> </p>
128
 
@@ -216,7 +224,7 @@
216
  <input type="text"
217
  class="chat-input"
218
  id="input-{{ result.name|replace(' ', '-') }}"
219
- placeholder="Ask about {{ result.name }}..."
220
  onkeypress="if(event.key==='Enter') sendMessage('{{ result.name }}')">
221
  <button class="voice-btn"
222
  id="voice-{{ result.name|replace(' ', '-') }}"
@@ -229,8 +237,8 @@
229
  </button>
230
  <button class="chat-send-btn"
231
  id="send-{{ result.name|replace(' ', '-') }}"
232
- onclick="sendMessage('{{ result.name }}')">
233
- Send
234
  </button>
235
  </div>
236
  </div>
 
76
  Continue with Google
77
  </button>
78
 
79
+
80
+ <!-- Hide email/password sign-in temporarily -------------------------------------->
81
+
82
+
83
+ <!-- <div class="divider">
84
  <span>or</span>
85
  </div>
86
+ {% endif %}
87
+
 
88
  {% if firebase_config and firebase_config.apiKey %}
89
  <input type="email" id="authEmail" placeholder="Email">
90
  {% else %}
 
108
  <p class="switch-link" onclick="switchAuth()">
109
  {{ 'Already have an account? Sign In' if is_signup else 'New here? Sign Up' }}
110
  </p>
111
+ </div>
112
+
113
+
114
  {% else %}
115
  {% if show_reset_form %}
116
  <input type="password" id="resetPassword" placeholder="New Password">
 
125
  <p class="switch-link" onclick="window.location.href='/login'">
126
  Back to Sign In
127
  </p>
128
+ {% endif %} -->
129
  </div>
130
  {% else %}
131
+
132
+
133
+ <!-- Assessment Interface ------------------------------------------------------------>
134
  <h2>{{ title }}</h2>
135
  <p>{{ message }} <i class="fas fa-heart"></i> </p>
136
 
 
224
  <input type="text"
225
  class="chat-input"
226
  id="input-{{ result.name|replace(' ', '-') }}"
227
+ placeholder="Ask anything"
228
  onkeypress="if(event.key==='Enter') sendMessage('{{ result.name }}')">
229
  <button class="voice-btn"
230
  id="voice-{{ result.name|replace(' ', '-') }}"
 
237
  </button>
238
  <button class="chat-send-btn"
239
  id="send-{{ result.name|replace(' ', '-') }}"
240
+ onclick="sendMessage('{{ result.name }}')"
241
+ title="Send">
242
  </button>
243
  </div>
244
  </div>