acseresznye commited on
Commit
7adf4f2
·
1 Parent(s): 76f6962

fixed responsiveness

Browse files
Files changed (1) hide show
  1. ui/pages.py +22 -19
ui/pages.py CHANGED
@@ -132,20 +132,23 @@ def init_ui(fastapi_app):
132
  # =====================================================================
133
  with (
134
  ui.dialog() as best_results_dialog,
135
- ui.card().classes("q-pa-md w-full max-w-lg"),
136
  ):
137
- with ui.row().classes("w-full items-center justify-between"):
138
- ui.label("How to Get the Best Results").classes("text-xl font-bold")
 
 
 
 
139
  ui.button(icon="close", on_click=best_results_dialog.close).props(
140
  "flat round dense"
141
  )
142
 
143
- with ui.column().classes("gap-4 mt-4"):
144
  ui.markdown(
145
- """
146
- Necthrall understands natural scientific language. You don't need keywords, just clear intent.
147
 
148
- - **Find Specific Papers:** Mention the author, year, or acronym directly (e.g., "Results of Sutton 2020" or "PRESERVE-1 trial outcomes").
149
 
150
  - **Compare Topics:** Don't be afraid to ask for comparisons. Necthrall can research two topics at once (e.g., "Efficacy of mRNA vs. viral vector vaccines").
151
 
@@ -157,7 +160,9 @@ Necthrall understands natural scientific language. You don't need keywords, just
157
 
158
  **If you get "Insufficient Evidence":** This usually means your query was too specific. Try removing strict constraints (like the year) to let the system find the broader scientific consensus on the topic instead.
159
  """
160
- ).classes("text-slate-700")
 
 
161
 
162
  # =====================================================================
163
  # DIALOG: PRIVACY POLICY
@@ -501,16 +506,16 @@ Necthrall understands natural scientific language. You don't need keywords, just
501
  # HEADER
502
  # =====================================================================
503
  with ui.row().classes(
504
- "header-container items-center justify-between lg:justify-center w-full px-4 bg-white shadow-sm relative"
505
  ):
506
  # Logo and brand
507
  with ui.row().classes("items-center gap-2"):
508
  ui.image(LOGO_DIR).classes(
509
- "w-12 h-12 md:w-20 md:h-20 object-contain"
510
  ).props("no-spinner")
511
 
512
  ui.label("Necthrall").classes(
513
- "text-2xl md:text-4xl font-bold text-slate-800 leading-none pb-1 md:pb-2 cursor-pointer"
514
  ).on(
515
  "click",
516
  lambda e=None: ui.run_javascript(
@@ -519,15 +524,13 @@ Necthrall understands natural scientific language. You don't need keywords, just
519
  )
520
 
521
  # About and Tips buttons
522
- with ui.row().classes(
523
- "gap-2 lg:absolute lg:right-8 lg:top-1/2 lg:-translate-y-1/2"
524
- ):
525
- ui.button("About", on_click=about_dialog.open).props("flat").classes(
526
- "text-slate-600 font-semibold"
527
- )
528
  ui.button("Tips", on_click=best_results_dialog.open).props(
529
- "flat"
530
- ).classes("text-slate-600 font-semibold")
531
 
532
  # =====================================================================
533
  # MAIN CONTENT
 
132
  # =====================================================================
133
  with (
134
  ui.dialog() as best_results_dialog,
135
+ ui.card().classes("w-full max-w-sm md:max-w-lg q-pa-lg"),
136
  ):
137
+ with ui.row().classes(
138
+ "w-full items-center justify-between mb-3 gap-2 flex-nowrap"
139
+ ):
140
+ ui.label("How to get the best results").classes(
141
+ "text-lg md:text-xl font-bold leading-tight"
142
+ )
143
  ui.button(icon="close", on_click=best_results_dialog.close).props(
144
  "flat round dense"
145
  )
146
 
147
+ with ui.scroll_area().classes("w-full pr-2").style("max-height:70vh"):
148
  ui.markdown(
149
+ """Necthrall understands natural scientific language. You don't need keywords, just clear intent.
 
150
 
151
+ - **Find Specific Papers:** Mention the author, year, or acronym directly (e.g., "Results of [Author] [Year]" or "[Name] trial outcomes").
152
 
153
  - **Compare Topics:** Don't be afraid to ask for comparisons. Necthrall can research two topics at once (e.g., "Efficacy of mRNA vs. viral vector vaccines").
154
 
 
160
 
161
  **If you get "Insufficient Evidence":** This usually means your query was too specific. Try removing strict constraints (like the year) to let the system find the broader scientific consensus on the topic instead.
162
  """
163
+ ).classes(
164
+ "text-slate-700 text-sm leading-relaxed break-words q-mt-none q-pt-none"
165
+ ).style("margin-top:0;margin-bottom:0;")
166
 
167
  # =====================================================================
168
  # DIALOG: PRIVACY POLICY
 
506
  # HEADER
507
  # =====================================================================
508
  with ui.row().classes(
509
+ "header-container items-center justify-between w-full px-4 py-3 bg-white shadow-sm"
510
  ):
511
  # Logo and brand
512
  with ui.row().classes("items-center gap-2"):
513
  ui.image(LOGO_DIR).classes(
514
+ "w-10 h-10 md:w-14 md:h-14 object-contain"
515
  ).props("no-spinner")
516
 
517
  ui.label("Necthrall").classes(
518
+ "text-lg md:text-2xl font-bold text-slate-800 leading-tight cursor-pointer"
519
  ).on(
520
  "click",
521
  lambda e=None: ui.run_javascript(
 
524
  )
525
 
526
  # About and Tips buttons
527
+ with ui.row().classes("gap-1 md:gap-2 items-center"):
528
+ ui.button("About", on_click=about_dialog.open).props(
529
+ "flat dense"
530
+ ).classes("text-slate-600 font-semibold text-xs md:text-sm")
 
 
531
  ui.button("Tips", on_click=best_results_dialog.open).props(
532
+ "flat dense"
533
+ ).classes("text-slate-600 font-semibold text-xs md:text-sm")
534
 
535
  # =====================================================================
536
  # MAIN CONTENT