taquynhnga commited on
Commit
2ce71e5
1 Parent(s): 3afc5cf

Upload footer.py

Browse files
Files changed (1) hide show
  1. frontend/footer.py +33 -0
frontend/footer.py ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+
3
+ footer="""<style>
4
+ a:link , a:visited{
5
+ background-color: transparent;
6
+ # text-decoration: underline;
7
+ }
8
+
9
+ a:hover, a:active {
10
+ color: red;
11
+ background-color: transparent;
12
+ text-decoration: underline;
13
+ }
14
+
15
+ .footer {
16
+ position: fixed;
17
+ left: 0;
18
+ bottom: 0;
19
+ width: 100%;
20
+ background-color: white;
21
+ color: black;
22
+ text-align: center;
23
+ }
24
+ </style>
25
+
26
+ <div class="footer">
27
+ <p>USER_DEFINED_TEXT <a href="LINK" target="_blank" color="blue">LINKED_TEXT</a></p>
28
+ </div>
29
+ """
30
+
31
+ def add_footer(text, linked_text, link):
32
+ custom_footer = footer.replace('USER_DEFINED_TEXT', text).replace('LINKED_TEXT', linked_text).replace('LINK', link)
33
+ st.markdown(custom_footer, unsafe_allow_html=True)