Update shared.py
Browse files
shared.py
CHANGED
|
@@ -1,6 +1,22 @@
|
|
| 1 |
-
from pathlib import Path
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
app_dir = Path(__file__).parent
|
| 6 |
-
tips = pd.read_csv(app_dir / "tips.csv")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#from pathlib import Path
|
| 2 |
+
|
| 3 |
+
#import pandas as pd
|
| 4 |
+
|
| 5 |
+
#app_dir = Path(__file__).parent
|
| 6 |
+
#tips = pd.read_csv(app_dir / "tips.csv")
|
| 7 |
|
| 8 |
+
from pathlib import Path
|
| 9 |
+
#import pandas as pd
|
| 10 |
+
import faicons as fa
|
| 11 |
+
from shiny import ui
|
| 12 |
|
| 13 |
app_dir = Path(__file__).parent
|
| 14 |
+
#tips = pd.read_csv(app_dir / "tips.csv")
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
def create_nav_button(button_icon, button_label_text, button_link, button_cls = "btn btn-primary"):
|
| 18 |
+
return ui.tags.a(
|
| 19 |
+
ui.HTML(f"{fa.icon_svg(button_icon)} {button_label_text}"),
|
| 20 |
+
href=button_link,
|
| 21 |
+
class_=button_cls
|
| 22 |
+
)
|