From 825bcd8813edf3a4cbbf869744bdf286fc01fe92 Mon Sep 17 00:00:00 2001 From: Lucian Knock Date: Mon, 3 Feb 2025 12:42:11 -0500 Subject: [PATCH 1/2] add page title (FastHTML gallery) and favicon --- gallery.ico | Bin 0 -> 9662 bytes main.py | 16 ++++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 gallery.ico diff --git a/gallery.ico b/gallery.ico new file mode 100644 index 0000000000000000000000000000000000000000..dad576cdd945a00bee4898aa65c05a94c40297b3 GIT binary patch literal 9662 zcmeI0J#QL85Qc{@U4!I`v_!EYC9d26CH$21sfiHHR`mRg{1Iv-XcJ^AkP?X~ibM)? zn|Ib;blUqq-(0Z7c-M2jy?N%{)85{Bh-&z`zbE{DOJCm;y&<9x=r~26(D{6tX{{A{ zl5H^9P2Szme}p zp#KTv&y@plDiCWArTIT?q8Oif4v1F~j7s>c)k-fG3)6SIoh#!zPNeQjxJJ2w_}l20 z=J)%3zgDZ6KA+DcWTZb22vQM&M!z(_*XwEQ>!!!(XK9IR3FC?{a?I$z5I#$bodd=c zU*K3C{TwRIw>jRq?_mrm9&{|Peh%k3Nb)(y7eW0m;*ZB;y<9FM`|)^WHrwZ-`lb2x zdi~UBG(x@AYCW#k>nHUu&@aum`;hCK&E}~L{Vv!3T^9fL_Eryv!%!cMM*e2QkCw5* z>qnZOu>V`_>H8$(`!N{!KkolW-}l{*v(Wpc-EQknrxV#{vzeVklzve@ zo^wL-J7*3d{dPZy^3&-wR(}=zh#W@$U@-8pzn{|jWHL$AUj^UEVf63!d%fLmQ~Tj? zNY!5j-{ydrZ&pxFA6oy+3>tWMW%9vN=t&m)?Hbe-cMPyff@4gY&*=;2K&)awib?Z1 zeW4tPQyiSZr1>l%cMilT4$Np}@ullC(tNXjCfu{k_X!LY!Ks8VU7wNWOV?+l`5C`I z6W3DG`neE3FYnknl%T%~zRe+7pW%BX$>%v->pu}SrZVbF()Af>KE5x{wdmk+S@oG9 zGk9DUU%Eac&A--XczZgV`ToiH{yGQYAoTwo&Z*!9&&RKcFIu0${Sf8jS-;kQuJxb9 z8dKK#l3hz!vln0gdFX01qK6xe2JdM!_=ZM Date: Mon, 3 Feb 2025 13:12:45 -0500 Subject: [PATCH 2/2] add github link to nav --- main.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 7b8b546..f222ce6 100644 --- a/main.py +++ b/main.py @@ -12,6 +12,8 @@ def get_module_path(p,base_dir): return f'{base_dir}.{".".join(Path(p).parts[1:] site_title = 'FastHTML Gallery' descr = 'A gallery of FastHTML components showing common patterns in FastHTML apps, including chat bubbles, cascading dropdowns, interactive charts, etc.' +ghub_link = A(UkIcon("github"), title="FastHTML Gallery on Github", + href="https://github.com/AnswerDotAI/FastHTML-Gallery"), hdrs = ( *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(): NavBarLSide(H1(site_title)), NavBarRSide( Button(submit=False)("Toggle Animations", onclick="toggleAnimations()"), - A(Button("Table View"), href="/table"),)), + A(Button("Table View"), href="/table"), + ghub_link)), Container(*all_cards)) @@ -152,7 +155,8 @@ def table_view(): NavBarLSide(H1("FastHTML Gallery Table View")), NavBarRSide( Button(submit=False)("Toggle Animations", onclick="toggleAnimations()"), - A(Button("Card View"), href="/"))), + A(Button("Card View"), href="/"), + ghub_link)), Container(*[SectionTable(section) for section in directories])) serve()