Skip to content

Commit 703a107

Browse files
authored
Fixed broken icon links for instagram and github (#291)
* Fixed broken icon links for instagram and github * Removed border rounding to links
1 parent b097360 commit 703a107

File tree

1 file changed

+15
-25
lines changed

1 file changed

+15
-25
lines changed

gui/base.py

Lines changed: 15 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
from typing import Callable
1414

1515
from nicegui import ui
16+
from nicegui.elements.link import Link
1617
from pydantic import BaseModel, ConfigDict, Field, SkipValidation
1718

1819
from analyzer_interface import AnalyzerInterface, ParamValue
@@ -64,11 +65,11 @@ class GuiURLS(BaseModel):
6465

6566
# External URLs
6667
github_url: str = Field(
67-
default="https://github.com/civictechdc/mango-tango-cli",
68+
default="https://github.com/civictechdc/cib-mango-tree",
6869
description="GitHub repository URL",
6970
)
7071
instagram_url: str = Field(
71-
default="https://www.instagram.com/civictechdc/",
72+
default="https://www.instagram.com/cibmangotree",
7273
description="Instagram profile URL",
7374
)
7475

@@ -293,11 +294,7 @@ def _render_header(self) -> None:
293294
- Right: Home button (if not on home page)
294295
"""
295296
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"):
301298
# Left: Back button or spacer
302299
with ui.element("div").classes("flex items-center"):
303300
if self.show_back_button and self.back_route and self.back_text:
@@ -361,28 +358,21 @@ def _render_footer(self) -> None:
361358

362359
def _render_footer_links(self) -> None:
363360
"""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"):
365362
# 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"
374368
)
375369
ui.tooltip("Visit our GitHub")
376370

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"
386376
)
387377
ui.tooltip("Follow us on Instagram")
388378

0 commit comments

Comments
 (0)