me / main.py
nbroad's picture
nbroad HF staff
fix emoji, target=_blank
addf7c0 verified
raw
history blame contribute delete
673 Bytes
from fh_bootstrap import *
import about, blog, home
hdrs = (
Link(href='/assets/hl-styles.css', rel='stylesheet'),
Link(href='/assets/styles.css', rel='stylesheet'),
*Socials(title='Nicholas Broad', description='', site_name='',
twitter_site='@nbroad1881', image=f'/assets/og-sq.png', url='')
)
app,rt = fast_app(pico=False, hdrs=bst_hdrs+hdrs, live=False)
app.get('/')(home.page)
app.get('/about')(about.page)
app.get('/blog')(blog.full_page)
@rt("/blog/{blog_id}")
def get(blog_id: str):
return blog.single_blog(blog_id)
@rt("/{fname:path}.{ext:static}")
def get(fname:str, ext:str):
return FileResponse(f'{fname}.{ext}')
serve()