Add social links to footer with CSS
This commit is contained in:
parent
553b7bbc5f
commit
409ec5bd1d
2 changed files with 62 additions and 4 deletions
|
|
@ -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")
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue