File size: 673 Bytes
3fb26c5 149ddb7 3fb26c5 149ddb7 3fb26c5 addf7c0 3fb26c5 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
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() |