me / main.py
nbroad's picture
nbroad HF staff
first
3fb26c5 verified
raw
history blame
633 Bytes
from fh_bootstrap import *
import about, blog
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('/')(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()