nbroad HF staff commited on
Commit
addf7c0
β€’
1 Parent(s): 08cf77b

fix emoji, target=_blank

Browse files
Files changed (4) hide show
  1. README.md +1 -1
  2. app.py +14 -8
  3. blog.py +1 -10
  4. main.py +2 -1
README.md CHANGED
@@ -1,6 +1,6 @@
1
  ---
2
  title: Me
3
- emoji: 🀠
4
  colorFrom: green
5
  colorTo: yellow
6
  sdk: docker
 
1
  ---
2
  title: Me
3
+ emoji: πŸ‘‹β¬›πŸ€ 
4
  colorFrom: green
5
  colorTo: yellow
6
  sdk: docker
app.py CHANGED
@@ -7,8 +7,11 @@ def Markdown(s, exts=md_exts, **kw): return Div(NotStr(markdown(s, extensions=ex
7
 
8
  ghurl = 'https://github.com/nbroad1881'
9
  hf_logo_svg = "https://huggingface.co/datasets/huggingface/brand-assets/resolve/main/hf-logo.svg"
 
10
  li_url = "https://www.linkedin.com/in/nicholas-m-broad/"
11
  kaggle_url = "https://www.kaggle.com/nbroad"
 
 
12
  fh_url = "https://fastht.ml/"
13
  fh_logo = 'assets/fasthtml_logo.svg'
14
 
@@ -16,13 +19,16 @@ def BstPage(selidx, title, *c):
16
  navitems = [('Home', '/'), ('About', '/about'), ('Blog', '/blog')]
17
 
18
  ra_items = (
19
- A(Image(src="/assets/hf-logo.svg", width=28, height=28, cls="my-0 px-0 mx-0 py-0", left=False, pad=0), cls="ms-2 my-0 px-1 btn-lg btn", role="button", href="https://hf.co/nbroad"),
20
- Icon('fab fa-github', dark=False, sz='lg', href=ghurl, cls='ms-2 px-2'),
21
- Icon("fab fa-linkedin", dark=False, sz='lg', href=li_url, cls='ms-2 px-2'),
22
- Icon("fab fa-kaggle", dark=False, sz='lg', href=kaggle_url, cls='ms-2 px-2'),
23
- Icon("fab fa-youtube", dark=False, sz='lg', href="https://www.youtube.com/@nicholasbroad1881", cls='ms-2 px-2'),
24
- Icon("fab fa-twitter", dark=False, sz='lg', href="https://twitter.com/nbroad1881", cls='ms-2 px-2'),
25
- )
 
 
 
26
  ftlinks = [A(k, href=v, cls='nav-link px-2 text-muted')
27
  for k,v in dict(Home='/').items()]
28
  return (
@@ -30,7 +36,7 @@ def BstPage(selidx, title, *c):
30
  Script('initTOC()'),
31
  Container(
32
  Navbar('nav', selidx, items=navitems, ra_items=ra_items, cls='navbar-light bg-secondary rounded-lg',
33
- image=f'', hdr_href="fhurl", placement=PlacementT.Default, expand=SizeT.Md, toggle_left=False),
34
  Toc(Container(H1(title, cls='pb-2 pt-1'), *c, cls='mt-3')),
35
  BstFooter('Made using FastHTML', File(fh_logo), img_href=fh_url, cs=ftlinks),
36
  typ=ContainerT.Xl, cls='mt-3', data_bs_spy='scroll', data_bs_target='#toc'))
 
7
 
8
  ghurl = 'https://github.com/nbroad1881'
9
  hf_logo_svg = "https://huggingface.co/datasets/huggingface/brand-assets/resolve/main/hf-logo.svg"
10
+ hf_url = "https://hf.co/nbroad"
11
  li_url = "https://www.linkedin.com/in/nicholas-m-broad/"
12
  kaggle_url = "https://www.kaggle.com/nbroad"
13
+ yt_url = "https://www.youtube.com/@nicholasbroad1881"
14
+ tw_url = "https://twitter.com/nbroad1881"
15
  fh_url = "https://fastht.ml/"
16
  fh_logo = 'assets/fasthtml_logo.svg'
17
 
 
19
  navitems = [('Home', '/'), ('About', '/about'), ('Blog', '/blog')]
20
 
21
  ra_items = (
22
+ A(
23
+ Image(src=hf_logo_svg, width=28, height=28, cls="my-0 px-0 mx-0 py-0", left=False, pad=0),
24
+ cls="ms-2 my-0 px-1 btn-lg btn", role="button", href=hf_url, target="_blank"
25
+ ),
26
+ Icon('fab fa-github', dark=False, sz='lg', href=ghurl, cls='ms-2 px-2', target="_blank"),
27
+ Icon("fab fa-linkedin", dark=False, sz='lg', href=li_url, cls='ms-2 px-2', target="_blank"),
28
+ Icon("fab fa-kaggle", dark=False, sz='lg', href=kaggle_url, cls='ms-2 px-2', target="_blank"),
29
+ Icon("fab fa-youtube", dark=False, sz='lg', href=yt_url, cls='ms-2 px-2', target="_blank"),
30
+ Icon("fab fa-twitter", dark=False, sz='lg', href=tw_url, cls='ms-2 px-2', target="_blank"),
31
+ )
32
  ftlinks = [A(k, href=v, cls='nav-link px-2 text-muted')
33
  for k,v in dict(Home='/').items()]
34
  return (
 
36
  Script('initTOC()'),
37
  Container(
38
  Navbar('nav', selidx, items=navitems, ra_items=ra_items, cls='navbar-light bg-secondary rounded-lg',
39
+ image=f'', hdr_href="", placement=PlacementT.Default, expand=SizeT.Md, toggle_left=False),
40
  Toc(Container(H1(title, cls='pb-2 pt-1'), *c, cls='mt-3')),
41
  BstFooter('Made using FastHTML', File(fh_logo), img_href=fh_url, cs=ftlinks),
42
  typ=ContainerT.Xl, cls='mt-3', data_bs_spy='scroll', data_bs_target='#toc'))
blog.py CHANGED
@@ -23,13 +23,6 @@ def blog_preview(blog_id):
23
  P(details[0].get("date_published", "")),
24
  P(details[0].get("desc", "")+"...")
25
  )
26
-
27
-
28
- # full width image
29
- # <img src="assets/htmx-meme.png" alt="HTMX meme" class="img-fluid mx-auto d-block">
30
-
31
-
32
-
33
 
34
 
35
  @functools.lru_cache()
@@ -194,6 +187,4 @@ def single_blog(blog_id):
194
 
195
  secs = Sections(headers, sections)
196
 
197
- # import pdb; pdb.set_trace()
198
-
199
- return BstPage(0, "", *secs)
 
23
  P(details[0].get("date_published", "")),
24
  P(details[0].get("desc", "")+"...")
25
  )
 
 
 
 
 
 
 
26
 
27
 
28
  @functools.lru_cache()
 
187
 
188
  secs = Sections(headers, sections)
189
 
190
+ return BstPage(2, "", *secs)
 
 
main.py CHANGED
@@ -20,7 +20,8 @@ def get(blog_id: str):
20
 
21
 
22
  @rt("/{fname:path}.{ext:static}")
23
- def get(fname:str, ext:str): return FileResponse(f'{fname}.{ext}')
 
24
 
25
 
26
  serve()
 
20
 
21
 
22
  @rt("/{fname:path}.{ext:static}")
23
+ def get(fname:str, ext:str):
24
+ return FileResponse(f'{fname}.{ext}')
25
 
26
 
27
  serve()