|
13 | 13 | from typing import Callable |
14 | 14 |
|
15 | 15 | from nicegui import ui |
| 16 | +from nicegui.elements.link import Link |
16 | 17 | from pydantic import BaseModel, ConfigDict, Field, SkipValidation |
17 | 18 |
|
18 | 19 | from analyzer_interface import AnalyzerInterface, ParamValue |
@@ -64,11 +65,11 @@ class GuiURLS(BaseModel): |
64 | 65 |
|
65 | 66 | # External URLs |
66 | 67 | github_url: str = Field( |
67 | | - default="https://github.com/civictechdc/mango-tango-cli", |
| 68 | + default="https://github.com/civictechdc/cib-mango-tree", |
68 | 69 | description="GitHub repository URL", |
69 | 70 | ) |
70 | 71 | instagram_url: str = Field( |
71 | | - default="https://www.instagram.com/civictechdc/", |
| 72 | + default="https://www.instagram.com/cibmangotree", |
72 | 73 | description="Instagram profile URL", |
73 | 74 | ) |
74 | 75 |
|
@@ -293,11 +294,7 @@ def _render_header(self) -> None: |
293 | 294 | - Right: Home button (if not on home page) |
294 | 295 | """ |
295 | 296 | with ui.header(elevated=True): |
296 | | - with ( |
297 | | - ui.row() |
298 | | - .classes("w-full items-center") |
299 | | - .style("justify-content: space-between") |
300 | | - ): |
| 297 | + with ui.row().classes("w-full items-center justify-between"): |
301 | 298 | # Left: Back button or spacer |
302 | 299 | with ui.element("div").classes("flex items-center"): |
303 | 300 | if self.show_back_button and self.back_route and self.back_text: |
@@ -361,28 +358,21 @@ def _render_footer(self) -> None: |
361 | 358 |
|
362 | 359 | def _render_footer_links(self) -> None: |
363 | 360 | """Render social media links in footer.""" |
364 | | - with ui.element("div").classes("flex items-center gap-2"): |
| 361 | + with ui.element("div").classes("flex items-center gap-3"): |
365 | 362 | # GitHub button |
366 | | - github_btn = ui.button( |
367 | | - color="accent", |
368 | | - on_click=lambda: self.navigate_to_external(gui_urls.github_url), |
369 | | - ).props("flat round") |
370 | | - with github_btn: |
371 | | - github_svg = self._load_svg_icon("github") |
372 | | - ui.html(github_svg, sanitize=False).style( |
373 | | - "width: 20px; height: 20px; fill: currentColor" |
| 363 | + with ui.link(target=gui_urls.github_url, new_tab=True).classes( |
| 364 | + "inline-flex items-center justify-center text-white no-underline size-5" |
| 365 | + ): |
| 366 | + ui.html(self._load_svg_icon("github"), sanitize=False).classes( |
| 367 | + "size-full fill-current" |
374 | 368 | ) |
375 | 369 | ui.tooltip("Visit our GitHub") |
376 | 370 |
|
377 | | - # Instagram button |
378 | | - instagram_btn = ui.button( |
379 | | - color="accent", |
380 | | - on_click=lambda: self.navigate_to_external(gui_urls.instagram_url), |
381 | | - ).props("flat round") |
382 | | - with instagram_btn: |
383 | | - instagram_svg = self._load_svg_icon("instagram") |
384 | | - ui.html(instagram_svg, sanitize=False).style( |
385 | | - "width: 20px; height: 20px; fill: currentColor" |
| 371 | + with ui.link(target=gui_urls.instagram_url, new_tab=True).classes( |
| 372 | + "inline-flex items-center justify-center text-white no-underline size-5" |
| 373 | + ): |
| 374 | + ui.html(self._load_svg_icon("instagram"), sanitize=False).classes( |
| 375 | + "size-full fill-current" |
386 | 376 | ) |
387 | 377 | ui.tooltip("Follow us on Instagram") |
388 | 378 |
|
|
0 commit comments