timeki commited on
Commit
14a5a97
1 Parent(s): f760165

Adapt front for dark mode

Browse files
Files changed (2) hide show
  1. front/utils.py +1 -1
  2. style.css +27 -29
front/utils.py CHANGED
@@ -137,8 +137,8 @@ def make_html_figure_sources(source,i,img_str):
137
  <div class="card card-image">
138
  <div class="card-content">
139
  <h2>Image {i} - {title} - Page {int(meta['page_number'])}</h2>
140
- <p class='ai-generated'>AI-generated description</p>
141
  <img src="data:image/png;base64, { img_str }" alt="Alt text" />
 
142
 
143
  <p>{content}</p>
144
 
 
137
  <div class="card card-image">
138
  <div class="card-content">
139
  <h2>Image {i} - {title} - Page {int(meta['page_number'])}</h2>
 
140
  <img src="data:image/png;base64, { img_str }" alt="Alt text" />
141
+ <p class='ai-generated'>AI-generated description</p>
142
 
143
  <p>{content}</p>
144
 
style.css CHANGED
@@ -311,37 +311,35 @@ footer {
311
  /* ... add other mobile-specific styles ... */
312
  }
313
 
 
 
 
 
 
 
 
314
 
315
- body.dark .container > .wrap{
316
- background-color: #374151 !important;
317
- color:white !important;
318
- }
319
-
320
- body.dark .card{
321
- background-color: #374151;
322
- }
323
-
324
-
325
- body.dark .card-content h2{
326
- color:#f4dbd3 !important;
327
- }
328
 
329
- body.dark .card-footer {
330
- background-color: #404652;
 
 
 
 
 
 
 
 
 
 
 
 
 
331
  }
332
 
333
- body.dark .card-footer span {
334
- color:white !important;
335
- }
336
- body.dark .gradio-container .contain .card-image > .card-content{
337
- background-color: #404652 !important;
338
- }
339
- body.dark .gradio-container .contain .card > .card-content{
340
- background-color: #404652 !important;
341
- }
342
- body.dark .card-footer{
343
- background-color: #24272e !important;
344
- }
345
 
346
  .doc-ref{
347
  color:#dc2626!important;
@@ -385,7 +383,7 @@ span.chatbot > p > img{
385
  }
386
 
387
  .card-image > .card-content{
388
- background-color:#f1f7fa !important;
389
  }
390
 
391
 
@@ -496,7 +494,7 @@ span.chatbot > p > img{
496
  border-top: 1px solid #db3434 !important; /* Blue color */
497
  border-right: 1px solid #3498db !important; /* Blue color */
498
  border-radius: 50%;
499
- width: 20px;
500
  height: 20px;
501
  animation: spin 2s linear infinite;
502
  display:inline-block;
 
311
  /* ... add other mobile-specific styles ... */
312
  }
313
 
314
+ @media (prefers-color-scheme: dark) {
315
+ .card{
316
+ background-color: #374151;
317
+ }
318
+ .card-image > .card-content{
319
+ background-color: rgb(55, 65, 81) !important;
320
+ }
321
 
322
+ .card-footer {
323
+ background-color: #404652;
324
+ }
 
 
 
 
 
 
 
 
 
 
325
 
326
+ .container > .wrap{
327
+ background-color: #374151 !important;
328
+ color:white !important;
329
+ }
330
+ .card-content h2{
331
+ color:#e7754f !important;
332
+ }
333
+ .doc-ref sup{
334
+ color:rgb(235 109 35)!important;
335
+ /* margin-right:1px; */
336
+ }
337
+ .card-footer span {
338
+ color:white !important;
339
+ }
340
+
341
  }
342
 
 
 
 
 
 
 
 
 
 
 
 
 
343
 
344
  .doc-ref{
345
  color:#dc2626!important;
 
383
  }
384
 
385
  .card-image > .card-content{
386
+ background-color:#f1f7fa;
387
  }
388
 
389
 
 
494
  border-top: 1px solid #db3434 !important; /* Blue color */
495
  border-right: 1px solid #3498db !important; /* Blue color */
496
  border-radius: 50%;
497
+ width: 20px;
498
  height: 20px;
499
  animation: spin 2s linear infinite;
500
  display:inline-block;