From 409ec5bd1d5d7829e5d13ba9532b9daba20d7e73 Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Tue, 4 Feb 2025 20:41:41 -0800 Subject: [PATCH] Add social links to footer with CSS --- site_mcknight_tech/__main__.py | 16 ++++++- site_mcknight_tech/page_content/footer.html | 50 +++++++++++++++++++-- 2 files changed, 62 insertions(+), 4 deletions(-) diff --git a/site_mcknight_tech/__main__.py b/site_mcknight_tech/__main__.py index cc51e6f..e67858f 100755 --- a/site_mcknight_tech/__main__.py +++ b/site_mcknight_tech/__main__.py @@ -26,10 +26,16 @@ def _get_content_from_file(file_name: str) -> str: with open(file_name, 'r') as f: return f.read() + def render_tab(tab_name: str): + """ + Render a simple webpage tab from a single file + :param tab_name: Tab name to render + """ file_name = _tab_to_content.get(tab_name, _error_page) with ui.scroll_area().classes('w-full h-screen no-wrap'): - ui.markdown(_get_content_from_file(file_name), extras=['cuddled-lists', 'fenced-code-blocks', 'tables']) + ui.markdown(_get_content_from_file(file_name), + extras=['cuddled-lists', 'fenced-code-blocks', 'tables']) def render_main() -> ui.tab_panels: @@ -50,6 +56,14 @@ def main(): header.set_value(list(_tab_to_content.keys())[0]) ui.query('.nicegui-content').classes('h-screen no-wrap') ui.html(_get_content_from_file(_footer_block), tag="footer").classes("rounded-lg shadow-sm m-4 w-full text-center") + ui.add_css(""" + .fa { + font-size: 30px; + text-decoration: none; + margin: 10px 5px; + vertical-align: bottom; + } + """) ui.run(dark=None, reload=False, title="Daniel McKnight") diff --git a/site_mcknight_tech/page_content/footer.html b/site_mcknight_tech/page_content/footer.html index e091239..57cd5d9 100644 --- a/site_mcknight_tech/page_content/footer.html +++ b/site_mcknight_tech/page_content/footer.html @@ -1,3 +1,47 @@ - - © 2025 Daniel McKnight. All Rights Reserved. - + + +
+ + + + + + + Forgejo logo + Caesar Schinas + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + © 2025 Daniel McKnight. All Rights Reserved. + +
+