Skip to content
Open
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions gui/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,16 @@ class GuiURLS(BaseModel):
default="https://github.com/civictechdc/mango-tango-cli",
description="GitHub repository URL",
)

instagram_url: str = Field(
default="https://www.instagram.com/civictechdc/",
default="https://www.instagram.com/cibmangotree",
description="Instagram profile URL",
)

linkdlin_url: str = Field(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we name this variable linkedin_url (instead of linkdlin_url)?

default="https://www.linkedin.com/company/cib-mango-tree",
description="Linkdlin profile ",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change description to "LinkedIn profile"

)

class GuiConstants(BaseModel):
"""Container for both colors and urls"""
Expand Down Expand Up @@ -304,7 +309,7 @@ def _render_footer(self) -> None:
Layout:
- Left: License information
- Center: Project attribution
- Right: External links (GitHub, Instagram)
- Right: External links (GitHub, Instagram,Linkdin)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"LinkedIn" (so, in string text, let's just spell out the brand as is to remove any ambiguity)

"""
with ui.footer(elevated=True):
with ui.row().classes("w-full items-center").style(
Expand Down Expand Up @@ -346,6 +351,18 @@ def _render_footer_links(self) -> None:
"width: 20px; height: 20px; fill: currentColor"
)
ui.tooltip("Follow us on Instagram")

# Linkdin button
linkdin_btn = ui.button(
color="accent",
on_click=lambda: self.navigate_to_external(gui_urls.linkdlin_url),
).props("flat round")
with linkdin_btn:
linkdin_svg = self._load_svg_icon("instagram")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be loading a LinkedIn logo? It's currently going to load "instagram" logo. To add an icon, you need to find an .svg of an icon, place it in gui/icons/ and modify the _load_csv_icon() method accordingly.

I found insta/github icons at https://simpleicons.org which are licensed by CC0. We should make sure that similar llicense is in place for any linked in icon too.

ui.html(linkdin_svg, sanitize=False).style(
"width: 20px; height: 20px; fill: currentColor"
)
ui.tooltip("Visit our Linkdin")

# Navigation helpers
def navigate_to(self, route: str) -> None:
Expand Down