Skip to content

Commit 923be3c

Browse files
committed
add github link to nav
1 parent 825bcd8 commit 923be3c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

main.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ def get_module_path(p,base_dir): return f'{base_dir}.{".".join(Path(p).parts[1:]
1212

1313
site_title = 'FastHTML Gallery'
1414
descr = 'A gallery of FastHTML components showing common patterns in FastHTML apps, including chat bubbles, cascading dropdowns, interactive charts, etc.'
15+
ghub_link = A(UkIcon("github"), title="FastHTML Gallery on Github",
16+
href="https://github.com/AnswerDotAI/FastHTML-Gallery"),
1517

1618
hdrs = (
1719
*Socials(title=site_title, description=descr, site_name='gallery.fastht.ml', twitter_site='@isaac_flath', image=f'/social.png', url=''),
@@ -110,7 +112,8 @@ def homepage():
110112
NavBarLSide(H1(site_title)),
111113
NavBarRSide(
112114
Button(submit=False)("Toggle Animations", onclick="toggleAnimations()"),
113-
A(Button("Table View"), href="/table"),)),
115+
A(Button("Table View"), href="/table"),
116+
ghub_link)),
114117
Container(*all_cards))
115118

116119

@@ -152,7 +155,8 @@ def table_view():
152155
NavBarLSide(H1("FastHTML Gallery Table View")),
153156
NavBarRSide(
154157
Button(submit=False)("Toggle Animations", onclick="toggleAnimations()"),
155-
A(Button("Card View"), href="/"))),
158+
A(Button("Card View"), href="/"),
159+
ghub_link)),
156160
Container(*[SectionTable(section) for section in directories]))
157161

158162
serve()

0 commit comments

Comments
 (0)