File size: 1,765 Bytes
bf51868
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d5d9833
bf51868
 
d5d9833
bf51868
d5d9833
bf51868
 
 
 
 
 
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
import streamlit as st
from htbuilder import HtmlElement, div, ul, li, br, hr, a, p, img, styles, classes, fonts
from htbuilder.units import percent, px
from htbuilder.funcs import rgba, rgb


def image(src_as_string, **style):
    return img(src=src_as_string, style=styles(**style))


def link(link, text, **style):
    return a(_href=link, _target="_blank", style=styles(**style))(text)


# MainMenu {visibility: hidden;}
def layout(*args):

    hide_stuff = """
    <style>
      #MainMenu {visibility: hidden;}
      footer {visibility: hidden;}
      .stApp { bottom: 105px; }
    </style>
    """

    style_div = styles(
        position="fixed",
        left=0,
        bottom=0,
        margin=px(0, 0, 0, 0),
        width=percent(100),
        color="black",
        text_align="center",
        height="auto",
        opacity=1
    )

    style_hr = styles(
        #display="block",
        margin=px(0, 0, "auto", "auto"),
        #border_style="inset",
        border_width=px(3)
    )

    body = p()
    foot = div(
        style=style_div
    )(
        hr(
          style=style_hr
        ),
        body
    )

    for arg in args:
        if isinstance(arg, str):
            body(arg)

        elif isinstance(arg, HtmlElement):
            body(arg)

    st.markdown(hide_stuff, unsafe_allow_html=True)
    st.markdown(str(foot), unsafe_allow_html=True)


def footer():
    myargs = [
        "Made in 	&nbsp; ",
        image('image here',
              width=px(25), height=px(25)),
        "	&nbsp; with ❤️ by &nbsp;",
        link("liknked in", "@mike"),
        br(),
        link("https://www.meetup.com/florence-aws-user-group-meetup/", image('meetupimages'),),
    ]
    layout(*myargs)


if __name__ == "__main__":
    footer()